diff --git a/dev/cnf/gradle/transform/transform.properties b/dev/cnf/gradle/transform/transform.properties
index 1644b43fc33..051ac51213b 100644
--- a/dev/cnf/gradle/transform/transform.properties
+++ b/dev/cnf/gradle/transform/transform.properties
@@ -5,6 +5,7 @@ com.ibm.json4j=Kernel
com.ibm.os400.native=Kernel
com.ibm.websphere.appserver.api.config=Kernel
com.ibm.websphere.appserver.api.hpel=Kernel
+com.ibm.websphere.appserver.api.json=KernelTest
com.ibm.websphere.appserver.api.kernel.service=Kernel
com.ibm.websphere.appserver.kernel-1.0=Kernel
com.ibm.websphere.appserver.kernelCore-1.0=Kernel
@@ -17,6 +18,7 @@ com.ibm.websphere.appserver.spi.kernel.service=Kernel
com.ibm.websphere.appserver.spi.logging=Kernel
com.ibm.websphere.appserver.spi.threading=Kernel
com.ibm.websphere.appserver.spi.zosCommandProcessing=Kernel
+com.ibm.websphere.filetransfer=KernelTest
com.ibm.websphere.javaee.jsonp.1.0=Kernel
com.ibm.websphere.javaee.servlet.3.0=KernelTest
com.ibm.websphere.javaee.servlet.3.1=KernelTest
@@ -41,8 +43,11 @@ com.ibm.ws.config.server.schemagen=Kernel
com.ibm.ws.config.server.schemagen.serverschemagen=Kernel
com.ibm.ws.config.utility=Kernel
com.ibm.ws.config.utility.configUtility=Kernel
+com.ibm.ws.config.utility_fat=KernelTest
com.ibm.ws.config.utility_test=KernelTest
com.ibm.ws.config_bvt.parser=KernelTest
+com.ibm.ws.config_bvt.schema=KernelTest
+com.ibm.ws.config_fat=KernelTest
com.ibm.ws.config_test=KernelTest
com.ibm.ws.crypto.certificateutil=Kernel
com.ibm.ws.crypto.certificateutil_bvt=KernelTest
@@ -64,7 +69,9 @@ com.ibm.ws.install.utility.installUtility=Kernel
com.ibm.ws.install.ws-cikLauncher=Kernel
com.ibm.ws.install_test=KernelTest
com.ibm.ws.jmx=Kernel
+com.ibm.ws.jmx.connector.client.rest=KernelTest
com.ibm.ws.jmx.scripting.client=Kernel
+com.ibm.ws.jmx_fat=KernelTest
com.ibm.ws.jmx_test=KernelTest
com.ibm.ws.kernel.boot=Kernel
com.ibm.ws.kernel.boot.archive=Kernel
@@ -77,6 +84,7 @@ com.ibm.ws.kernel.boot.nested=Kernel
com.ibm.ws.kernel.boot.ws-launch=Kernel
com.ibm.ws.kernel.boot.ws-server=Kernel
com.ibm.ws.kernel.boot_bvt=KernelTest
+com.ibm.ws.kernel.boot_fat=KernelTest
com.ibm.ws.kernel.boot_test=KernelTest
com.ibm.ws.kernel.cmdline=Kernel
com.ibm.ws.kernel.cmdline_test=KernelTest
@@ -90,10 +98,12 @@ com.ibm.ws.kernel.feature_bvt=KernelTest
com.ibm.ws.kernel.feature_fat=KernelTest
com.ibm.ws.kernel.feature_test=KernelTest
com.ibm.ws.kernel.filemonitor=Kernel
+com.ibm.ws.kernel.filemonitor_fat=KernelTest
com.ibm.ws.kernel.filemonitor_test=KernelTest
com.ibm.ws.kernel.instrument.agent=Kernel
com.ibm.ws.kernel.instrument.check=Kernel
com.ibm.ws.kernel.metatype.helper=Kernel
+com.ibm.ws.kernel.metatype.helper_fat=KernelTest
com.ibm.ws.kernel.metatype.helper_test=KernelTest
com.ibm.ws.kernel.security.thread=Kernel
com.ibm.ws.kernel.service=Kernel
@@ -106,9 +116,11 @@ com.ibm.ws.logging.hpel=Kernel
com.ibm.ws.logging.hpel.binarylogviewer=Kernel
com.ibm.ws.logging.hpel.osgi=Kernel
com.ibm.ws.logging.hpel_bvt=KernelTest
+com.ibm.ws.logging.hpel_fat=KernelTest
com.ibm.ws.logging.hpel_test=KernelTest
com.ibm.ws.logging.osgi=Kernel
com.ibm.ws.logging_bvt=KernelTest
+com.ibm.ws.logging_fat=KernelTest
com.ibm.ws.logging_test=KernelTest
com.ibm.ws.org.apache.ant=KernelPrereq
com.ibm.ws.org.apache.aries.jmx.api=KernelPrereq
@@ -126,40 +138,52 @@ com.ibm.ws.org.eclipse.equinox.coordinator=KernelPrereq
com.ibm.ws.org.eclipse.equinox.metatype=KernelPrereq
com.ibm.ws.org.eclipse.equinox.region=KernelPrereq
com.ibm.ws.org.glassfish.json=KernelPrereq
+com.ibm.ws.org.glassfish.json_fat=KernelTest
com.ibm.ws.org.objectweb.asm=KernelPrereq
com.ibm.ws.org.osgi.annotation.versioning=KernelPrereq
com.ibm.ws.org.osgi.service.resolver=KernelTest
com.ibm.ws.product.utility=Kernel
com.ibm.ws.product.utility.productutil=Kernel
com.ibm.ws.product.utility_bvt=KernelTest
+com.ibm.ws.product.utility_fat=KernelTest
com.ibm.ws.product.utility_test=KernelTest
com.ibm.ws.ras.instrument=Kernel
com.ibm.ws.repository=Kernel
com.ibm.ws.repository.liberty=Kernel
com.ibm.ws.repository.resolver=Kernel
+com.ibm.ws.repository.resolver_fat=KernelTest
com.ibm.ws.repository.resolver_test=KernelTest
+com.ibm.ws.repository.test.utils=KernelTest
+com.ibm.ws.repository.test.utils_test=KernelTest
com.ibm.ws.runtime.update=Kernel
com.ibm.ws.runtime.update_bvt=KernelTest
+com.ibm.ws.runtime.update_fat=KernelTest
com.ibm.ws.runtime.update_test=KernelTest
com.ibm.ws.security.thread.zos.hooks=Kernel
com.ibm.ws.security.utility=Kernel
com.ibm.ws.security.utility.securityutil=Kernel
com.ibm.ws.security.utility_bvt=KernelTest
+com.ibm.ws.security.utility_fat=KernelTest
com.ibm.ws.security.utility_test=KernelTest
com.ibm.ws.threading=Kernel
com.ibm.ws.threading_bvt=KernelTest
+com.ibm.ws.threading_fat=KernelTest
com.ibm.ws.threading_test=KernelTest
com.ibm.ws.timer=KernelTest
com.ibm.ws.transport.http=KernelTest
com.ibm.ws.zos.channel.console=Kernel
com.ibm.ws.zos.command.processing=Kernel
com.ibm.ws.zos.command.processing_test=KernelTest
+com.ibm.ws.zos.command.processing_zfat=KernelTest
+com.ibm.ws.zos.command.processing_ztest=KernelTest
com.ibm.ws.zos.core=Kernel
com.ibm.ws.zos.core_test=KernelTest
com.ibm.ws.zos.diagnostics=Kernel
com.ibm.ws.zos.diagnostics_test=KernelTest
com.ibm.ws.zos.logging=Kernel
com.ibm.ws.zos.logging_test=KernelTest
+com.ibm.ws.zos.logging_zfat=KernelTest
+com.ibm.ws.zos.logging_ztest=KernelTest
com.ibm.wsspi.org.osgi.core=KernelPrereq
com.ibm.wsspi.org.osgi.namespace.service=KernelPrereq
com.ibm.wsspi.org.osgi.service.cm=KernelPrereq
@@ -180,4 +204,5 @@ prereq.java.1.7=KernelPrereq
prereq.java.1.8=KernelPrereq
prereq.java.tools=KernelPrereq
wlp.lib.extract=Kernel
+wlp.lib.extract_fat=KernelTest
wlp.lib.extract_test=KernelTest
diff --git a/dev/com.ibm.websphere.appserver.api.json/.classpath b/dev/com.ibm.websphere.appserver.api.json/.classpath
new file mode 100644
index 00000000000..bd52baaf243
--- /dev/null
+++ b/dev/com.ibm.websphere.appserver.api.json/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/dev/com.ibm.websphere.appserver.api.json/.gitignore b/dev/com.ibm.websphere.appserver.api.json/.gitignore
new file mode 100644
index 00000000000..05ee82b1e37
--- /dev/null
+++ b/dev/com.ibm.websphere.appserver.api.json/.gitignore
@@ -0,0 +1,3 @@
+/bin/
+/build/
+/generated/
diff --git a/dev/com.ibm.websphere.appserver.api.json/.project b/dev/com.ibm.websphere.appserver.api.json/.project
new file mode 100644
index 00000000000..93a49f1138b
--- /dev/null
+++ b/dev/com.ibm.websphere.appserver.api.json/.project
@@ -0,0 +1,23 @@
+
+
+ com.ibm.websphere.appserver.api.json
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ bndtools.core.bndbuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ bndtools.core.bndnature
+
+
diff --git a/dev/com.ibm.websphere.appserver.api.json/bnd.bnd b/dev/com.ibm.websphere.appserver.api.json/bnd.bnd
new file mode 100644
index 00000000000..41f99c8f9b5
--- /dev/null
+++ b/dev/com.ibm.websphere.appserver.api.json/bnd.bnd
@@ -0,0 +1,18 @@
+-include= ~../cnf/resources/bnd/bundle.props
+bVersion: 1.0
+
+Bundle-Name: WebSphere JSON API
+Bundle-Description: WebSphere JSON API, version ${bVersion}
+Bundle-SymbolicName: com.ibm.websphere.appserver.api.json
+
+Export-Package: com.ibm.json.java,com.ibm.json.xml
+
+Import-Package: com.ibm.json.java,com.ibm.json.xml
+
+-includeresource: {META-INF/maven/com.ibm.websphere.appserver.api/com.ibm.websphere.appserver.api.json/pom.xml=com.ibm.websphere.appserver.api.json.pom}
+
+publish.wlp.jar.suffix: dev/api/ibm
+
+-buildpath: \
+ ${javac.bootclasspath.java6}, \
+ com.ibm.json4j;version=latest
diff --git a/dev/com.ibm.websphere.appserver.api.json/build.gradle b/dev/com.ibm.websphere.appserver.api.json/build.gradle
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/dev/com.ibm.websphere.appserver.api.json/com.ibm.websphere.appserver.api.json.pom b/dev/com.ibm.websphere.appserver.api.json/com.ibm.websphere.appserver.api.json.pom
new file mode 100644
index 00000000000..3d8e15485db
--- /dev/null
+++ b/dev/com.ibm.websphere.appserver.api.json/com.ibm.websphere.appserver.api.json.pom
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ IBM International License Agreement for Non-Warranted Programs
+ http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/licenses/L-JTHS-8SZMHX/HTML/
+ repo
+ Additional notices http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/licenses/L-JTHS-8SZMHX/HTML/notices.html
+
+
+
+ 4.0.0
+ com.ibm.websphere.appserver.api
+ com.ibm.websphere.appserver.api.json
+ ${bFullVersion}
+ WebSphere JSON API
+ WebSphere JSON API, version 1.0
+
diff --git a/dev/com.ibm.websphere.filetransfer/.classpath b/dev/com.ibm.websphere.filetransfer/.classpath
new file mode 100755
index 00000000000..2876090f903
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.websphere.filetransfer/.classpath.gradle b/dev/com.ibm.websphere.filetransfer/.classpath.gradle
new file mode 100644
index 00000000000..2876090f903
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/.classpath.gradle
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.websphere.filetransfer/.gitignore b/dev/com.ibm.websphere.filetransfer/.gitignore
new file mode 100644
index 00000000000..57b341172a1
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/generated/
diff --git a/dev/com.ibm.websphere.filetransfer/.project b/dev/com.ibm.websphere.filetransfer/.project
new file mode 100755
index 00000000000..d0435f4bb97
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/.project
@@ -0,0 +1,23 @@
+
+
+ com.ibm.websphere.filetransfer
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ bndtools.core.bndbuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ bndtools.core.bndnature
+
+
diff --git a/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.core.resources.prefs b/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000000..25d9425fe34
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.jdt.core.prefs b/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..845c3083c7d
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,286 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=18
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=2
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=2
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=2
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=20
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=4
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+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=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+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=false
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+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=180
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=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=8
+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_label=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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not 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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not 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.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+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=180
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+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=false
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.jdt.ui.prefs b/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000000..c874b581698
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,117 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=false
+cleanup.make_parameters_final=true
+cleanup.make_private_fields_final=false
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=false
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=/**\n *\n * ${tags}\n *//**\n * ${tags}\n * ${see_to_target}\n *//**\n * ${tags}\n *//** *//**\n * ${tags}\n *//**\n * @param ${param} the ${bare_field_name} to set\n *//*\n* IBM Confidential\n*\n* OCO Source Materials\n*\n* WLP Copyright IBM Corp. ${year}\n*\n* The source code for this program is not published or otherwise divested \n* of its trade secrets, irrespective of what has been deposited with the \n* U.S. Copyright Office.\n*//**\n * @return the ${bare_field_name}\n */${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}\n\n\n\n// ${todo} Auto-generated catch block\n// Do you need FFDC here? Remember FFDC instrumentation and @FFDCIgnore\n// http\://was.pok.ibm.com/xwiki/bin/view/Liberty/LoggingFFDC\n${exception_var}.printStackTrace();// ${todo} Auto-generated method stub\n${body_statement}${body_statement}\n// ${todo} Auto-generated constructor stubreturn ${field};${field} \= ${param};
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=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=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=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=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+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/dev/com.ibm.websphere.filetransfer/.settings/org.sonar.ide.eclipse.core.prefs b/dev/com.ibm.websphere.filetransfer/.settings/org.sonar.ide.eclipse.core.prefs
new file mode 100755
index 00000000000..e0b979e14e4
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/.settings/org.sonar.ide.eclipse.core.prefs
@@ -0,0 +1,7 @@
+analyseLocally=false
+eclipse.preferences.version=1
+extraProperties=
+lastAnalysisDate=1366911191199
+projectKey=Liberty-8.5.5\:com.ibm.websphere.filetransfer
+serverUrl=http\://szeged.hursley.ibm.com\:8080/sonar
+version=2
diff --git a/dev/com.ibm.websphere.filetransfer/README.txt b/dev/com.ibm.websphere.filetransfer/README.txt
new file mode 100755
index 00000000000..9cd48f08a57
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/README.txt
@@ -0,0 +1,5 @@
+Last update: 2013/08/13
+
+This project (com.ibm.websphere.filetransfer) is intended to encapsulate all of
+the public API and SPI related to file transfer support. Do not add non-public
+interfaces to this project.
diff --git a/dev/com.ibm.websphere.filetransfer/bnd.bnd b/dev/com.ibm.websphere.filetransfer/bnd.bnd
new file mode 100755
index 00000000000..c5c4404d0cf
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/bnd.bnd
@@ -0,0 +1,15 @@
+-include= ~../cnf/resources/bnd/bundle.props
+bVersion=1.0
+
+Bundle-Name: WebSphere File Services APIs
+Bundle-SymbolicName: com.ibm.websphere.filetransfer
+Bundle-Description: APIs for WebSphere File Services; version=${bVersion}
+Bundle-ActivationPolicy: lazy
+
+Export-Package: com.ibm.websphere.filetransfer
+
+instrument.disabled: true
+
+-buildpath: \
+ ${javac.bootclasspath.java6}, \
+ com.ibm.ws.org.osgi.annotation.versioning.1.0.0;version=latest
diff --git a/dev/com.ibm.websphere.filetransfer/build.gradle b/dev/com.ibm.websphere.filetransfer/build.gradle
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/dev/com.ibm.websphere.filetransfer/build.xml b/dev/com.ibm.websphere.filetransfer/build.xml
new file mode 100755
index 00000000000..511276204f2
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/build.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.websphere.filetransfer/findbugs.exclude.xml b/dev/com.ibm.websphere.filetransfer/findbugs.exclude.xml
new file mode 100755
index 00000000000..1cf8902cff2
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/findbugs.exclude.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/FileServiceMXBean.java b/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/FileServiceMXBean.java
new file mode 100755
index 00000000000..acf390bfa21
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/FileServiceMXBean.java
@@ -0,0 +1,231 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2012
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package com.ibm.websphere.filetransfer;
+
+import java.beans.ConstructorProperties;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * This MBean provides file service operations on the host system on which
+ * the server resides.
+ *
+ * The ObjectName for this MBean is {@value #OBJECT_NAME}.
+ *
+ * All paths are implicitly remote, as the operations performed by this MBean
+ * occur on the host which the server resides. All paths are required to be
+ * absolute, either explicitly or rooted with a WebSphere variable such as
+ * ${wlp.install.dir}.
+ *
+ * @ibm-api
+ */
+public interface FileServiceMXBean {
+
+ /**
+ * A String representing the {@link javax.management.ObjectName} that this MXBean maps to.
+ */
+ String OBJECT_NAME = "WebSphere:feature=restConnector,type=FileService,name=FileService";
+
+ /**
+ * Option indicating all available keys should be used for the query.
+ */
+ String REQUEST_OPTIONS_ALL = "a";
+
+ /**
+ * Option indicating that "isDirectory" key should be used for the query.
+ */
+ String REQUEST_OPTIONS_IS_DIRECTORY = "d";
+
+ /**
+ * Option indicating that "isReadOnly" key should be used for the query.
+ */
+ String REQUEST_OPTIONS_READ_ONLY = "r";
+
+ /**
+ * Option indicating that "size" key should be used for the query.
+ */
+ String REQUEST_OPTIONS_SIZE = "s";
+
+ /**
+ * Option indicating that "lastModified" key should be used for the query.
+ */
+ String REQUEST_OPTIONS_LAST_MODIFIED = "t";
+
+ /**
+ * The name of the attribute representing the list of read locations.
+ */
+ String ATTRIBUTE_NAME_READ_LIST = "ReadList";
+
+ /**
+ * The name of the attribute representing the list of write locations.
+ */
+ String ATTRIBUTE_NAME_WRITE_LIST = "WriteList";
+
+ /**
+ * Get the configured list of read-accessible locations on the host where
+ * this server resides. This list is configurable for each server by
+ * modifying the server.xml. Each directory to allow for read access can
+ * be specified to the <remoteFileAccess> configuration element
+ * 'readDir' attribute.
+ *
+ * The default is an empty list.
+ *
+ * @return a list of Strings containing the absolute paths which are read-accessible.
+ */
+ List getReadList();
+
+ /**
+ * Get the configured list of write-accessible locations on the host where
+ * this server resides. This list is configurable for each server by
+ * modifying the server.xml. Each direcoty to allow for write access can
+ * be specified to the <remoteFileAccess> configuration element
+ * 'writeDir' attribute.
+ *
+ * The default is a list containing 3 entries: ${wlp.install.dir},
+ * ${wlp.user.dir} and ${server.output.dir}.
+ *
+ * @return a list of Strings containing the absolute paths which are write-accessible.
+ */
+ List getWriteList();
+
+ /**
+ * Get the metadata pertaining to the specified path. The result object
+ * will contain the requested metadata subset as indicated by the
+ * requestOptions String value, which should be constructed as a
+ * concatenation of the desired values.
+ *
+ * For example: to obtain a request that provides only the "size" and
+ * "lastModified" metadata values, the user can pass in "st" as the
+ * requestOptions field.
+ *
+ * @param path the absolute path of the file or directory for which to retrieve the metadata
+ * @param requestOptions a String representing the concatenation of the requested metadata keys. See REQUEST_OPTIONS_* fields.
+ * @return a CompositeData containing the requested metadata
+ */
+ MetaData getMetaData(String path, String requestOptions);
+
+ /**
+ * List the directory/files for the given path.
+ *
+ * @param directory the absolute path of the directory to list
+ * @param recursive a boolean to specify if the search should be done to all descendant paths
+ * @param requestOptions a String representing the concatenation of the requested metadata keys
+ * @return an array of CompositeData, representing the requested metadata for each entry
+ */
+ MetaData[] getDirectoryEntries(String directory, boolean recursive, String requestOptions);
+
+ /**
+ * Create an archive of the given sourcePath.
+ *
+ * This operation occurs on the file system on which this server resides.
+ * Therefore the sourcePath and targetPath are paths on the server's host
+ * system.
+ *
+ * @param sourcePath the absolute path of the entity to archive
+ * @param targetPath the absolute path to where resulting archive is to be stored
+ * @return true if archive was successfully created, false otherwise
+ */
+ boolean createArchive(String sourcePath, String targetPath);
+
+ /**
+ * Expand the archive at the given sourcePath.
+ *
+ * This operation occurs on the file system on which this server resides.
+ * Therefore the sourcePath and targetPath are paths on the server's host
+ * system.
+ *
+ * @param sourcePath the absolute path of the archive to be expanded
+ * @param targetPath the absolute path to where archive is to be expanded
+ * @return true if archive was successfully expanded, false otherwise
+ */
+ boolean expandArchive(String sourcePath, String targetPath);
+
+ /**
+ * Return type for the getMetaData and getDirectoryEntries methods.
+ *
+ * The JMX framework will convert this to a CompositeData object on the client side.
+ */
+ public class MetaData {
+
+ private final Boolean directory;
+ private final Boolean readOnly;
+ private final Date lastModified;
+ private final Long size;
+ private final String fileName;
+
+ @ConstructorProperties({ "directory", "lastModified", "size", "readOnly", "fileName" })
+ public MetaData(Boolean directory, Date lastModified, Long size, Boolean readOnly, String fileName) {
+ this.directory = directory;
+ this.lastModified = (lastModified == null) ? null : (Date) lastModified.clone();
+ this.size = size;
+ this.readOnly = readOnly;
+ this.fileName = fileName;
+ }
+
+ /**
+ * Boolean value indicating whether or not the entity is a directory.
+ *
+ * @return {@code true} if the entity is a directory, {@code false} otherwise.
+ */
+ public Boolean getDirectory() {
+ return this.directory;
+ }
+
+ /**
+ * @return Date object representing the time the entity was last modified
+ */
+ public Date getLastModified() {
+ return (this.lastModified == null) ? null : (Date) this.lastModified.clone();
+ }
+
+ /**
+ * @return Long object indicating the size of the entity.
+ */
+ public Long getSize() {
+ return this.size;
+ }
+
+ /**
+ * Boolean value indicating whether or not the entity is read-only.
+ *
+ * @return {@code true} if the entity is read-only, {@code false} otherwise.
+ */
+ public Boolean getReadOnly() {
+ return this.readOnly;
+ }
+
+ /**
+ * @return String value indicating the entity's absolute path.
+ */
+ public String getFileName() {
+ return this.fileName;
+ }
+
+ }
+
+}
diff --git a/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/FileTransferMBean.java b/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/FileTransferMBean.java
new file mode 100755
index 00000000000..33b9690890c
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/FileTransferMBean.java
@@ -0,0 +1,137 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2012, 2015
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package com.ibm.websphere.filetransfer;
+
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * This MBean exposes remote file transfer capabilities and must be accessed
+ * only within IBM's JMX REST Connector. Accessing this MBean by any
+ * other means will result in a {@link java.lang.UnsupportedOperationException}.
+ *
+ * The ObjectName for this MBean is {@value #OBJECT_NAME}.
+ *
+ * For the remote file parameters (ie: remoteSourceFile for download/delete
+ * and remoteTargetFile for upload) the following characteristics apply:
+ *
+ *
the remote file will be either on the connected host or on the routing host (if one is setup).
+ *
all file paths need to be either absolute or prepend a Liberty-defined symbol (described on <wlp>/README.txt) that resolves to an absolute path.
+ *
all read and write operations need to be within the configured (or defaulted) read/write regions. See {@link com.ibm.websphere.filetransfer.FileServiceMXBean} for details.
+ *
+ *
+ * For the local file parameters (ie: localTargetFile for download and and
+ * localSourceFile for upload) the following characteristics apply:
+ *
+ *
the local file will be in a folder that contains the appropriate read/write permissions.
+ *
the file path is either absolute or relative to the current working directory.
+ *
+ *
+ * @ibm-api
+ */
+public interface FileTransferMBean {
+
+ /**
+ * A string representing the {@link javax.management.ObjectName} that this MBean maps to.
+ */
+ String OBJECT_NAME = "WebSphere:feature=restConnector,type=FileTransfer,name=FileTransfer";
+
+ /**
+ * Download a file from the specified remote source location and write it
+ * in the specified local target location.
+ *
+ * Directories are not supported as the remote source file. To download a
+ * directory, it must first be archived.
+ *
+ * @param remoteSourceFile the remote file location of the source to download
+ * @param localTargetFile the local file location where the source contents will be written
+ * @throws IOException if there are any issues handling the source or target files
+ */
+ void downloadFile(String remoteSourceFile, String localTargetFile) throws IOException;
+
+ /**
+ * Download part of a file from the specified remote source location using the specified start and
+ * end offset byte values and write it in the specified local target location.
+ *
+ * Directories are not supported as the remote source file. To download a
+ * directory, it must first be archived.
+ *
+ * This partial download feature is currently available only in non-routing scenarios.
+ *
+ * @param remoteSourceFile the remote file location of the source to download
+ * @param localTargetFile the local file location where the source contents will be written
+ * @param startOffset index of the first byte to copy (zero-based and inclusive)
+ * @param endOffset index of the last byte to copy (zero-based and inclusive).
+ * Specify -1 to copy until the end of file.
+ *
+ * @return Index to use as start offset for next partial file download request.
+ * If this value is greater than the startOffset value that was passed in, then
+ * some bytes (equivalent to the difference) were transferred by this download request.
+ *
+ * Note: It is assumed that in-between the download requests, remote source file is not
+ * modified in any way except for appending contents to end of the file.
+ *
+ * @throws IOException if there are any issues handling the source or target files
+ */
+ long downloadFile(String remoteSourceFile, String localTargetFile, long startOffset, long endOffset) throws IOException;
+
+ /**
+ * Upload a file from the specified local source location and write it
+ * in the specified remote target location.
+ *
+ * This method optionally supports expanding an archive (specified as the local
+ * source file) to the remote target file. The supported compression
+ * formats are 'zip' and 'jar' (including war and ear) . All other format types will result in
+ * undefined behaviour.
+ *
+ * Directories are not supported as the local source file. To upload a
+ * directory, it must first be archived and can then be expanded during upload using the expandOnCompletion option.
+ * This option has a special behaviour: the archive will be uploaded as a regular file to the remote system, and then we
+ * will make a directory that matches the filename specified by remoteTargetFile, and the contents will be expanded inside that new folder.
+ *
+ *
Example: Uploading an archive with remoteTargetFile /home/myFolder/wlp.zip and the expandOnCompletion
+ * option set to true will upload the archive wlp.zip to the remote file system, create a folder called wlp.zip
+ * under the directory /home/myFolder, and then expand the contents of the archive inside the folder /home/myFolder/wlp.zip.
+ *
+ * If expandOnCompletion flag is false,then remoteTargetFile must match a filename with an extension (unless the file has not extension), and
+ * cannot be a folder.
+ *
+ *
+ * @param localSourceFile the local path to the file that will be uploaded.
+ * The source file must be a file, since directories are not supported.
+ * @param remoteTargetFile the remote path of the uploaded file.
+ * The target file must be a file, since directories are not supported.
+ * @param expandOnCompletion indicates if the archive should be expanded automatically after it is uploaded.
+ * @throws IOException if there are any issues handling the request
+ */
+ void uploadFile(String localSourceFile, String remoteTargetFile, boolean expandOnCompletion) throws IOException;
+
+ /**
+ * Delete a file located at the remote specified location.
+ *
+ * Recursive deletion of a directory is not supported, however deletion of
+ * an empty directory is supported.
+ *
+ * @param remoteSourceFile the location of the remote file to be deleted
+ * @throws IOException if there are any issues handling the request
+ */
+ void deleteFile(String remoteSourceFile) throws IOException;
+
+ /**
+ * Delete files and folders (empty and non-empty) at the remote specified locations
+ *
+ * @param remoteArtifacts list of locations of remote files and folders (empty and non-empty) to delete
+ * @throws IOException if there are any issues handling the request
+ */
+ void deleteAll(List remoteArtifacts) throws IOException;
+
+}
diff --git a/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/package-info.java b/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/package-info.java
new file mode 100755
index 00000000000..4b8251a907a
--- /dev/null
+++ b/dev/com.ibm.websphere.filetransfer/src/com/ibm/websphere/filetransfer/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011, 2014
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+
+/**
+ * This package is intended to encapsulate the public API and SPI related
+ * to file transfer. Do not add non-public interfaces to this package.
+ *
+ * @version 1.1
+ */
+@org.osgi.annotation.versioning.Version("1.1")
+package com.ibm.websphere.filetransfer;
+
diff --git a/dev/com.ibm.ws.config.utility_fat/.classpath b/dev/com.ibm.ws.config.utility_fat/.classpath
new file mode 100644
index 00000000000..c422489df40
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config.utility_fat/.classpath.gradle b/dev/com.ibm.ws.config.utility_fat/.classpath.gradle
new file mode 100644
index 00000000000..c422489df40
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/.classpath.gradle
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config.utility_fat/.gitignore b/dev/com.ibm.ws.config.utility_fat/.gitignore
new file mode 100644
index 00000000000..27e131e35a6
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/.gitignore
@@ -0,0 +1 @@
+/bootstrapping.properties
diff --git a/dev/com.ibm.ws.config.utility_fat/.project b/dev/com.ibm.ws.config.utility_fat/.project
new file mode 100755
index 00000000000..91eb01d8ee5
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/.project
@@ -0,0 +1,23 @@
+
+
+ com.ibm.ws.config.utility_fat
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ bndtools.core.bndbuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ bndtools.core.bndnature
+
+
diff --git a/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.core.resources.prefs b/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000000..25d9425fe34
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.jdt.core.prefs b/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..f48ecd6cc60
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,280 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+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=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=18
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=2
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=2
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=2
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=20
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=4
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+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=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+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=false
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+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=180
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=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=8
+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_label=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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not 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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not 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.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+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=180
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+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=false
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.jdt.ui.prefs b/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000000..c92277a371a
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,62 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=/**\n *\n * ${tags}\n *//**\n * ${tags}\n * ${see_to_target}\n *//**\n * ${tags}\n *//** *//**\n * ${tags}\n *//**\n * @param ${param} the ${bare_field_name} to set\n *//*\n* IBM Confidential\n*\n* OCO Source Materials\n*\n* WLP Copyright IBM Corp. ${year}\n*\n* The source code for this program is not published or otherwise divested \n* of its trade secrets, irrespective of what has been deposited with the \n* U.S. Copyright Office.\n*//**\n * @return the ${bare_field_name}\n */${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}\n\n\n\n// ${todo} Auto-generated catch block\n// Do you need FFDC here? Remember FFDC instrumentation and @FFDCIgnore\n// http\://was.pok.ibm.com/xwiki/bin/view/Liberty/LoggingFFDC\n${exception_var}.printStackTrace();// ${todo} Auto-generated method stub\n${body_statement}${body_statement}\n// ${todo} Auto-generated constructor stubreturn ${field};${field} \= ${param};
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=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=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=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=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+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/dev/com.ibm.ws.config.utility_fat/bnd.bnd b/dev/com.ibm.ws.config.utility_fat/bnd.bnd
new file mode 100644
index 00000000000..d87d7bffc3b
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/bnd.bnd
@@ -0,0 +1,15 @@
+-include= ~../cnf/resources/bnd/bundle.props
+bVersion=1.0
+
+src: \
+ fat/src
+
+-buildpath: \
+ ${javac.bootclasspath.java6}, \
+ ../build.sharedResources/lib/junit/old/junit.jar;version=file, \
+ fattest.simplicity;version=latest, \
+ ../fattest.simplicity/lib/public.api.jar;version=file, \
+ com.ibm.ws.org.apache.commons.io.1.4;version=latest, \
+ com.ibm.ws.repository;version=latest, \
+ com.ibm.ws.repository.liberty;version=latest, \
+ com.ibm.ws.config.utility;version=latest
diff --git a/dev/com.ibm.ws.config.utility_fat/bnd.bnd.gradle b/dev/com.ibm.ws.config.utility_fat/bnd.bnd.gradle
new file mode 100644
index 00000000000..d87d7bffc3b
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/bnd.bnd.gradle
@@ -0,0 +1,15 @@
+-include= ~../cnf/resources/bnd/bundle.props
+bVersion=1.0
+
+src: \
+ fat/src
+
+-buildpath: \
+ ${javac.bootclasspath.java6}, \
+ ../build.sharedResources/lib/junit/old/junit.jar;version=file, \
+ fattest.simplicity;version=latest, \
+ ../fattest.simplicity/lib/public.api.jar;version=file, \
+ com.ibm.ws.org.apache.commons.io.1.4;version=latest, \
+ com.ibm.ws.repository;version=latest, \
+ com.ibm.ws.repository.liberty;version=latest, \
+ com.ibm.ws.config.utility;version=latest
diff --git a/dev/com.ibm.ws.config.utility_fat/build-test.xml b/dev/com.ibm.ws.config.utility_fat/build-test.xml
new file mode 100755
index 00000000000..e546d657a95
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/build-test.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config.utility_fat/build.gradle b/dev/com.ibm.ws.config.utility_fat/build.gradle
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/dev/com.ibm.ws.config.utility_fat/delivery.sets b/dev/com.ibm.ws.config.utility_fat/delivery.sets
new file mode 100755
index 00000000000..674398425a0
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/delivery.sets
@@ -0,0 +1 @@
+SLE
diff --git a/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/FATSuite.java b/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/FATSuite.java
new file mode 100755
index 00000000000..19b0cca3054
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/FATSuite.java
@@ -0,0 +1,23 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2015
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package com.ibm.ws.config.utility.fat;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * Collection of all FAT tests
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ ServerConfigUtilityFatTesting.class })
+public class FATSuite {}
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/ServerConfigUtilityFatTesting.java b/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/ServerConfigUtilityFatTesting.java
new file mode 100755
index 00000000000..69f63909d74
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/ServerConfigUtilityFatTesting.java
@@ -0,0 +1,336 @@
+package com.ibm.ws.config.utility.fat;
+
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2015
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ */
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.apache.commons.io.FileUtils;
+import org.junit.AfterClass;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.ibm.websphere.simplicity.Machine;
+import com.ibm.websphere.simplicity.ProgramOutput;
+import com.ibm.websphere.simplicity.log.Log;
+import componenttest.custom.junit.runner.Mode;
+import componenttest.custom.junit.runner.Mode.TestMode;
+import componenttest.topology.impl.LibertyServer;
+
+public class ServerConfigUtilityFatTesting extends TestRepository {
+
+ private static final Class> c = ServerConfigUtilityFatTesting.class;
+
+ static Machine machine;
+ String installRoot = server.getInstallRoot();
+ String controllerPort = System.getProperty("HTTP_default.secure");
+ String adminUser = "user001";
+ String adminPassword = "pass001";
+ String keystorePassword = "passwordKeystore";
+ String encodingType = "aes";
+ String configFilePath = System.getProperty("user.dir") + System.getProperty("file.separator") + "configFile.txt";
+
+ private static final String SLASH = System.getProperty("file.separator");
+ public static LibertyServer server = TestRepository.server;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ Assume.assumeTrue(new TestRepository().testRepositoryConnection());
+ final String methodName = "setUp";
+ Log.entering(c, methodName);
+
+ machine = server.getMachine();
+ Log.info(c, methodName, "Starting Server");
+ server.startServer();
+
+ // Wait for the smarter planet message
+ assertNotNull("The smarter planet message did not get printed", server.waitForStringInLog("CWWKF0011I"));
+ Log.exiting(c, methodName);
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ if (server.isStarted()) {
+ server.stopServer();
+ }
+ }
+
+ public static String readFile(String path) throws IOException {
+ return FileUtils.readFileToString(new File(path)).trim();
+ }
+
+ @Mode(TestMode.LITE)
+ @Test
+ public void testConfigUtilityUseLocalFile() throws Exception {
+ Assume.assumeTrue(testRepositoryConnection());
+ final String methodName = "testConfigUtilityUseLocalFile";
+
+ Log.entering(c, methodName);
+ Properties env = new Properties();
+
+ String p = server.getServerRoot() + SLASH + "files" + SLASH + "remoteJMXConnection.xml";
+ Log.info(c, methodName, "Running configUtility --useLocalFile");
+ Log.info(c, methodName, "Path to --useLocalFile" + p);
+ ProgramOutput po = machine.execute(server.getInstallRoot() + "/bin/configUtility",
+ new String[] {
+ "install",
+ "--useLocalFile=" + p,
+ "--VadminUser=" + adminUser,
+ "--VwritePath=path1",
+ "--encoding=" + encodingType,
+ "--key=" + "123",
+ "--VhttpPort=8081"
+ },
+ installRoot,
+ env);
+
+ Log.info(c, methodName, "Executed configUtility command:" + po.getCommand());
+ Log.info(c, methodName, "--useLocalFile result:\n" + po.getStdout());
+ assertEquals("ConfigUtility task should complete with return code as 0.", 0, po.getReturnCode());
+
+ assertTrue("Fail: did not match expected username:", po.getStdout().contains("userName=\"" + adminUser + "\""));
+ assertTrue("Fail: did not match expected writePath snippet:path1", po.getStdout().contains("path1"));
+ assertTrue("Fail: did not match expected httpPort snippet:", po.getStdout().toString().contains("httpPort=\"8081\""));
+
+ Log.exiting(c, methodName);
+ }
+
+ @Mode(TestMode.LITE)
+ @Test
+ public void testConfigUtilityCheckErrorCodes() throws Exception {
+ Assume.assumeTrue(testRepositoryConnection());
+ final String methodName = "testConfigUtilityCheckErrorCodes";
+
+ Log.entering(c, methodName);
+ Properties env = new Properties();
+
+ String p = server.getServerRoot() + SLASH + "files" + SLASH + "remoteJMXConnection.xml";
+ Log.info(c, methodName, "Running configUtility --useLocalFile");
+ Log.info(c, methodName, "Path to --useLocalFile" + p);
+
+ ProgramOutput po = machine.execute(server.getInstallRoot() + "/bin/configUtility",
+ new String[] {
+ "install",
+ "--useLocalFile=" + p + "abc",
+ "--VadminUser=" + adminUser,
+ "--VwritePath=path1",
+ "--encoding=" + encodingType,
+ "--key=" + "123",
+ "--VhttpPort=8081"
+ },
+ installRoot,
+ env);
+
+ Log.info(c, methodName, "Executed configUtility command:" + po.getCommand());
+ Log.info(c, methodName, "--useLocalFile result:\n" + po.getStdout());
+ assertEquals("ConfigUtility task should complete with return code as 255.", 255, po.getReturnCode());
+
+ Log.exiting(c, methodName);
+ }
+
+ @Mode(TestMode.LITE)
+ @Test
+ public void testInvalidValArgsConfigUtility() throws Exception {
+ Assume.assumeTrue(testRepositoryConnection());
+ final String methodName = "testInvalidValArgsConfigUtility";
+
+ Log.entering(c, methodName);
+ Properties env = new Properties();
+
+ String p = server.getServerRoot() + SLASH + "files" + SLASH + "remoteJMXConnection.xml";
+ Log.info(c, methodName, "Running configUtility --useLocalFile");
+ Log.info(c, methodName, "Path to --useLocalFile" + p);
+
+ ProgramOutput po = machine.execute(server.getInstallRoot() + "/bin/configUtility",
+ new String[] {
+ "install",
+ "--useLocalFile=" + p,
+ "--Vinvalid=" + adminUser,
+ "--VwritePath=path1",
+ "--encoding=" + encodingType,
+ "--key=" + "123",
+ "--VhttpPort=8081"
+ },
+ installRoot,
+ env);
+
+ Log.info(c, methodName, "Executed configUtility command:" + po.getCommand());
+ Log.info(c, methodName, "--useLocalFile result:\n" + po.getStdout());
+ assertEquals("ConfigUtility task should complete with return code as 20.", 20, po.getReturnCode());
+
+ Log.exiting(c, methodName);
+ }
+
+ @Mode(TestMode.LITE)
+ @Test
+ public void testEncodingConfigUtilityUseLocalFile() throws Exception {
+ Assume.assumeTrue(testRepositoryConnection());
+ final String methodName = "testEncodingConfigUtilityUseLocalFile";
+
+ Log.entering(c, methodName);
+ Properties env = new Properties();
+
+ Log.info(c, methodName, "Running configUtility --useLocalFile");
+
+ String p = server.getServerRoot() + SLASH + "files" + SLASH + "remoteJMXConnection.xml";
+ ProgramOutput po = machine.execute(server.getInstallRoot() + "/bin/configUtility",
+ new String[] {
+ "install",
+ "--useLocalFile=" + p,
+ "--VadminUser=" + adminUser,
+ "--VwritePath=" + "path1",
+ "--VadminPassword=" + adminPassword,
+ "--VkeystorePassword=" + keystorePassword,
+ "--encoding=" + encodingType,
+ "--key=" + "123"
+ },
+ installRoot,
+ env);
+
+ Log.info(c, methodName, "Executed configUtility command:" + po.getCommand());
+ Log.info(c, methodName, "ConfigUtility result:\n" + po.getStdout());
+ assertEquals("ConfigUtility task should complete with return code as 0.", 0, po.getReturnCode());
+
+ assertTrue("Fail: did not match expected username:", po.getStdout().contains("userName=\"" + adminUser + "\""));
+ assertTrue("Fail: did not match expected writePath snippet:path1", po.getStdout().contains("path1"));
+ assertFalse("Fail: adminPassword should not match generated password:",
+ po.getStdout().contains(adminPassword));
+ assertTrue("Fail: did not match expected encodingType 'aes':",
+ po.getStdout().contains("userPassword=\"{aes}"));
+
+ Log.exiting(c, methodName);
+ }
+
+ @Mode(TestMode.LITE)
+ @Test
+ public void testDefaultEncodingConfigUtility() throws Exception {
+ Assume.assumeTrue(testRepositoryConnection());
+ final String methodName = "testDefaultEncodingConfigUtility";
+
+ Log.entering(c, methodName);
+ Properties env = new Properties();
+
+ Log.info(c, methodName, "Running configUtility --useLocalFile");
+ String p = server.getServerRoot() + SLASH + "files" + SLASH + "remoteJMXConnection.xml";
+ ProgramOutput po = machine.execute(server.getInstallRoot() + "/bin/configUtility",
+ new String[] {
+ "install",
+ "--useLocalFile=" + p,
+ "--VadminUser=" + adminUser,
+ "--VwritePath=" + "path1",
+ "--VadminPassword=" + adminPassword,
+ "--VkeystorePassword=" + keystorePassword
+ },
+ installRoot,
+ env);
+
+ Log.info(c, methodName, "Executed configUtility command:" + po.getCommand());
+ Log.info(c, methodName, "ConfigUtility result:\n" + po.getStdout());
+ assertEquals("ConfigUtility task should complete with return code as 0.", 0, po.getReturnCode());
+
+ assertTrue("Fail: did not match expected username:", po.getStdout().contains("userName=\"" + adminUser + "\""));
+ assertTrue("Fail: did not match expected writePath snippet:path1", po.getStdout().contains("path1"));
+ assertFalse("Fail: adminPassword should not match generated password:",
+ po.getStdout().contains(adminPassword));
+ assertTrue("Fail: did not match expected encodingType 'xor':userPassword=\"{xor}",
+ po.getStdout().contains("userPassword=\"{xor}"));
+
+ Log.exiting(c, methodName);
+ }
+
+ @Mode(TestMode.LITE)
+ @Test
+ public void testFindAllConfigSnippets() throws Exception {
+ Assume.assumeTrue(testRepositoryConnection());
+ final String methodName = "testFindAllConfigSnippets";
+
+ Log.entering(c, methodName);
+ Properties env = new Properties();
+
+ Log.info(c, methodName, "Running configUtility find");
+
+ ProgramOutput po = machine.execute(server.getInstallRoot() + "/bin/configUtility",
+ new String[] { "find" },
+ installRoot,
+ env);
+
+ Log.info(c, methodName, "Executed configUtility command:" + po.getCommand());
+
+ assertFalse("FAIL: configUtility find should return all snippets:", po.getStdout().isEmpty());
+ Log.exiting(c, methodName);
+ }
+
+ @Mode(TestMode.LITE)
+ @Test
+ public void testFindRelatedConfigSnippets() throws Exception {
+ Assume.assumeTrue(testRepositoryConnection());
+ final String methodName = "testFindRelatedConfigSnippets";
+
+ Log.entering(c, methodName);
+ Properties env = new Properties();
+ String arg = "security";
+
+ Log.info(c, methodName, "Running configUtility find " + arg);
+
+ ProgramOutput po = machine.execute(server.getInstallRoot() + "/bin/configUtility",
+ new String[] { "find", arg },
+ installRoot,
+ env);
+
+ Log.info(c, methodName, "Executed configUtility command:" + po.getCommand());
+
+ assertFalse("FAIL: configUtility info should return snippets related to " + arg, po.getStdout().isEmpty());
+ Log.exiting(c, methodName);
+ }
+
+ @Mode(TestMode.LITE)
+ @Test
+ public void testCreateConfigFileSnippets() throws Exception {
+ Assume.assumeTrue(testRepositoryConnection());
+ final String methodName = "testCreateConfigFileSnippets";
+
+ Log.entering(c, methodName);
+ Properties env = new Properties();
+
+ Log.info(c, methodName, "Running configUtility -list");
+ Log.info(c, methodName, "Create Config File in " + configFilePath);
+ String p = server.getServerRoot() + SLASH + "files" + SLASH + "remoteJMXConnection.xml";
+ ProgramOutput po = machine.execute(server.getInstallRoot() + "/bin/configUtility",
+ new String[] {
+ "install",
+ "--useLocalFile=" + p,
+ "--VadminUser=" + adminUser,
+ "--VwritePath=" + "path1",
+ "--VadminPassword=" + adminPassword,
+ "--VkeystorePassword=" + keystorePassword,
+ "--createConfigFile=" + configFilePath
+ },
+ installRoot,
+ env);
+
+ Log.info(c, methodName, "Executed configUtility command:" + po.getCommand());
+ Log.info(c, methodName, "ConfigFile result:\n" + po.getStdout());
+
+ File configFile = new File(configFilePath);
+ assertTrue("The configFile " + configFilePath + " was created.", configFile.exists());
+ configFile.deleteOnExit();
+
+ Log.exiting(c, methodName);
+ }
+}
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/TestRepository.java b/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/TestRepository.java
new file mode 100755
index 00000000000..1a8adb15702
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/fat/src/com/ibm/ws/config/utility/fat/TestRepository.java
@@ -0,0 +1,72 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2015
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package com.ibm.ws.config.utility.fat;
+
+import java.io.File;
+
+import org.junit.Rule;
+import org.junit.rules.TestName;
+
+import com.ibm.websphere.simplicity.log.Log;
+import com.ibm.ws.repository.connections.RestRepositoryConnection;
+import com.ibm.ws.repository.connections.liberty.MainRepository;
+
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+/**
+ *
+ * TestRepository makes sure that the connection to the repository is successful
+ */
+public class TestRepository {
+
+ private static Class> logClass = TestRepository.class;
+ public static boolean connectedToRepo = false;
+ public static String massiveRepoFile;
+ private static String repositoryUrl;
+ public static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.utility.fat");
+
+ @Rule
+ public final TestName method = new TestName();
+ private static final String SLASH = System.getProperty("file.separator");
+
+ @SuppressWarnings("deprecation")
+ public boolean testRepositoryConnection() {
+ Log.entering(logClass, method.getMethodName());
+ try {
+ massiveRepoFile = server.pathToAutoFVTTestFiles + "massive" + SLASH + "massiveRepoLocation.props";
+
+ String repositoryDescriptionUrl = new File(massiveRepoFile).getCanonicalFile().toURI().toURL().toString();
+ System.setProperty("repository.description.url", repositoryDescriptionUrl);
+
+ RestRepositoryConnection connection = MainRepository.createConnection();
+ connectedToRepo = connection.isRepositoryAvailable();
+
+ if (connectedToRepo) {
+ Log.info(logClass, method.getMethodName(), "Repository connection is OK.");
+ } else {
+ connectedToRepo = false;
+ Log.info(logClass, method.getMethodName(), "Cannot connect to the test repository: " + repositoryUrl);
+ }
+
+ } catch (Exception e) {
+ Log.info(logClass, method.getMethodName(), "Cannot connect to the repository : " + e.getMessage());
+ connectedToRepo = false;
+ } finally {
+ MainRepository.clearCachedRepoProperties();
+ }
+
+ Log.exiting(logClass, method.getMethodName());
+ return connectedToRepo;
+ }
+
+}
diff --git a/dev/com.ibm.ws.config.utility_fat/publish/files/massive/massiveRepoLocation.props b/dev/com.ibm.ws.config.utility_fat/publish/files/massive/massiveRepoLocation.props
new file mode 100755
index 00000000000..7ce8be4e822
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/publish/files/massive/massiveRepoLocation.props
@@ -0,0 +1,6 @@
+# Details for Test Massive Repo - Toronto Polaris Team
+
+repository.url=http://ltestl91.hursley.ibm.com:9002/ma/v1
+apiKey=79984835186
+userId=xmlxsltb@ca.ibm.com
+password=Polaris2015
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/bootstrap.properties b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/bootstrap.properties
new file mode 100755
index 00000000000..08ade3c8318
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/bootstrap.properties
@@ -0,0 +1,8 @@
+com.ibm.ws.logging.trace.specification=*=event=enabled:\
+com.ibm.ws.collective.member.*=all=enabled:\
+com.ibm.ws.collective.repository.*=all=enabled
+com.ibm.ws.collective.utility.*=all=enabled
+com.ibm.ws.logging.max.file.size=0
+ds.loglevel=debug
+
+bootstrap.include=../testports.properties
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/ejbSnippet.xml b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/ejbSnippet.xml
new file mode 100755
index 00000000000..0d8f77439f6
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/ejbSnippet.xml
@@ -0,0 +1,50 @@
+
+Downloading the requested config snippet...
+
+Modifiying the config snippet...
+
+
+
+
+ appSecurity-2.0
+ ejbLite-3.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Please ensure administrative security is configured for the server.
diff --git a/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/remoteJMXConnection.xml b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/remoteJMXConnection.xml
new file mode 100755
index 00000000000..a31952449ff
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/remoteJMXConnection.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ restConnector-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${writePath}
+ ${readPath}
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/resultingSnippet.xml b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/resultingSnippet.xml
new file mode 100755
index 00000000000..e94b5be515f
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/files/resultingSnippet.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+ restConnector-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${writePath}
+ ${readPath}
+
+
+
+
+Please ensure administrative security is configured for the server.
+An administrative user is required to join members to the collective.
diff --git a/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/resources/security/ltpa.keys b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/resources/security/ltpa.keys
new file mode 100755
index 00000000000..e0e7d511ac3
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/resources/security/ltpa.keys
@@ -0,0 +1,8 @@
+#Sun Jan 15 15:01:21 CST 2012
+com.ibm.websphere.CreationDate=Sun Jan 15 15\:01\:21 CST 2012
+com.ibm.websphere.CreationHost=localhost
+com.ibm.websphere.ltpa.Realm=PreGeneratedLTPAKeys
+com.ibm.websphere.ltpa.version=1.0
+com.ibm.websphere.ltpa.3DESKey=xpUAUsH4SZc+VuiAqzL+Tz+MfBmb+6vv3/cGjIn+mR4\=
+com.ibm.websphere.ltpa.PublicKey=AMan4Qo5MKIeYf26TJbTZwRdYai7rWRVXDwy/6XI1iq+CVxny1O74rE4cn7wXalID05hKwm/HUxvFd72Y3dABzL1bTUpl1uE6SQNePrcdrQC8rmtichsdvY0baiGYexURYP7fbHF5Z70RfQGCPYnuZTB9jsHdh4HJlrOlsx6K2mJAQAB
+com.ibm.websphere.ltpa.PrivateKey=TkjZeR/1L6khA7UKNjBRI1T+nbwEWXv1AWVSOCEgpKfLvw8iAkIc7+8I2zfc3j88XciTxDuagepUDoWCXHJ1ithSptZSLnHBASD7Ki1dLTKY7jszPXmIIwoa8YaQFtuuNeSJ7r6r8krSB5ml5sk7aTF0Sed8TFrx1aDEQRIZCovZV8BQX29bBZC99gTqk3chCpcOVRqcxvQRGzdP0PenvaA9afeflV5t4Iw8errfmHjedNVDog90ZVVAeecO+ZLqn7yAHh98ZTdV9IEVyqnFI7XQljrMJsNt3zl/tB7ktQ6VuyxJmlQdDbmvJ+F6DZeR9lVC991a/Ks0i1VKVOrwhPxJYLX2Xz7MWpLu09pwapo\=
diff --git a/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/server.xml b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/server.xml
new file mode 100755
index 00000000000..80576a2e13b
--- /dev/null
+++ b/dev/com.ibm.ws.config.utility_fat/publish/servers/com.ibm.ws.config.utility.fat/server.xml
@@ -0,0 +1,9 @@
+
+
+
+
+ servlet-3.0
+ restConnector-1.0
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/.classpath b/dev/com.ibm.ws.config_bvt.schema/.classpath
new file mode 100644
index 00000000000..c8c4cd4a46c
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/.classpath.gradle b/dev/com.ibm.ws.config_bvt.schema/.classpath.gradle
new file mode 100644
index 00000000000..c8c4cd4a46c
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/.classpath.gradle
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/.project b/dev/com.ibm.ws.config_bvt.schema/.project
new file mode 100755
index 00000000000..34341dba146
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/.project
@@ -0,0 +1,23 @@
+
+
+ com.ibm.ws.config_bvt.schema
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ bndtools.core.bndbuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ bndtools.core.bndnature
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.core.resources.prefs b/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000000..25d9425fe34
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.jdt.core.prefs b/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..f48ecd6cc60
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,280 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+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=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=18
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=2
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=2
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=2
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=20
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=4
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+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=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+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=false
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+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=180
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=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=8
+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_label=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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not 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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not 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.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+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=180
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+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=false
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.jdt.ui.prefs b/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000000..3d73ed77a17
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,113 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=false
+cleanup.make_parameters_final=true
+cleanup.make_private_fields_final=false
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=/**\n *\n * ${tags}\n *//**\n * ${tags}\n * ${see_to_target}\n *//**\n * ${tags}\n *//** *//**\n * ${tags}\n *//**\n * @param ${param} the ${bare_field_name} to set\n *//*\n* IBM Confidential\n*\n* OCO Source Materials\n*\n* WLP Copyright IBM Corp. ${year}\n*\n* The source code for this program is not published or otherwise divested \n* of its trade secrets, irrespective of what has been deposited with the \n* U.S. Copyright Office.\n*//**\n * @return the ${bare_field_name}\n */${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}\n\n\n\n// ${todo} Auto-generated catch block\n// Do you need FFDC here? Remember FFDC instrumentation and @FFDCIgnore\n// http\://was.pok.ibm.com/xwiki/bin/view/Liberty/LoggingFFDC\n${exception_var}.printStackTrace();// ${todo} Auto-generated method stub\n${body_statement}${body_statement}\n// ${todo} Auto-generated constructor stubreturn ${field};${field} \= ${param};
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=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=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=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=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+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/dev/com.ibm.ws.config_bvt.schema/bnd.bnd b/dev/com.ibm.ws.config_bvt.schema/bnd.bnd
new file mode 100755
index 00000000000..d6ad84f508f
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bnd.bnd
@@ -0,0 +1,18 @@
+-include= ~../cnf/resources/bnd/liberty-release.props
+bVersion=1.0
+
+-nobundles=true
+
+src: \
+ bvt/src
+
+-buildpath: \
+ ${javac.bootclasspath.java6}, \
+ ../build.sharedResources/lib/junit/old/junit.jar;version=file, \
+ ../build.sharedResources/lib/ws-junit/ws-junit.jar;version=file, \
+ fattest.simplicity;version=latest, \
+ ../fattest.simplicity/lib/public.api.jar;version=file, \
+ com.ibm.websphere.filetransfer;version=latest, \
+ com.ibm.ws.jmx.connector.client.rest;version=latest, \
+ com.ibm.ws.kernel.service;version=latest, \
+ com.ibm.ws.config;version=latest
diff --git a/dev/com.ibm.ws.config_bvt.schema/bnd.bnd.gradle b/dev/com.ibm.ws.config_bvt.schema/bnd.bnd.gradle
new file mode 100755
index 00000000000..d6ad84f508f
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bnd.bnd.gradle
@@ -0,0 +1,18 @@
+-include= ~../cnf/resources/bnd/liberty-release.props
+bVersion=1.0
+
+-nobundles=true
+
+src: \
+ bvt/src
+
+-buildpath: \
+ ${javac.bootclasspath.java6}, \
+ ../build.sharedResources/lib/junit/old/junit.jar;version=file, \
+ ../build.sharedResources/lib/ws-junit/ws-junit.jar;version=file, \
+ fattest.simplicity;version=latest, \
+ ../fattest.simplicity/lib/public.api.jar;version=file, \
+ com.ibm.websphere.filetransfer;version=latest, \
+ com.ibm.ws.jmx.connector.client.rest;version=latest, \
+ com.ibm.ws.kernel.service;version=latest, \
+ com.ibm.ws.config;version=latest
diff --git a/dev/com.ibm.ws.config_bvt.schema/build-bvt.xml b/dev/com.ibm.ws.config_bvt.schema/build-bvt.xml
new file mode 100755
index 00000000000..cfd95ae8350
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/build-bvt.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/build.gradle b/dev/com.ibm.ws.config_bvt.schema/build.gradle
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle.bnd b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle.bnd
new file mode 100755
index 00000000000..6a076d8a1fa
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle.bnd
@@ -0,0 +1,22 @@
+-include= ~../cnf/resources/bnd/bundle.props
+bVersion = 1.0
+
+Bundle-Name: Schema Generator Servlet
+Bundle-SymbolicName: test.server.schema
+Bundle-Description: Schema Generator Servlet Bundle, version ${bVersion}
+
+Service-Component: test.server.schema.servlet; \
+ implementation:=test.server.schema.SchemaGeneratorActivator; \
+ http=org.osgi.service.http.HttpService; \
+ schemaGenerator=com.ibm.websphere.metatype.SchemaGenerator; \
+ locationService=com.ibm.wsspi.kernel.service.location.WsLocationAdmin; \
+ immediate:=true; \
+ properties:="service.vendor=IBM"
+
+Private-Package: test.server.*
+
+Import-Package: \
+ !*.internal.*, *
+
+Include-Resource: \
+ @junit.jar
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/factory-one.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/factory-one.xml
new file mode 100755
index 00000000000..ec9638411f3
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/factory-one.xml
@@ -0,0 +1,8 @@
+
+
+
+ 192.168.1.1
+ 192.168.1.2
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/factory-two.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/factory-two.xml
new file mode 100755
index 00000000000..ac83f85b806
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/factory-two.xml
@@ -0,0 +1,7 @@
+
+
+
+ localhost
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/singleton.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/singleton.xml
new file mode 100755
index 00000000000..aa6de86a06b
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/config/singleton.xml
@@ -0,0 +1,8 @@
+
+
+
+ 192.168.1.1
+ 192.168.1.2
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-attributecopy.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-attributecopy.xml
new file mode 100755
index 00000000000..814ccb257f1
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-attributecopy.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-childfirstextends.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-childfirstextends.xml
new file mode 100755
index 00000000000..a4eef6a04bd
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-childfirstextends.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-default.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-default.xml
new file mode 100755
index 00000000000..4104848f4cd
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-default.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-dynamic.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-dynamic.xml
new file mode 100755
index 00000000000..5c3bb23e0e4
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-dynamic.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-extensions-two.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-extensions-two.xml
new file mode 100755
index 00000000000..fb6ec51a0f7
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-extensions-two.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-extensions.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-extensions.xml
new file mode 100755
index 00000000000..3c8cd56a279
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-extensions.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-hidden.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-hidden.xml
new file mode 100755
index 00000000000..dc9cba68f5c
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-hidden.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-defaults.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-defaults.xml
new file mode 100755
index 00000000000..3517b65d8f2
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-defaults.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-merge.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-merge.xml
new file mode 100755
index 00000000000..45191d7342d
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-merge.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-two.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-two.xml
new file mode 100755
index 00000000000..298392be79b
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested-two.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested.xml
new file mode 100755
index 00000000000..2517e32e3e4
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-nested.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-reference.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-reference.xml
new file mode 100755
index 00000000000..822bc5c71ad
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-reference.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-serviceobjectclass.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-serviceobjectclass.xml
new file mode 100755
index 00000000000..eb51e264151
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-serviceobjectclass.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-variable.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-variable.xml
new file mode 100755
index 00000000000..df6523ed86a
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype-variable.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype.xml b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype.xml
new file mode 100755
index 00000000000..8221cb375f0
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/resources/metatype.xml
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseHttpTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseHttpTest.java
new file mode 100755
index 00000000000..7d0c513401b
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseHttpTest.java
@@ -0,0 +1,62 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server;
+
+import java.util.Dictionary;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.http.HttpContext;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.http.NamespaceException;
+
+@Component
+public abstract class BaseHttpTest {
+
+ protected volatile HttpService http = null;
+ private final Set registrations = new HashSet();
+
+ protected void activate(ComponentContext context) throws Exception {}
+
+ protected void deactivate(ComponentContext context) {
+ for (String alias : registrations) {
+ http.unregister(alias);
+ }
+ http = null;
+ }
+
+ protected void registerServlet(String alias, Servlet servlet, Dictionary initParams, HttpContext context) throws ServletException, NamespaceException {
+ if (http == null) {
+ throw new NullPointerException("Http service is not present");
+ }
+ http.registerServlet(alias, servlet, initParams, context);
+ registrations.add(alias);
+ }
+
+ @Reference(name = "http", service = HttpService.class)
+ protected void setHttp(HttpService ref) {
+ this.http = ref;
+ }
+
+ protected void unsetHttp(HttpService ref) {
+ if (ref == this.http) {
+ this.http = null;
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseTest.java
new file mode 100755
index 00000000000..94e1f52e156
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseTest.java
@@ -0,0 +1,30 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server;
+
+public abstract class BaseTest {
+
+ public static final long TIMEOUT = 30 * 1000;
+
+ protected String name;
+
+ public BaseTest(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public abstract String[] getServiceClasses();
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseTestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseTestRunner.java
new file mode 100755
index 00000000000..a753213ba9d
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/BaseTestRunner.java
@@ -0,0 +1,166 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server;
+
+import static org.junit.Assert.fail;
+
+import java.io.BufferedWriter;
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Reference;
+
+import com.ibm.wsspi.kernel.service.location.WsLocationAdmin;
+import com.ibm.wsspi.kernel.service.location.WsResource;
+
+import test.server.config.dynamic.ConfigWriter;
+
+public abstract class BaseTestRunner extends BaseHttpTest {
+
+ protected BundleContext bundleContext;
+ protected WsLocationAdmin locationService;
+ protected ConfigurationAdmin configAdmin;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+
+ bundleContext = context.getBundleContext();
+ ServiceReference> ref = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
+ configAdmin = (ConfigurationAdmin) bundleContext.getService(ref);
+ }
+
+ protected void addTest(BaseTest test) {
+ Dictionary properties = new Hashtable();
+ properties.put(Constants.SERVICE_PID, test.getName());
+ bundleContext.registerService(test.getServiceClasses(), test, properties);
+ }
+
+ @Reference(name = "locationService", service = WsLocationAdmin.class)
+ protected void setLocationService(WsLocationAdmin ref) {
+ this.locationService = ref;
+ }
+
+ protected void unsetLocationService(WsLocationAdmin ref) {
+ if (ref == this.locationService) {
+ this.locationService = null;
+ }
+ }
+
+ private WsResource getConfigRoot() {
+ return locationService.resolveResource("${server.config.dir}/server.xml");
+ }
+
+ protected ConfigWriter readConfiguration() throws Exception {
+ InputStream in = getConfigRoot().get();
+ try {
+ return new ConfigWriter(in);
+ } finally {
+ close(in);
+ }
+ }
+
+ protected void writeConfiguration(ConfigWriter configWriter) throws Exception {
+ // try to write the entire config in one step (or least possible)
+ OutputStreamWriter os = new OutputStreamWriter(getConfigRoot().putStream(), "UTF-8");
+ BufferedWriter writer = new BufferedWriter(os, 25 * 1024);
+ try {
+ configWriter.write(writer);
+ } finally {
+ close(writer);
+ }
+ StringWriter sw = new StringWriter();
+ configWriter.write(sw);
+ System.out.println(sw.toString());
+ }
+
+ public static void dictionaryEquals(Dictionary one, Dictionary two) {
+ if (one.size() != two.size()) {
+ fail("Dictionaries are not the same: " + one + " " + two);
+ }
+ Enumeration e = one.keys();
+ while (e.hasMoreElements()) {
+ Object key = e.nextElement();
+ Object value1 = one.get(key);
+ Object value2 = two.get(key);
+ if (value1 instanceof String[] && value2 instanceof String[]) {
+ value1 = Arrays.asList((String[]) value1);
+ value2 = Arrays.asList((String[]) value2);
+ }
+ if (!value1.equals(value2)) {
+ fail("Dictionaries are not the same: " + key + " " + value1 + " " + value2);
+ }
+ }
+ }
+
+ private void invokeTest(String testName) throws Exception {
+ Method method = getClass().getDeclaredMethod(testName);
+ method.invoke(this);
+ }
+
+ public class TestDynamicConfigServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void doGet(HttpServletRequest rq, HttpServletResponse rsp) throws IOException {
+ PrintWriter pw = rsp.getWriter();
+ rsp.setContentType("text/plain");
+
+ String testName = rq.getParameter("testName");
+
+ try {
+ log("Begin test: " + testName);
+ invokeTest(testName);
+ pw.println("OK");
+ } catch (NoSuchMethodException e) {
+ pw.println("FAILED - Invalid test name: " + testName);
+ } catch (InvocationTargetException e) {
+ pw.println("FAILED");
+ e.getTargetException().printStackTrace(pw);
+ } catch (Throwable e) {
+ pw.println("FAILED");
+ e.printStackTrace(pw);
+ } finally {
+ log("End test: " + testName);
+ }
+ }
+
+ }
+
+ public static void close(Closeable closeable) {
+ if (closeable != null) {
+ try {
+ closeable.close();
+ } catch (IOException ignore) {
+ }
+ }
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ConfigurationAdminTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ConfigurationAdminTest.java
new file mode 100755
index 00000000000..79161e62be3
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ConfigurationAdminTest.java
@@ -0,0 +1,79 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import junit.framework.Assert;
+
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+/**
+ *
+ */
+public class ConfigurationAdminTest extends Test {
+ private final ConfigurationAdmin configAdmin;
+
+ public ConfigurationAdminTest(String name, ConfigurationAdmin ca) {
+ super(name, 0);
+ this.configAdmin = ca;
+ }
+
+ public void testConfigurationAdmin() throws Exception {
+ String myPID = "my.test.pid";
+ Configuration cfg = configAdmin.createFactoryConfiguration(myPID);
+ Dictionary props = new Hashtable();
+ props.put("a", "a");
+// props.put("A", "a");
+ cfg.update(props);
+
+ Configuration caCfg = configAdmin.getConfiguration(cfg.getPid());
+ Dictionary caProps = caCfg.getProperties();
+
+ // check # of elements
+ Assert.assertNotNull("missing key a", caProps.remove("a"));
+ Object o = caProps.remove("A");
+ Assert.assertNull("has key A: " + o, o);
+
+ // update dictionary make sure its copied
+ props.put("b", "b");
+ Assert.assertNull("b is present", caProps.get("b"));
+
+ caProps.put("c", "c");
+ Dictionary caProps2 = caCfg.getProperties();
+ Assert.assertNull("c is present", caProps2.get("c"));
+
+ caCfg.update(caProps);
+ Assert.assertNull("c is present", caProps2.get("c"));
+
+ caProps2 = caCfg.getProperties();
+ Assert.assertNotNull("c is not present", caProps2.get("C"));
+ }
+
+ @Override
+ public String[] getServiceClasses() {
+ return null;
+ }
+
+ @Override
+ public Throwable getException() {
+ try {
+ testConfigurationAdmin();
+ } catch (Throwable t) {
+ exception = t;
+ }
+
+ return exception;
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ConfigurationPluginTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ConfigurationPluginTest.java
new file mode 100755
index 00000000000..ad92d4dd101
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ConfigurationPluginTest.java
@@ -0,0 +1,59 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import java.util.Dictionary;
+
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ConfigurationPlugin;
+
+public class ConfigurationPluginTest extends ManagedFactoryTest implements ConfigurationPlugin {
+
+ /** */
+ private static final String VALUE = "VALUE";
+ /** */
+ private static final String NEW_KEY = "NEW_KEY";
+ /** */
+ private static final String INJECT = "inject";
+
+ public ConfigurationPluginTest(String name) {
+ super(name, 2);
+ }
+
+ @Override
+ public String[] getServiceClasses() {
+ String[] baseServices = super.getServiceClasses();
+ String[] services = new String[baseServices.length + 1];
+ services[0] = ConfigurationPlugin.class.getName();
+ System.arraycopy(baseServices, 0, services, 1, baseServices.length);
+ return services;
+ }
+
+ @Override
+ public void configurationUpdated(String pid, Dictionary props) throws ConfigurationException {
+ if (Boolean.TRUE.equals(props.get(INJECT))) {
+ if (!props.get(NEW_KEY).equals(VALUE)) {
+ throw new ConfigurationException(NEW_KEY, "Missing " + VALUE);
+ }
+ }
+ }
+
+ @Override
+ public void modifyConfiguration(ServiceReference> ref, Dictionary props) {
+ if (name.equals(ref.getProperty(Constants.SERVICE_PID)) && Boolean.TRUE.equals(props.get(INJECT))) {
+ props.put(NEW_KEY, VALUE);
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactoryAliasTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactoryAliasTest.java
new file mode 100755
index 00000000000..2967607e157
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactoryAliasTest.java
@@ -0,0 +1,45 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class FactoryAliasTest extends ManagedFactoryTest {
+
+ public FactoryAliasTest(String name, int count) {
+ super(name, count);
+ }
+
+ @Override
+ public void configurationUpdated(String pid, Dictionary properties) throws ConfigurationException {
+ String id = (String) properties.get("id");
+
+ assertEquals("kids", new Integer(3), properties.get("kids"));
+
+ if ("simpsons".equals(id)) {
+ assertEquals("lastName", "Simpson", properties.get("lastName"));
+ assertEquals("firstName", "Homer", properties.get("firstName"));
+ assertEquals("fullName", "Homer Simpson", properties.get("fullName"));
+ } else if ("griffins".equals(id)) {
+ assertEquals("lastName", "Griffin", properties.get("lastName"));
+ assertEquals("firstName", "Peter", properties.get("firstName"));
+ assertEquals("fullName", "Peter Griffin", properties.get("fullName"));
+ } else {
+ throw new RuntimeException("Invalid instance id: " + id);
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactoryMetaTypeTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactoryMetaTypeTest.java
new file mode 100755
index 00000000000..86fa93a8d0d
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactoryMetaTypeTest.java
@@ -0,0 +1,49 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Vector;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class FactoryMetaTypeTest extends ManagedFactoryTest {
+
+ public FactoryMetaTypeTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public void configurationUpdated(String pid, Dictionary properties) throws ConfigurationException {
+ String id = (String) properties.get("id");
+ if ("FamilyGuy".equals(id)) {
+ // picked up directly from metatype
+ assertEquals("present", Boolean.TRUE, properties.get("present"));
+ assertArrayEquals("int array", new int[] { 1, 2, 3 }, (int[]) properties.get("intColl"));
+ assertEquals("long vector", new Vector(Arrays.asList(4l, 5l, 6l, 7l)), properties.get("longColl"));
+
+ // from metatype
+ assertEquals("lastname", "Griffin", properties.get("lastname"));
+ assertEquals("spouse", "Lois Griffin", properties.get("spouse"));
+
+ // from server config
+ assertArrayEquals("children", new String[] { "Meg Griffin", "Chris Griffin" }, (String[]) properties.get("children"));
+ } else {
+ throw new RuntimeException("Invalid instance id: " + id);
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactorySimpleTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactorySimpleTest.java
new file mode 100755
index 00000000000..0b003cf92bf
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FactorySimpleTest.java
@@ -0,0 +1,38 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class FactorySimpleTest extends ManagedFactoryTest {
+
+ public FactorySimpleTest(String name, int count) {
+ super(name, count);
+ }
+
+ @Override
+ public void configurationUpdated(String pid, Dictionary properties) throws ConfigurationException {
+ String id = (String) properties.get("id");
+ if ("serverInstance".equals(id)) {
+ assertEquals("simple attr", "foo", properties.get("simpleAttr"));
+ assertArrayEquals("collection attr", new String[] { "Lisa", "Simpson" }, (String[]) properties.get("collAttr"));
+ } else {
+ throw new RuntimeException("Invalid instance id: " + id);
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FinalTypeTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FinalTypeTest.java
new file mode 100755
index 00000000000..adaf906721a
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/FinalTypeTest.java
@@ -0,0 +1,41 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2012
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.Dictionary;
+
+/**
+ *
+ */
+public class FinalTypeTest extends ManagedTest {
+
+ /**
+ * @param name
+ */
+ public FinalTypeTest(String name) {
+ super(name);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void configurationUpdated(Dictionary properties) throws Exception {
+ assertEquals("name", "someName", properties.get("name"));
+ assertNull("finalField1 should be null but is " + properties.get("finalField1"), properties.get("finalField1"));
+ String configDir = System.getProperty("user.variable");
+ assertEquals("finalField2 should be an expanded variable", configDir, properties.get("finalField2"));
+ assertEquals("finalField3 should be a default value", "someDefault", properties.get("finalField3"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ManagedFactoryTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ManagedFactoryTest.java
new file mode 100755
index 00000000000..327e68eb0af
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ManagedFactoryTest.java
@@ -0,0 +1,50 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedServiceFactory;
+
+public abstract class ManagedFactoryTest extends Test implements ManagedServiceFactory {
+
+ public ManagedFactoryTest(String name) {
+ this(name, 1);
+ }
+
+ public ManagedFactoryTest(String name, int count) {
+ super(name, count);
+ }
+
+ @Override
+ public String[] getServiceClasses() {
+ return new String[] { ManagedServiceFactory.class.getName() };
+ }
+
+ @Override
+ public void updated(String pid, Dictionary properties) throws ConfigurationException {
+ try {
+ configurationUpdated(pid, properties);
+ } catch (Throwable e) {
+ exception = e;
+ } finally {
+ latch.countDown();
+ }
+ }
+
+ public abstract void configurationUpdated(String pid, Dictionary properties) throws Exception;
+
+ @Override
+ public void deleted(String pid) {}
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ManagedTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ManagedTest.java
new file mode 100755
index 00000000000..f4228aa1f45
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/ManagedTest.java
@@ -0,0 +1,43 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
+
+public abstract class ManagedTest extends Test implements ManagedService {
+
+ public ManagedTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public String[] getServiceClasses() {
+ return new String[] { ManagedService.class.getName() };
+ }
+
+ @Override
+ public void updated(Dictionary properties) throws ConfigurationException {
+ try {
+ configurationUpdated(properties);
+ } catch (Throwable e) {
+ exception = e;
+ } finally {
+ latch.countDown();
+ }
+ }
+
+ public abstract void configurationUpdated(Dictionary properties) throws Exception;
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedConfigComplexElementTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedConfigComplexElementTest.java
new file mode 100755
index 00000000000..c6e485c1ef9
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedConfigComplexElementTest.java
@@ -0,0 +1,111 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+/**
+ * Test a complex config requirement that was requested from the security team
+ */
+public class NestedConfigComplexElementTest extends ManagedFactoryTest {
+
+ private final ConfigurationAdmin configAdmin;
+ private final Map realms, ids, passwords, users;
+ private final String GROUP_ELEM = "group";
+ private final String USER_ELEM = "user";
+ private final String ID_ATTR = "id";
+ private final String PASSWORD_ATTR = "password";
+ private final String REALM_ATTR = "realm";
+
+ /**
+ * @param name
+ */
+ public NestedConfigComplexElementTest(String name, ConfigurationAdmin configAdmin) {
+ super(name);
+ this.configAdmin = configAdmin;
+ realms = new HashMap();
+ ids = new HashMap();
+ passwords = new HashMap();
+ users = new HashMap();
+ init();
+ }
+
+ /**
+ * results data to compare against
+ */
+ private void init() {
+ realms.put("SampleBasicRealm", null);
+ ids.put("admin", "SampleBasicRealm");
+ ids.put("user1", "SampleBasicRealm");
+ ids.put("user2", "SampleBasicRealm");
+ ids.put("user3", "SampleBasicRealm");
+ ids.put("memberlessGroup", "SampleBasicRealm");
+ ids.put("adminGroup", "SampleBasicRealm");
+ ids.put("users", "SampleBasicRealm");
+ passwords.put("admin", "admin");
+ passwords.put("user1", "user1");
+ passwords.put("user2", "user2");
+ passwords.put("user3", "user3");
+ users.put("admin", "SampleBasicRealm");
+ users.put("user1", "SampleBasicRealm");
+ users.put("user2", "SampleBasicRealm");
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void configurationUpdated(String pid, Dictionary properties) throws Exception {
+ String name = (String) properties.get(REALM_ATTR);
+ assertTrue(realms.containsKey(name));
+ String[] userArr = (String[]) properties.get(USER_ELEM);
+ assertNotNull(userArr);
+ assertEquals(4, userArr.length);
+ String[] groupArr = (String[]) properties.get(GROUP_ELEM);
+ assertNotNull(groupArr);
+ assertEquals(3, groupArr.length);
+
+ for (int i = 0; i < userArr.length; i++) {
+ Configuration config = configAdmin.getConfiguration(userArr[i]);
+ Dictionary prop = config.getProperties();
+ String id = (String) prop.get(ID_ATTR);
+ assertTrue(ids.containsKey(id));
+ assertEquals(ids.get(id), name);
+ String password = (String) prop.get(PASSWORD_ATTR);
+ assertTrue(passwords.containsKey(password));
+ assertEquals(passwords.get(password), id);
+ }
+
+ for (int i = 0; i < groupArr.length; i++) {
+ Configuration config = configAdmin.getConfiguration(groupArr[i]);
+ Dictionary prop = config.getProperties();
+ String id = (String) prop.get(ID_ATTR);
+ assertTrue(ids.containsKey(id));
+ assertEquals(ids.get(id), name);
+ String[] userList = (String[]) prop.get(USER_ELEM);
+ if (userList != null) {
+ for (int j = 0; j < userList.length; j++) {
+ assertTrue(users.containsKey(userList[j]));
+ assertEquals(users.get(userList[j]), name);
+ }
+ }
+ }
+
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedConfigElementTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedConfigElementTest.java
new file mode 100755
index 00000000000..7d117125cd9
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedConfigElementTest.java
@@ -0,0 +1,144 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+import com.ibm.ws.config.xml.internal.XMLConfigConstants;
+
+/**
+ *
+ */
+public class NestedConfigElementTest extends ManagedFactoryTest {
+
+ private final ConfigurationAdmin configAdmin;
+ private final Map apps, hostNames, ports;
+
+ /**
+ * @param name
+ */
+ public NestedConfigElementTest(String name, ConfigurationAdmin configAdmin) {
+ super(name);
+ this.configAdmin = configAdmin;
+ apps = new HashMap();
+ hostNames = new HashMap();
+ ports = new HashMap();
+ init();
+ }
+
+ /**
+ * results data to compare against
+ */
+ private void init() {
+ apps.put("fred", null);
+ apps.put("bob", null);
+ apps.put("app", null);
+ hostNames.put("w3.ibm.com", "fred");
+ hostNames.put("w3.hursley.ibm.com", "fred");
+ hostNames.put("butterfly.torolab.ibm.com", "bob");
+ hostNames.put("mallet.torolab.ibm.com", "bob");
+ hostNames.put("*", "app");
+ hostNames.put("nonexistent", "app");
+ ports.put("9084", "app");
+ ports.put("9085", "app");
+ ports.put("9080", "fred");
+ ports.put("9081", "fred");
+ ports.put("9082", "bob");
+ ports.put("9083", "bob");
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void configurationUpdated(String pid, Dictionary properties) throws Exception {
+ String parentPID = (String) properties.get("service.pid");
+ assertEquals("Expected top level pid", "test.config.nested.elements", properties.get("service.factoryPid"));
+ String[] virtualHosts = (String[]) properties.get("testVirtualHost");
+ assertNotNull(virtualHosts);
+ assertEquals("There should be two virtual hosts", 2, virtualHosts.length);
+ String name = (String) properties.get("name");
+ assertTrue(apps.containsKey(name));
+
+ if ("fred".equals(name)) {
+ String[] nestedSingleton = (String[]) properties.get("aNestedSingleton");
+ Configuration singletonConfig = configAdmin.getConfiguration(nestedSingleton[0]);
+ assertEquals("Expected pid", "bundletwo.singleton", singletonConfig.getPid());
+ Dictionary singletonProps = singletonConfig.getProperties();
+ assertEquals("The config.parentPID value should be equal to the parent's service.pid value", parentPID,
+ singletonProps.get(XMLConfigConstants.CFG_PARENT_PID));
+ assertEquals("The displayID should be application[fred]/aNestedSingleton", "application[fred]/aNestedSingleton",
+ singletonProps.get(XMLConfigConstants.CFG_CONFIG_INSTANCE_DISPLAY_ID));
+ assertEquals(1, ((String[]) singletonProps.get("anArray")).length);
+
+ String[] libraries = (String[]) properties.get("library");
+ assertNotNull(libraries);
+ assertEquals(2, libraries.length);
+
+ for (int i = 0; i < libraries.length; i++) {
+ Configuration config = configAdmin.getConfiguration(libraries[i]);
+ assertEquals("Expected factoryPid", "test.config.nested.bundletwo", config.getFactoryPid());
+ Dictionary prop = config.getProperties();
+ assertEquals("The config.parentPID value should be equal to the parent's service.pid value", parentPID,
+ prop.get(XMLConfigConstants.CFG_PARENT_PID));
+ String aString = (String) prop.get("aString");
+ String[] anArray = (String[]) prop.get("anArray");
+ if ("defaultString".equals(aString)) {
+ assertEquals(4, anArray.length);
+ assertEquals("The displayID should be application[fred]/library[default-1]", "application[fred]/library[default-1]",
+ prop.get(XMLConfigConstants.CFG_CONFIG_INSTANCE_DISPLAY_ID));
+ } else if ("notADefault".equals(aString)) {
+ assertEquals(3, anArray.length);
+ assertEquals("The displayID should be application[fred]/library[default-0]", "application[fred]/library[default-0]",
+ prop.get(XMLConfigConstants.CFG_CONFIG_INSTANCE_DISPLAY_ID));
+ } else {
+ fail("Invalid value for attribute aString: " + aString);
+ }
+
+ }
+
+ for (int i = 0; i < virtualHosts.length; i++) {
+ Configuration config = configAdmin.getConfiguration(virtualHosts[i]);
+ assertEquals("Expected factoryPid", "test.config.nested.virtualHost", config.getFactoryPid());
+ Dictionary prop = config.getProperties();
+ assertEquals("The config.parentPID value should be equal to the parent's service.pid value", parentPID,
+ prop.get(XMLConfigConstants.CFG_PARENT_PID));
+ String[] hostAliases = (String[]) prop.get("testHostAlias");
+ assertEquals(1, hostAliases.length);
+ Configuration aliasConfig = configAdmin.getConfiguration(hostAliases[0]);
+ assertEquals("Expected factoryPid", "test.host.alias", aliasConfig.getFactoryPid());
+ Dictionary aliasProps = aliasConfig.getProperties();
+ String[] aliases = (String[]) aliasProps.get("names");
+ assertEquals(2, aliases.length);
+ }
+ }
+ for (int i = 0; i < virtualHosts.length; i++) {
+ Configuration config = configAdmin.getConfiguration(virtualHosts[i]);
+ Dictionary prop = config.getProperties();
+ String host = (String) prop.get("host");
+ assertTrue(hostNames.containsKey(host));
+ assertEquals(hostNames.get(host), name);
+ String port = String.valueOf(prop.get("port"));
+ assertTrue(ports.containsKey(port));
+ assertEquals(ports.get(port), name);
+ }
+
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedResultTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedResultTest.java
new file mode 100755
index 00000000000..e147e32ad39
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedResultTest.java
@@ -0,0 +1,45 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.Dictionary;
+import java.util.Map;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class NestedResultTest extends ManagedFactoryTest {
+
+ private Map> expectedProperties;
+
+ public NestedResultTest(String name, int count) {
+ super(name, count);
+ }
+
+ public void setExpectedProperties(Map> expectedProperties) {
+ this.expectedProperties = expectedProperties;
+ }
+
+ @Override
+ public void configurationUpdated(String pid, Dictionary properties) throws ConfigurationException {
+ String name = (String) properties.get("name");
+
+ Map expectedProps = expectedProperties.get(name);
+ assertNotNull("Unexpected name: " + name, expectedProps);
+ for (Map.Entry entry : expectedProps.entrySet()) {
+ assertEquals("property " + entry.getKey() + " mismatch", entry.getValue(), properties.get(entry.getKey()));
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedSingletonTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedSingletonTest.java
new file mode 100755
index 00000000000..a5e8eab0354
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/NestedSingletonTest.java
@@ -0,0 +1,104 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.cm.ManagedService;
+
+/**
+ * Test singleton pids
+ */
+public class NestedSingletonTest extends ManagedTest {
+
+ private final ConfigurationAdmin configAdmin;
+ private final String nestedElement;
+ private Map> expectedProperties;
+
+ public NestedSingletonTest(String name, String nestedElement, ConfigurationAdmin configAdmin) {
+ super(name);
+ this.configAdmin = configAdmin;
+ this.nestedElement = nestedElement;
+ }
+
+ public void setExpectedProperties(Map> expectedProperties) {
+ this.expectedProperties = expectedProperties;
+ }
+
+ public static Map> getExpectedProperties() {
+ Map map1 = new HashMap();
+ map1.put("pass", "9999");
+ map1.put("fail", "7777");
+
+ Map map2 = new HashMap();
+ map2.put("pass", "100");
+ map2.put("fail", "0");
+
+ Map> expectedProperties = new HashMap>();
+ expectedProperties.put("one", map1);
+ expectedProperties.put("two", map2);
+
+ return expectedProperties;
+ }
+
+ public static Map> getMetatypeExpectedProperties() {
+ Map map1 = new HashMap();
+ map1.put("pass", Integer.valueOf(9999));
+ map1.put("fail", Integer.valueOf(7777));
+
+ Map map2 = new HashMap();
+ map2.put("pass", Integer.valueOf(100));
+ map2.put("fail", Integer.valueOf(0));
+
+ Map> expectedProperties = new Hashtable>();
+ expectedProperties.put("one", map1);
+ expectedProperties.put("two", map2);
+
+ return expectedProperties;
+ }
+
+ @Override
+ public String[] getServiceClasses() {
+ return new String[] { ManagedService.class.getName() };
+ }
+
+ @Override
+ public void configurationUpdated(Dictionary properties) throws Exception {
+ assertEquals("singletonNested1", (properties.get("name")));
+
+ String[] testResults = (String[]) properties.get(nestedElement);
+ assertNotNull(testResults);
+ assertEquals(2, testResults.length);
+
+ Map> expectedProperties = new HashMap>(this.expectedProperties);
+ for (int i = 0; i < testResults.length; i++) {
+ Configuration config = configAdmin.getConfiguration(testResults[i]);
+ Dictionary prop = config.getProperties();
+ String innerName = (String) prop.get("name");
+ Map expectedProps = expectedProperties.remove(innerName);
+ assertNotNull("Unexpected name: " + innerName, expectedProps);
+ for (Map.Entry entry : expectedProps.entrySet()) {
+ assertEquals("property " + entry.getKey() + " mismatch", entry.getValue(), prop.get(entry.getKey()));
+ }
+ }
+
+ assertEquals(0, expectedProperties.size());
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/PasswordTypeTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/PasswordTypeTest.java
new file mode 100755
index 00000000000..62606d1c881
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/PasswordTypeTest.java
@@ -0,0 +1,83 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+
+import com.ibm.wsspi.kernel.service.utils.SerializableProtectedString;
+
+/**
+ *
+ */
+public class PasswordTypeTest extends ManagedFactoryTest {
+
+ /**
+ * @param name
+ */
+ public PasswordTypeTest(String name) {
+ super(name);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void configurationUpdated(String pid, Dictionary properties) throws Exception {
+
+ String id = (String) properties.get("id");
+
+ if (id.equals("p1")) {
+
+ //
+ assertEquals("p1.name", "admin", properties.get("name"));
+ SerializableProtectedString sps = (SerializableProtectedString) properties.get("password");
+ assertEquals("p1.password", "secret,secret", new String(sps.getChars()));
+
+ } else if (id.equals("p2")) {
+
+ //
+ // Only substitution variables are path-normalized. p2 contains no substitution
+ // variables, therefore none of the attribute values are path-normalized.
+
+ assertEquals("p2.name", "my//name/", properties.get("name"));
+ SerializableProtectedString sps = (SerializableProtectedString) properties.get("password");
+ assertEquals("p2.password", "secret//secret/", new String(sps.getChars()));
+
+ } else if (id.equals("p3")) {
+
+ //
+ // p3.name=my//name/
+ // p3.password=secret//secret/
+
+ // p3 contains substitution variables. Substitution variables are path-normalized for all
+ // attribute types EXCEPT ibm:type="password". This test ensures that the password attribute
+ // value is not path-normalized.
+
+ // Path-normalization will...
+ // 1. convert sequences of "//" to just "/"
+ // 2. strip off any trailing "/" from the value.
+
+ // NOTE: We are (at least temporarily) removing path normalization for variables, so the test below is
+ // changing to expect that "my//name/" will not be normalized.
+ assertEquals("p3.name", "my//name/", properties.get("name"));
+
+ // "secret//secret/" ==> "secret//secret/" (no normalization)
+ SerializableProtectedString sps = (SerializableProtectedString) properties.get("password");
+ assertEquals("p2.password", "secret//secret/", new String(sps.getChars()));
+
+ } else {
+ throw new RuntimeException("Invalid test.config.password instance id: " + id);
+ }
+
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SharedAliasTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SharedAliasTest.java
new file mode 100755
index 00000000000..565e14bd20f
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SharedAliasTest.java
@@ -0,0 +1,39 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class SharedAliasTest extends ManagedTest {
+
+ private final String firstName;
+ private final String lastName;
+
+ public SharedAliasTest(String name, String firstName, String lastName) {
+ super(name);
+ this.firstName = firstName;
+ this.lastName = lastName;
+ }
+
+ @Override
+ public void configurationUpdated(Dictionary properties) throws ConfigurationException {
+ assertEquals("kids", "5", properties.get("kids"));
+ assertEquals("lastName", lastName, properties.get("lastName"));
+ assertEquals("firstName", firstName, properties.get("firstName"));
+ assertEquals("fullName", firstName + " " + lastName, properties.get("fullName"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonAliasTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonAliasTest.java
new file mode 100755
index 00000000000..c400a17442a
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonAliasTest.java
@@ -0,0 +1,35 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class SingletonAliasTest extends ManagedTest {
+
+ public SingletonAliasTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public void configurationUpdated(Dictionary properties) throws ConfigurationException {
+ assertEquals("kids", new Integer(2), properties.get("kids"));
+ assertEquals("lastName", "Smith", properties.get("lastName"));
+ assertEquals("firstName", "Stan", properties.get("firstName"));
+ assertEquals("fullName", "Stan Smith", properties.get("fullName"));
+ assertEquals("others", "Roger Smith, Klaus Smith", properties.get("others"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonMetaTypeTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonMetaTypeTest.java
new file mode 100755
index 00000000000..c3bf255ee7f
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonMetaTypeTest.java
@@ -0,0 +1,40 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Vector;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class SingletonMetaTypeTest extends ManagedTest {
+
+ public SingletonMetaTypeTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public void configurationUpdated(Dictionary properties) throws ConfigurationException {
+ // all picked up directly from metatype
+ assertEquals("present", Boolean.TRUE, properties.get("present"));
+ assertArrayEquals("int array", new int[] { 1, 2, 3 }, (int[]) properties.get("intColl"));
+ assertEquals("long vector", new Vector(Arrays.asList(4l, 5l, 6l, 7l)), properties.get("longColl"));
+
+ assertEquals("lastname", "Simpson", properties.get("lastname"));
+ assertEquals("spouse", "Marge Simpson", properties.get("spouse"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonServerMetaTypeTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonServerMetaTypeTest.java
new file mode 100755
index 00000000000..726c6c4b9ed
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonServerMetaTypeTest.java
@@ -0,0 +1,44 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Vector;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class SingletonServerMetaTypeTest extends ManagedTest {
+
+ public SingletonServerMetaTypeTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public void configurationUpdated(Dictionary properties) throws ConfigurationException {
+ // picked up directly from metatype
+ assertEquals("present", Boolean.TRUE, properties.get("present"));
+ assertArrayEquals("int array", new int[] { 1, 2, 3 }, (int[]) properties.get("intColl"));
+ assertEquals("long vector", new Vector(Arrays.asList(4l, 5l, 6l, 7l)), properties.get("longColl"));
+
+ // from metatype
+ assertEquals("lastname", "Doe", properties.get("lastname"));
+ assertEquals("spouse", "Marge Doe", properties.get("spouse"));
+
+ // from server config
+ assertArrayEquals("children", new String[] { "Jon Doe", "Jane Doe" }, (String[]) properties.get("children"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonServerTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonServerTest.java
new file mode 100755
index 00000000000..549e622ce1a
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/SingletonServerTest.java
@@ -0,0 +1,33 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class SingletonServerTest extends ManagedTest {
+
+ public SingletonServerTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public void configurationUpdated(Dictionary properties) throws ConfigurationException {
+ assertEquals("simple attr", "abc", properties.get("simpleAttr"));
+ assertArrayEquals("collection attr", new String[] { "a", "b", "c" }, (String[]) properties.get("collAttr"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/Test.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/Test.java
new file mode 100755
index 00000000000..c69c0fe48be
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/Test.java
@@ -0,0 +1,44 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import test.server.BaseTest;
+
+public abstract class Test extends BaseTest {
+
+ protected CountDownLatch latch;
+ protected Throwable exception;
+
+ public Test(String name) {
+ this(name, 1);
+ }
+
+ public Test(String name, int count) {
+ super(name);
+ this.latch = new CountDownLatch(count);
+ }
+
+ public Throwable getException() {
+ try {
+ if (!latch.await(10, TimeUnit.SECONDS)) {
+ return new RuntimeException("Timed out");
+ }
+ } catch (InterruptedException e) {
+ return new RuntimeException("Interrupted");
+ }
+ return exception;
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/TestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/TestRunner.java
new file mode 100755
index 00000000000..e889b18a9c1
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/TestRunner.java
@@ -0,0 +1,119 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseHttpTest;
+
+public class TestRunner extends BaseHttpTest {
+
+ private BundleContext bundleContext;
+ private final List tests = new ArrayList();
+
+ @Override
+ protected void activate(ComponentContext componentContext) throws Exception {
+ super.activate(componentContext);
+
+ bundleContext = componentContext.getBundleContext();
+ ServiceReference ref = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
+ ConfigurationAdmin configAdmin = (ConfigurationAdmin) bundleContext.getService(ref);
+
+ addTest(new SingletonServerTest("test.config.singleton.server"));
+ addTest(new SingletonServerMetaTypeTest("test.config.singleton.server.metatype"));
+ addTest(new SingletonMetaTypeTest("test.config.singleton.metatype"));
+
+ addTest(new FactorySimpleTest("test.config.factory.simple", 1));
+ addTest(new FactoryMetaTypeTest("test.config.factory.metatype"));
+
+ addTest(new VariableTest("test.config.variable"));
+
+ addTest(new SingletonAliasTest("test.config.singleton.alias"));
+ addTest(new FactoryAliasTest("test.config.factory.alias", 2));
+
+ addTest(new SharedAliasTest("test.config.simpsons.alias", "Homer", "Simpson"));
+ addTest(new SharedAliasTest("test.config.griffins.alias", "Peter", "Griffin"));
+
+ addTest(new NestedConfigElementTest("test.config.nested.elements", configAdmin));
+ addTest(new NestedConfigComplexElementTest("test.config.complex.nested.elements", configAdmin));
+
+ addTest(new PasswordTypeTest("test.config.password"));
+
+ addTest(new FinalTypeTest("test.config.final"));
+
+ NestedSingletonTest nestedSingletonTest = new NestedSingletonTest("test.config.nested.managed", "test.config.nested.result", configAdmin);
+ nestedSingletonTest.setExpectedProperties(NestedSingletonTest.getExpectedProperties());
+ addTest(nestedSingletonTest);
+
+ NestedResultTest nestedResultTest = new NestedResultTest("test.config.nested.result.metatype", 2);
+ nestedResultTest.setExpectedProperties(NestedSingletonTest.getMetatypeExpectedProperties());
+
+ addTest(nestedResultTest);
+
+ tests.add(new ConfigurationAdminTest("test.config.configAdmin", configAdmin));
+
+ addTest(new ConfigurationPluginTest("test.config.plugin"));
+
+ registerServlet("/parser-test", new TestVerifierServlet(), null, null);
+
+ System.out.println("Parser test servlet started");
+ }
+
+ private void addTest(Test test) {
+ Hashtable properties = new Hashtable();
+ properties.put(Constants.SERVICE_PID, test.getName());
+ tests.add(test);
+ bundleContext.registerService(test.getServiceClasses(), test, properties);
+ }
+
+ class TestVerifierServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void doGet(HttpServletRequest rq, HttpServletResponse rsp) throws IOException {
+ int failedCount = 0;
+ boolean failed = false;
+ for (Test test : tests) {
+ Throwable t = test.getException();
+ if (t != null) {
+ failed = true;
+ System.out.println("Test " + test.getName() + " failed:");
+ t.printStackTrace();
+ failedCount++;
+ }
+ }
+ PrintWriter pw = rsp.getWriter();
+ rsp.setContentType("text/plain");
+ if (failed) {
+ pw.println(failedCount + " of " + tests.size() + " tests " + "FAILED, check messages.log for information");
+ } else {
+ pw.println("OK");
+ }
+ }
+
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/VariableTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/VariableTest.java
new file mode 100755
index 00000000000..a53cc62a741
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/VariableTest.java
@@ -0,0 +1,37 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+
+public class VariableTest extends ManagedTest {
+
+ public VariableTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public void configurationUpdated(Dictionary properties) throws ConfigurationException {
+ assertEquals("lastname", "Potter", properties.get("lastname"));
+ assertEquals("name", "Harry Potter", properties.get("name"));
+ assertArrayEquals("names", new String[] { "Lisa Griffin", "Lois Griffin" }, (String[]) properties.get("names"));
+ assertEquals("testVariable should be the variable defined in bootstrap", "variableFromBootstrap", properties.get("testVariable"));
+ assertEquals("testVarNotExist should use the default from the metatype", "defaultFromMetaType", properties.get("testVarNotExist"));
+ assertEquals("testToken should use the default from the metatype", "default value", properties.get("testToken"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/defaults/TestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/defaults/TestRunner.java
new file mode 100755
index 00000000000..14acf46a664
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/defaults/TestRunner.java
@@ -0,0 +1,106 @@
+/*
+IBM Confidential
+ *
+OCO Source Materials
+ *
+Copyright IBM Corp. 2011
+ *
+The source code for this program is not published or otherwise divested of
+its trade secrets, irrespective of what has been deposited with the U.S.
+Copyright Office.
+ */
+package test.server.config.defaults;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.Dictionary;
+
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryTest;
+import test.server.config.dynamic.SingletonTest;
+
+import com.ibm.ws.config.xml.internal.XMLConfigConstants;
+
+public class TestRunner extends BaseTestRunner {
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/default-config-test", new TestDynamicConfigServlet(), null, null);
+ }
+
+ public void testDefaultConfigSingleton() throws Exception {
+ SingletonTest parent = new SingletonTest("test.config.default.singleton");
+ addTest(parent);
+
+ Dictionary dictionary;
+
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate();
+ assertEquals("port", Integer.valueOf(5678), dictionary.get("port"));
+ assertArrayEquals("hostname", new String[] { "192.168.1.1", "192.168.1.2" }, (String[]) dictionary.get("hostname"));
+
+ ConfigWriter writer;
+
+ // STEP 1: update singleton to disable default configuration
+ writer = readConfiguration();
+ writer.setValue("defaultSingleton", null, XMLConfigConstants.CONFIG_ENABLED_ATTRIBUTE, "false");
+ writeConfiguration(writer);
+
+ // wait for deleted configuration
+ dictionary = parent.waitForUpdate();
+ assertNull(dictionary);
+
+ // STEP 2: update singleton to enable default configuration
+ writer = readConfiguration();
+ writer.setValue("defaultSingleton", null, XMLConfigConstants.CONFIG_ENABLED_ATTRIBUTE, "true");
+ writeConfiguration(writer);
+
+ // wait for updated configuration
+ dictionary = parent.waitForUpdate();
+ assertEquals("port", Integer.valueOf(5678), dictionary.get("port"));
+ assertArrayEquals("hostname", new String[] { "192.168.1.1", "192.168.1.2" }, (String[]) dictionary.get("hostname"));
+ }
+
+ public void testDefaultConfigFactory() throws Exception {
+
+ FactoryTest parent = new FactoryTest("test.config.default.factory");
+ addTest(parent);
+
+ // wait for the initial configurations to be injected.
+ Dictionary oneDictionary = parent.waitForUpdate("one");
+ assertEquals("port", Integer.valueOf(1234), oneDictionary.get("port"));
+ assertArrayEquals("hostname", new String[] { "192.168.1.1", "192.168.1.2" }, (String[]) oneDictionary.get("hostname"));
+
+ Dictionary twoDictionary = parent.waitForUpdate("two");
+ assertEquals("port", Integer.valueOf(9999), twoDictionary.get("port"));
+ assertArrayEquals("hostname", new String[] { "localhost", "ibm.com" }, (String[]) twoDictionary.get("hostname"));
+
+ ConfigWriter writer;
+
+ // STEP 1: update instance two to disable default configuration
+ writer = readConfiguration();
+ writer.setValue("defaultFactory", "two", XMLConfigConstants.CONFIG_ENABLED_ATTRIBUTE, "false");
+ writeConfiguration(writer);
+
+ // wait for instance two delete
+ twoDictionary = parent.waitForUpdate("two");
+ assertNull(twoDictionary);
+
+ // STEP 2: update instance two to enable default configuration
+ writer = readConfiguration();
+ writer.setValue("defaultFactory", "two", XMLConfigConstants.CONFIG_ENABLED_ATTRIBUTE, "true");
+ writeConfiguration(writer);
+
+ // wait for instance two update
+ twoDictionary = parent.waitForUpdate("two");
+ assertEquals("port", Integer.valueOf(9999), twoDictionary.get("port"));
+ assertArrayEquals("hostname", new String[] { "localhost", "ibm.com" }, (String[]) twoDictionary.get("hostname"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/ConfigWriter.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/ConfigWriter.java
new file mode 100755
index 00000000000..009e72beb1e
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/ConfigWriter.java
@@ -0,0 +1,182 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config.dynamic;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.StringReader;
+import java.io.Writer;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+public class ConfigWriter {
+
+ private static DocumentBuilderFactory DOM_FACTORY = DocumentBuilderFactory.newInstance();
+
+ private final Document document;
+
+ public ConfigWriter() throws Exception {
+ DocumentBuilder builder = DOM_FACTORY.newDocumentBuilder();
+ document = builder.newDocument();
+ document.appendChild(document.createElement("server"));
+ }
+
+ public ConfigWriter(InputStream in) throws Exception {
+ DocumentBuilder builder = DOM_FACTORY.newDocumentBuilder();
+ document = builder.parse(in);
+ }
+
+ private static boolean matches(Node node, String nodeName, String id, String idAttribute) {
+ if (node instanceof Element && nodeName.equals(node.getNodeName())) {
+ if (id == null) {
+ return true;
+ } else {
+ Element element = (Element) node;
+ return id.equals(element.getAttribute(idAttribute));
+ }
+ }
+ return false;
+ }
+
+ private Element getConfigNode(String nodeName, String id, String idAttribute) {
+ Element root = document.getDocumentElement();
+ NodeList children = root.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (matches(child, nodeName, id, idAttribute)) {
+ return (Element) child;
+ }
+ }
+ return null;
+ }
+
+ private List getConfigNodes(String nodeName, String id, String idAttribute) {
+ Element root = document.getDocumentElement();
+ NodeList children = root.getChildNodes();
+ List nodes = new ArrayList();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (matches(child, nodeName, id, idAttribute)) {
+ nodes.add((Element) child);
+ }
+ }
+ return nodes;
+ }
+
+ public boolean deleteConfig(String nodeName, String id, boolean allInstances) {
+ return deleteConfig(nodeName, id, "id", allInstances);
+ }
+
+ public boolean deleteConfig(String nodeName, String id, String idAttribute, boolean allInstances) {
+ boolean didSomething = false;
+ Element root = document.getDocumentElement();
+ if (allInstances) {
+ List toRemove = getConfigNodes(nodeName, id, idAttribute);
+ for (Node node : toRemove) {
+ root.removeChild(node);
+ didSomething = true;
+ }
+ } else {
+ Node node = getConfigNode(nodeName, id, idAttribute);
+ if (node != null) {
+ root.removeChild(node);
+ didSomething = true;
+ }
+ }
+ return didSomething;
+ }
+
+ public void addConfig(String element) throws Exception {
+ DocumentBuilder builder = DOM_FACTORY.newDocumentBuilder();
+ Document doc = builder.parse(new InputSource(new StringReader(element)));
+ addConfig(doc.getDocumentElement());
+ }
+
+ public void addConfig(String pattern, Object... args) throws Exception {
+ addConfig(MessageFormat.format(pattern, args));
+ }
+
+ public void addConfig(Element element) {
+ Node node = document.importNode(element, true);
+ Element root = document.getDocumentElement();
+ root.appendChild(node);
+ }
+
+ public boolean setValue(String nodeName, String id, String propertyName, String value) {
+ return setValue(nodeName, id, "id", propertyName, value);
+ }
+
+ public boolean setValue(String nodeName, String id, String idAttribute, String propertyName, String value) {
+ Element element = getConfigNode(nodeName, id, idAttribute);
+ if (element != null) {
+ element.setAttribute(propertyName, value);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public boolean removeProperty(String nodeName, String id, String propertyName) {
+ return removeProperty(nodeName, id, "id", propertyName);
+ }
+
+ public boolean removeProperty(String nodeName, String id, String idAttribute, String propertyName) {
+ Element element = getConfigNode(nodeName, id, idAttribute);
+ if (element != null) {
+ // TODO: check for subelement with this name
+ return (element.getAttributes().removeNamedItem(propertyName) != null);
+ } else {
+ return false;
+ }
+ }
+
+ public void write(File file) throws Exception {
+ write(new StreamResult(file));
+ }
+
+ public void write(OutputStream out) throws Exception {
+ write(new StreamResult(out));
+ }
+
+ public void write(Writer writer) throws Exception {
+ write(new StreamResult(writer));
+ }
+
+ private void write(Result result) throws Exception {
+ TransformerFactory tf = TransformerFactory.newInstance();
+ Transformer transformer = tf.newTransformer();
+ //transformer.setOutputProperty (OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+
+ transformer.transform(new DOMSource(document), result);
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/FactoryNestedTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/FactoryNestedTest.java
new file mode 100755
index 00000000000..c89a8be5495
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/FactoryNestedTest.java
@@ -0,0 +1,85 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config.dynamic;
+
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedServiceFactory;
+
+import test.server.BaseTest;
+
+public class FactoryNestedTest extends BaseTest implements ManagedServiceFactory {
+
+ private final Map> dictionaries;
+
+ public FactoryNestedTest(String name) {
+ super(name);
+ dictionaries = new HashMap>();
+ }
+
+ @Override
+ public String[] getServiceClasses() {
+ return new String[] { ManagedServiceFactory.class.getName() };
+ }
+
+ @Override
+ public void updated(String pid, Dictionary properties) throws ConfigurationException {
+ notify(pid, properties);
+ }
+
+ @Override
+ public void deleted(String pid) {
+ notify(pid, null);
+ }
+
+ private void notify(String id, Dictionary properties) {
+ List list = getDictionaries(id);
+ synchronized (list) {
+ list.add(properties);
+ list.notifyAll();
+ }
+ }
+
+ private List getDictionaries(String pid) {
+ synchronized (dictionaries) {
+ List updates = dictionaries.get(pid);
+ if (updates == null) {
+ updates = new ArrayList();
+ dictionaries.put(pid, updates);
+ }
+ return updates;
+ }
+ }
+
+ public Dictionary waitForUpdate(String pid) {
+ List list = getDictionaries(pid);
+ synchronized (list) {
+ while (list.isEmpty()) {
+ try {
+ list.wait(TIMEOUT);
+ } catch (InterruptedException e) {
+ throw new RuntimeException("Interrupted");
+ }
+ if (list.isEmpty()) {
+ throw new RuntimeException("Timed out: " + pid);
+ }
+ }
+ return list.remove(0);
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/FactoryTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/FactoryTest.java
new file mode 100755
index 00000000000..d17d4070bf1
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/FactoryTest.java
@@ -0,0 +1,141 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config.dynamic;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedServiceFactory;
+
+import test.server.BaseTest;
+
+public class FactoryTest extends BaseTest implements ManagedServiceFactory {
+
+ private final Map pid2IdMapping;
+ private final Map id2PidMapping;
+ private final Map>> dictionaries;
+ private final String idAttribute;
+
+ public FactoryTest(String name) {
+ this(name, "id");
+ }
+
+ public FactoryTest(String name, String idAttribute) {
+ super(name);
+ this.dictionaries = new HashMap>>();
+ this.pid2IdMapping = Collections.synchronizedMap(new HashMap());
+ this.id2PidMapping = Collections.synchronizedMap(new HashMap());
+ this.idAttribute = idAttribute;
+ }
+
+ public void reset() {
+ synchronized (dictionaries) {
+ dictionaries.clear();
+ }
+ }
+
+ @Override
+ public String[] getServiceClasses() {
+ return new String[] { ManagedServiceFactory.class.getName() };
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void updated(String pid, @SuppressWarnings("rawtypes") Dictionary properties) throws ConfigurationException {
+ String id = (String) properties.get(idAttribute);
+ pid2IdMapping.put(pid, id);
+ id2PidMapping.put(id, pid);
+ notify(id, properties);
+ }
+
+ @Override
+ public void deleted(String pid) {
+ String id = pid2IdMapping.get(pid);
+ notify(id, null);
+ }
+
+ public String getPid(String id) {
+ return id2PidMapping.get(id);
+ }
+
+ public Set getPids() {
+ return pid2IdMapping.keySet();
+ }
+
+ private void notify(String id, Dictionary properties) {
+ List> list = getDictionaries(id);
+ synchronized (list) {
+ list.add(properties);
+ list.notifyAll();
+ }
+ }
+
+ private List> getDictionaries(String id) {
+ synchronized (dictionaries) {
+ List> updates = dictionaries.get(id);
+ if (updates == null) {
+ updates = new ArrayList>();
+ dictionaries.put(id, updates);
+ }
+ return updates;
+ }
+ }
+
+ public Dictionary waitForUpdate(String id) {
+ return waitForUpdate(id, TIMEOUT);
+ }
+
+ /**
+ * @param string
+ * @param i
+ * @return
+ */
+ public Dictionary waitForUpdate(String id, long timeToWait) {
+ List> list = getDictionaries(id);
+ synchronized (list) {
+ while (list.isEmpty()) {
+ try {
+ list.wait(timeToWait);
+ } catch (InterruptedException e) {
+ throw new RuntimeException("Interrupted");
+ }
+ if (list.isEmpty()) {
+ throw new RuntimeException("Timed out");
+ }
+ }
+ return list.remove(0);
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ public boolean hasDictionary(String id) {
+ List> list = getDictionaries(id);
+ synchronized (list) {
+ try {
+ list.wait(5000);
+ } catch (InterruptedException e) {
+ //Ignore, we're just waiting five seconds to make this method more accurate
+ }
+ return !list.isEmpty();
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/SingletonTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/SingletonTest.java
new file mode 100755
index 00000000000..710a09c40c8
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/SingletonTest.java
@@ -0,0 +1,81 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config.dynamic;
+
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
+
+import test.server.BaseTest;
+
+public class SingletonTest extends BaseTest implements ManagedService {
+ private final static String CLASS_NAME = SingletonTest.class.getName();
+ private final static Logger LOGGER = Logger.getLogger(CLASS_NAME);
+
+ private final List dictionaries;
+
+ public SingletonTest(String name) {
+ super(name);
+ dictionaries = new ArrayList();
+ }
+
+ @Override
+ public String[] getServiceClasses() {
+ return new String[] { ManagedService.class.getName() };
+ }
+
+ @Override
+ public void updated(Dictionary properties) throws ConfigurationException {
+ synchronized (dictionaries) {
+ LOGGER.finest("updated - " + properties);
+ dictionaries.add(properties);
+ dictionaries.notifyAll();
+ }
+ }
+
+ public Dictionary waitForUpdate() {
+ LOGGER.entering(CLASS_NAME, "waitForUpdate");
+ synchronized (dictionaries) {
+ while (dictionaries.isEmpty()) {
+ try {
+ LOGGER.finest("waitForUpdate - waiting");
+ dictionaries.wait(TIMEOUT);
+ } catch (InterruptedException e) {
+ LOGGER.finest("waitForUpdate - interrupted");
+ throw new RuntimeException("Interrupted");
+ }
+ if (dictionaries.isEmpty()) {
+ LOGGER.finest("waitForUpdate - timed out");
+ throw new RuntimeException("Timed out");
+ }
+ }
+ Dictionary d = dictionaries.remove(0);
+ LOGGER.exiting(CLASS_NAME, "waitForUpdate", d);
+ return d;
+ }
+ }
+
+ /**
+ *
+ */
+ public void reset() {
+ synchronized (dictionaries) {
+ dictionaries.clear();
+ }
+
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/TestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/TestRunner.java
new file mode 100755
index 00000000000..7dec335997d
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/dynamic/TestRunner.java
@@ -0,0 +1,300 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config.dynamic;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.Dictionary;
+
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+
+public class TestRunner extends BaseTestRunner {
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/dynamic-config-test", new TestDynamicConfigServlet(), null, null);
+ }
+
+ public void testSingleton() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ SingletonTest singletonTest = new SingletonTest("test.config.dynamic.singleton");
+ addTest(singletonTest);
+
+ // step 1. wait for the initial configuration to be injected.
+ dictionary = singletonTest.waitForUpdate();
+ assertEquals("testValue", "10", dictionary.get("testValue"));
+
+ // step 2a. modify the configuration
+ writer = readConfiguration();
+ writer.setValue("test.config.dynamic.singleton", null, "testValue", "15");
+ writeConfiguration(writer);
+ // step 2b: wait for update
+ dictionary = singletonTest.waitForUpdate();
+ assertEquals("testValue", "15", dictionary.get("testValue"));
+
+ // step 3a. delete configuration
+ writer = readConfiguration();
+ writer.deleteConfig("test.config.dynamic.singleton", null, false);
+ writeConfiguration(writer);
+ // step 3b. wait for update
+ dictionary = singletonTest.waitForUpdate();
+ assertEquals("Test deleted", null, dictionary);
+
+ // step 4a. add configuration back in
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+ // step 4b. wait for update
+ dictionary = singletonTest.waitForUpdate();
+ assertEquals("Test added", "hello", dictionary.get("message"));
+ }
+
+ public void testFactory() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ FactoryTest factoryTest = new FactoryTest("test.config.dynamic.factory");
+ addTest(factoryTest);
+
+ // step 1. wait for the initial configuration to be injected.
+ dictionary = factoryTest.waitForUpdate("1");
+ assertEquals("instance 1 testValue", "10", dictionary.get("testValue"));
+
+ // step 2a. modify instance 1 configuration & add instance 2 configuration
+ writer = readConfiguration();
+ writer.setValue("test.config.dynamic.factory", "1", "testValue", "15");
+ writer.addConfig("");
+ writeConfiguration(writer);
+ // step 2b: wait for updates
+ dictionary = factoryTest.waitForUpdate("1");
+ assertEquals("instance 1 testValue", "15", dictionary.get("testValue"));
+ dictionary = factoryTest.waitForUpdate("2");
+ assertEquals("instance 2 message", "bye", dictionary.get("message"));
+
+ // step 3a. delete instance 1 configuration & modify instance 2 configuration
+ writer = readConfiguration();
+ writer.deleteConfig("test.config.dynamic.factory", "1", false);
+ writer.setValue("test.config.dynamic.factory", "2", "message", "what's up");
+ writeConfiguration(writer);
+ // step 3b. wait for updates
+ dictionary = factoryTest.waitForUpdate("1");
+ assertEquals("instance 1 deleted", null, dictionary);
+ dictionary = factoryTest.waitForUpdate("2");
+ assertEquals("instance 2 message", "what's up", dictionary.get("message"));
+
+ // step 4a. add instance 1 configuration back in & delete instance 2
+ writer = readConfiguration();
+ writer.addConfig("");
+ writer.deleteConfig("test.config.dynamic.factory", "2", false);
+ writeConfiguration(writer);
+ // step 4b. wait for updates
+ dictionary = factoryTest.waitForUpdate("1");
+ assertEquals("instance 1 added", "hello", dictionary.get("message"));
+ dictionary = factoryTest.waitForUpdate("2");
+ assertEquals("instance 2 deleted", null, dictionary);
+ }
+
+ public void testSingletonMetatype() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ SingletonTest singletonMetatypeTest = new SingletonTest("test.config.dynamic.singleton.metatype");
+ addTest(singletonMetatypeTest);
+
+ // step 1. wait for the initial configuration to be injected.
+ // This singleton was not configured in server.xml -- It's created because all of its required
+ // fields have defaults
+ dictionary = singletonMetatypeTest.waitForUpdate();
+ // Make sure auto-added singletons use the alias for the display id
+ assertEquals("singletonMetatype", dictionary.get("config.displayId"));
+
+ // step 2a. modify the configuration using an alias
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+ // step 2b: wait for update
+ dictionary = singletonMetatypeTest.waitForUpdate();
+ assertEquals("version", "2.0", dictionary.get("version"));
+ assertEquals("threads", new Integer(100), dictionary.get("threads"));
+
+ // step 3a. delete configuration using an alias
+ writer = readConfiguration();
+ writer.deleteConfig("singletonMetatype", null, false);
+ writeConfiguration(writer);
+ // step 3b. wait for update - defaults should be injected
+ dictionary = singletonMetatypeTest.waitForUpdate();
+ assertEquals("version", "1.0", dictionary.get("version"));
+ assertEquals("threads", new Integer(100), dictionary.get("threads"));
+
+ // step 4a. add configuration back in
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+ // step 4b. wait for update
+ dictionary = singletonMetatypeTest.waitForUpdate();
+ assertEquals("version", "1.0", dictionary.get("version"));
+ assertEquals("threads", new Integer(500), dictionary.get("threads"));
+ }
+
+ public void testFactoryMetatype() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ FactoryTest factoryTest = new FactoryTest("test.config.dynamic.factory.metatype");
+ addTest(factoryTest);
+
+ // step 1. wait for the initial configuration to be injected.
+ dictionary = factoryTest.waitForUpdate("one");
+
+ // step 2a. modify instance 1 configuration & add instance 2 configuration
+ // The timeout value is of type duration(s), so the value is in seconds instead of milliseconds
+ writer = readConfiguration();
+ writer.setValue("test.config.dynamic.factory.metatype", "one", "timeout", "123m");
+ writer.addConfig("");
+ writeConfiguration(writer);
+ // step 2b: wait for updates
+ dictionary = factoryTest.waitForUpdate("one");
+ assertEquals("instance one timeout", new Long(123 * 60), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(10), dictionary.get("minSize"));
+ dictionary = factoryTest.waitForUpdate("two");
+ assertEquals("instance two timeout", new Long(100), dictionary.get("timeout"));
+ assertEquals("instance two minSize", new Integer(456), dictionary.get("minSize"));
+
+ // step 3a. delete instance 1 configuration & modify instance 2 configuration
+ writer = readConfiguration();
+ writer.deleteConfig("test.config.dynamic.factory.metatype", "one", false);
+ writer.setValue("factoryMetatype", "two", "timeout", "7890ms");
+ writeConfiguration(writer);
+ // step 3b. wait for updates
+ dictionary = factoryTest.waitForUpdate("one");
+ assertEquals("instance one deleted", null, dictionary);
+ dictionary = factoryTest.waitForUpdate("two");
+ assertEquals("instance two timeout", new Long(7), dictionary.get("timeout"));
+ assertEquals("instance two minSize", new Integer(456), dictionary.get("minSize"));
+
+ // step 4a. add instance 1 configuration back in & delete instance 2
+ writer = readConfiguration();
+ writer.addConfig("");
+ writer.deleteConfig("factoryMetatype", "two", false);
+ writeConfiguration(writer);
+ // step 4b. wait for updates
+ dictionary = factoryTest.waitForUpdate("one");
+ assertEquals("instance one timeout", new Long(100), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(91011), dictionary.get("minSize"));
+ dictionary = factoryTest.waitForUpdate("two");
+ assertEquals("instance 2 deleted", null, dictionary);
+ }
+
+ public void testFactoryOptionalId() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ String idAttribute = "name";
+
+ FactoryTest factoryTest = new FactoryTest("test.config.dynamic.factory.optional.metatype", idAttribute);
+ addTest(factoryTest);
+
+ // step 1a. wait for initial configuration of first instance
+ dictionary = factoryTest.waitForUpdate("one");
+ assertEquals("instance one timeout", new Long(100), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(10), dictionary.get("minSize"));
+ assertNull(dictionary.get("id"));
+
+ // step 1b. wait for initial configuration of second instance
+ dictionary = factoryTest.waitForUpdate("four");
+ assertEquals("instance one timeout", new Long(5000), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(10), dictionary.get("minSize"));
+ assertNull(dictionary.get("id"));
+
+ assertEquals(2, factoryTest.getPids().size());
+
+ // step 2a. modify default instance & add another instance
+ writer = readConfiguration();
+ writer.setValue("factoryOptionalMetatype", "one", idAttribute, "timeout", "123");
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // step 2b. wait for updates on default instance
+ dictionary = factoryTest.waitForUpdate("one");
+ assertEquals("instance one timeout", new Long(123), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(10), dictionary.get("minSize"));
+ assertNull(dictionary.get("id"));
+
+ // step 2c. wait for updates on second instance
+ dictionary = factoryTest.waitForUpdate("two");
+ assertEquals("instance one timeout", new Long(100), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(456), dictionary.get("minSize"));
+ assertEquals("two", dictionary.get("id"));
+
+ assertEquals(3, factoryTest.getPids().size());
+
+ // step 3a. delete the default instance
+ writer = readConfiguration();
+ writer.deleteConfig("factoryOptionalMetatype", "one", idAttribute, false);
+ writeConfiguration(writer);
+
+ // step 3a. wait for the update
+ dictionary = factoryTest.waitForUpdate("one");
+ assertNull("default instance deleted", dictionary);
+
+ assertEquals(3, factoryTest.getPids().size());
+
+ // step 4a. add a new default instance & update the second instance
+ writer = readConfiguration();
+ writer.addConfig("");
+ writer.setValue("factoryOptionalMetatype", "two", idAttribute, "timeout", "789");
+ writeConfiguration(writer);
+
+ // step 4b. wait for updates on the default instance
+ dictionary = factoryTest.waitForUpdate("three");
+ assertEquals("instance one timeout", new Long(222), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(111), dictionary.get("minSize"));
+ assertNull(dictionary.get("id"));
+
+ // step 4c. wait for updates on the two instance
+ dictionary = factoryTest.waitForUpdate("two");
+ assertEquals("instance one timeout", new Long(789), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(456), dictionary.get("minSize"));
+ assertEquals("two", dictionary.get("id"));
+
+ assertEquals(4, factoryTest.getPids().size());
+
+ // step 5a. delete two & three, update four
+ writer = readConfiguration();
+ writer.deleteConfig("factoryOptionalMetatype", "two", idAttribute, false);
+ writer.deleteConfig("factoryOptionalMetatype", "three", idAttribute, false);
+ writer.setValue("factoryOptionalMetatype", "four", idAttribute, "timeout", "6000");
+ writeConfiguration(writer);
+
+ // step 5b. wait for updates
+ dictionary = factoryTest.waitForUpdate("two");
+ assertEquals("instance 2 deleted", null, dictionary);
+
+ // step 5c. wait for updates
+ dictionary = factoryTest.waitForUpdate("three");
+ assertEquals("instance 2 deleted", null, dictionary);
+
+ // step 5d. wait for updates
+ dictionary = factoryTest.waitForUpdate("four");
+ assertEquals("instance one timeout", new Long(6000), dictionary.get("timeout"));
+ assertEquals("instance one minSize", new Integer(10), dictionary.get("minSize"));
+ assertNull(dictionary.get("id"));
+
+ assertEquals(4, factoryTest.getPids().size());
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/AttributeCopyTestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/AttributeCopyTestRunner.java
new file mode 100755
index 00000000000..b80a7a5dad8
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/AttributeCopyTestRunner.java
@@ -0,0 +1,255 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config.nested;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.Dictionary;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryTest;
+
+/**
+ *
+ */
+public class AttributeCopyTestRunner extends BaseTestRunner {
+
+ String parentName = "com.ibm.ws.config.attributeCopy";
+ String childName = "com.ibm.ws.config.attributeCopy.child";
+ String child2Name = "com.ibm.ws.config.attributeCopy.grandchild";
+ String subTypeName = "com.ibm.ws.config.attributeCopy.subType";
+
+ private FactoryTest parent;
+ private FactoryTest child;
+ private FactoryTest child2;
+ private FactoryTest subType;
+
+ private ConfigurationAdmin configAdmin;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/attribute-copy", new TestDynamicConfigServlet(), null, null);
+
+ this.parent = new FactoryTest(parentName);
+ this.child = new FactoryTest(childName);
+ this.child2 = new FactoryTest(child2Name);
+ this.subType = new FactoryTest(subTypeName);
+
+ addTest(parent);
+ addTest(child);
+ addTest(child2);
+ addTest(subType);
+
+ BundleContext bundleContext = context.getBundleContext();
+ ServiceReference> ref = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
+ this.configAdmin = (ConfigurationAdmin) bundleContext.getService(ref);
+ }
+
+ public void testSimpleAttributeCopy() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ resetFactoryTests();
+
+ /*
+ *
+ */
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+ assertEquals("Bob", dictionary.get("copiedName"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("copyTest", "a", false);
+ writeConfiguration(writer);
+ }
+ }
+
+ public void testSimpleAttributeCopyArray() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ resetFactoryTests();
+
+ /*
+ *
+ */
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+ String[] hobbies = (String[]) dictionary.get("hobbies");
+ assertTrue("copiedHobbies should be the same as hobbies", Arrays.equals(hobbies, (String[]) dictionary.get("copiedHobbies")));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("copyTest", "a", false);
+ writeConfiguration(writer);
+ }
+ }
+
+ public void testNestedAttributeCopy() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ resetFactoryTests();
+
+ /*
+ *
+ *
+ *
+ */
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("" +
+ "" +
+ "");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+ assertEquals("Bob", dictionary.get("copiedName"));
+ assertEquals("Eleanor", dictionary.get("copiedChild"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("copyTest", "a", false);
+ writeConfiguration(writer);
+ }
+ }
+
+ public void testDoubleNestedAttributeCopy() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ resetFactoryTests();
+
+ /*
+ *
+ *
+ *
+ *
+ *
+ */
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("" +
+ "" +
+ "" +
+ "" +
+ "");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+ assertEquals("Bob", dictionary.get("copiedName"));
+ assertEquals("Eleanor", dictionary.get("copiedChild"));
+ assertEquals("Ringo", dictionary.get("copiedGrandchild"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("copyTest", "a", false);
+ writeConfiguration(writer);
+ }
+ }
+
+ public void testExtendsAttributeCopy() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ resetFactoryTests();
+
+ /*
+ *
+ */
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = subType.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+ assertEquals("subType value", dictionary.get("value"));
+ assertEquals("subType value", dictionary.get("valueCopy"));
+ assertEquals("supertype name", dictionary.get("name"));
+ assertEquals("supertype name", dictionary.get("nameCopy"));
+ assertEquals("supertype name", dictionary.get("superNameCopy"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("acSubType", "a", false);
+ writeConfiguration(writer);
+ }
+ }
+
+ /**
+ * Reset factories to avoid test contamination
+ */
+ private void resetFactoryTests() {
+ parent.reset();
+ child.reset();
+ child2.reset();
+ subType.reset();
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/ChildFirstExtendsTestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/ChildFirstExtendsTestRunner.java
new file mode 100755
index 00000000000..83e7bb3556b
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/ChildFirstExtendsTestRunner.java
@@ -0,0 +1,140 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config.nested;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.Dictionary;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryTest;
+
+/**
+ *
+ */
+public class ChildFirstExtendsTestRunner extends BaseTestRunner {
+
+ String parentName = "com.ibm.example.topLevelElement";
+ String childName = "com.ibm.example.child.a";
+ String child2Name = "com.ibm.example.child.b";
+ String child3Name = "com.ibm.example.child.c";
+ String topName = "com.ibm.example.top.d";
+ String abstractName = "com.ibm.example.supertype";
+
+ private FactoryTest parent;
+ private FactoryTest child;
+ private FactoryTest child2;
+ private FactoryTest child3;
+ private FactoryTest top;
+
+ private ConfigurationAdmin configAdmin;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/child-first-extends", new TestDynamicConfigServlet(), null, null);
+
+ this.parent = new FactoryTest(parentName);
+ this.child = new FactoryTest(childName);
+ this.child2 = new FactoryTest(child2Name);
+ this.child3 = new FactoryTest(child3Name);
+ this.top = new FactoryTest(topName);
+
+ addTest(parent);
+ addTest(child);
+ addTest(child2);
+ addTest(child3);
+ addTest(top);
+
+ BundleContext bundleContext = context.getBundleContext();
+ ServiceReference> ref = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
+ this.configAdmin = (ConfigurationAdmin) bundleContext.getService(ref);
+ }
+
+ public void testChildFirstExtends() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ resetFactoryTests();
+
+ /*
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("" +
+ "" +
+ "");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+
+ dictionary = child.waitForUpdate("child.a");
+ assertEquals("a1", dictionary.get("attrA1"));
+ assertEquals("The child should inherit from the supertype", "value", dictionary.get("commonAttribute"));
+
+ Configuration[] superTypes = configAdmin.listConfigurations("(service.factoryPid=" + abstractName + ")");
+ assertNotNull(superTypes);
+ assertEquals(1, superTypes.length);
+ dictionary = superTypes[0].getProperties();
+ assertEquals("value", dictionary.get("commonAttribute"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("topLevelElement", "a", false);
+ writeConfiguration(writer);
+ }
+ }
+
+ /**
+ * Reset factories to avoid test contamination
+ */
+ private void resetFactoryTests() {
+ parent.reset();
+ child.reset();
+ child2.reset();
+ child3.reset();
+ top.reset();
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/HiddenTestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/HiddenTestRunner.java
new file mode 100755
index 00000000000..14b340927b7
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/HiddenTestRunner.java
@@ -0,0 +1,320 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config.nested;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+
+import java.util.Dictionary;
+
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryTest;
+
+/**
+ *
+ */
+public class HiddenTestRunner extends BaseTestRunner {
+ private final String grandparentName = "test.config.hidden.grandparent";
+ private final String parentName = "test.config.hidden.parent";
+ private final String childName = "test.config.hidden.child";
+ private final String childExtended = "test.config.hidden.child.extended";
+
+ private FactoryTest grandparent;
+ private FactoryTest parent;
+ private FactoryTest child;
+ private FactoryTest extendedChild;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/hidden-test", new TestDynamicConfigServlet(), null, null);
+
+ this.grandparent = new FactoryTest(grandparentName);
+ this.parent = new FactoryTest(parentName);
+ this.child = new FactoryTest(childName);
+ this.extendedChild = new FactoryTest(childExtended);
+
+ addTest(grandparent);
+ addTest(parent);
+ addTest(child);
+ addTest(extendedChild);
+ }
+
+ public void testHiddenChildWithExtends() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ grandparent.reset();
+ parent.reset();
+ extendedChild.reset();
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("" +
+ " " +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = grandparent.waitForUpdate("grandparent");
+ assertEquals("name should be \"hidden grandparent\"",
+ "hidden grandparent", dictionary.get("name"));
+
+ dictionary = parent.waitForUpdate("parent");
+ assertEquals("name should be \"hidden parent\"",
+ "hidden parent", dictionary.get("name"));
+
+ dictionary = extendedChild.waitForUpdate("child");
+ assertEquals("The name for the child should be I am an extended element", "I am an extended element", dictionary.get("name"));
+ assertEquals("The child should inherit from the supertype", "inheritedProperty", dictionary.get("abstractProperty"));
+
+ // *** STEP 2 ***
+ // Update child
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writer.addConfig("" +
+ " " +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ dictionary = extendedChild.waitForUpdate("child");
+ assertEquals("The child name should be Updated extended element", "Updated extended element", dictionary.get("name"));
+
+ // Check that the parent dictionary isn't updated
+ assertFalse("There should not be an update to the parent", parent.hasDictionary("parent"));
+
+ // Check that the grandparent dictionary isn't updated
+ assertFalse("There should not be an update to the grandparent", grandparent.hasDictionary("grandparent"));
+
+ // *** STEP 3 ***
+ // Update parent
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writer.addConfig("" +
+ " " +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // Check that the child wasn't updated
+ assertFalse("The child should not be updated", extendedChild.hasDictionary("child"));
+
+ // Check parent update
+ dictionary = parent.waitForUpdate("parent");
+ assertEquals("name should be \"hidden parent updated\"",
+ "hidden parent updated", dictionary.get("name"));
+
+ // Check grandparent update
+ dictionary = grandparent.waitForUpdate("grandparent");
+ assertEquals("name should be \"hidden grandparent\"",
+ "hidden grandparent", dictionary.get("name"));
+
+ // *** STEP 4 ***
+ // Delete child -- This should not result in an update to the parent
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writer.addConfig("" +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // Check that the child was deleted
+ assertNull("The child dictionary should be null", extendedChild.waitForUpdate("child"));
+
+ // Check that the parent dictionary isn't updated
+ assertFalse("There should not be an update to the parent", parent.hasDictionary("parent"));
+
+ // Check that the grandparent dictionary isn't updated
+ assertFalse("There should not be an update to the grandparent", grandparent.hasDictionary("grandparent"));
+
+ // *** STEP 5 ***
+ // Put the child back -- This should not result in an update to the parent
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writer.addConfig("" +
+ " " +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // Check that the child was updated
+ dictionary = extendedChild.waitForUpdate("child");
+ assertEquals("The name for the child should be Returned extended element", "Returned extended element", dictionary.get("name"));
+ assertEquals("The child should inherit from the supertype", "inheritedProperty", dictionary.get("abstractProperty"));
+
+ // Check that the parent dictionary isn't updated
+ assertFalse("There should not be an update to the parent", parent.hasDictionary("parent"));
+
+ // Check that the grandparent dictionary isn't updated
+ assertFalse("There should not be an update to the grandparent", grandparent.hasDictionary("grandparent"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writeConfiguration(writer);
+ try {
+ grandparent.waitForUpdate("grandparent");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ // We don't care. Just waiting to make sure server update has gone through. If something went wrong earlier, that might not happen.
+ }
+ }
+ }
+
+ public void testHiddenChild() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+
+ // Reset to avoid contamination
+ grandparent.reset();
+ parent.reset();
+ child.reset();
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("" +
+ " " +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = grandparent.waitForUpdate("grandparent");
+ assertEquals("name should be \"hidden grandparent\"",
+ "hidden grandparent", dictionary.get("name"));
+
+ dictionary = parent.waitForUpdate("parent");
+ assertEquals("name should be \"hidden parent\"",
+ "hidden parent", dictionary.get("name"));
+
+ dictionary = child.waitForUpdate("child");
+ assertEquals("The name for the child should be I am stealthy!", "I am stealthy!", dictionary.get("name"));
+
+ // *** STEP 2 ***
+ // Update child
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writer.addConfig("" +
+ " " +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ dictionary = child.waitForUpdate("child");
+ assertEquals("The child name should be You can't see me.", "You can't see me.", dictionary.get("name"));
+
+ // Check that the parent dictionary isn't updated
+ assertFalse("There should not be an update to the parent", parent.hasDictionary("parent"));
+
+ // Check that the grandparent dictionary isn't updated
+ assertFalse("There should not be an update to the grandparent", grandparent.hasDictionary("grandparent"));
+
+ // *** STEP 3 ***
+ // Update parent
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writer.addConfig("" +
+ " " +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // Check that the child wasn't updated
+ assertFalse("The child should not be updated", child.hasDictionary("child"));
+
+ // Check parent update
+ dictionary = parent.waitForUpdate("parent");
+ assertEquals("name should be \"hidden parent updated\"",
+ "hidden parent updated", dictionary.get("name"));
+
+ // Check grandparent update
+ dictionary = grandparent.waitForUpdate("grandparent");
+ assertEquals("name should be \"hidden grandparent\"",
+ "hidden grandparent", dictionary.get("name"));
+
+ // *** STEP 4 ***
+ // Delete child -- This should not result in an update to the parent
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writer.addConfig("" +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // Check that the child wasn't updated
+ assertNull("The child dictionary should be null", child.waitForUpdate("child"));
+
+ // Check that the parent dictionary isn't updated
+ assertFalse("There should not be an update to the parent", parent.hasDictionary("parent"));
+
+ // Check that the grandparent dictionary isn't updated
+ assertFalse("There should not be an update to the grandparent", grandparent.hasDictionary("grandparent"));
+
+ // *** STEP 5 ***
+ // Put the child back -- This should not result in an update to the parent
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writer.addConfig("" +
+ " " +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // Check that the child was updated
+ dictionary = child.waitForUpdate("child");
+ assertEquals("The name for the child should be I'm back!", "I'm back!", dictionary.get("name"));
+
+ // Check that the parent dictionary isn't updated
+ assertFalse("There should not be an update to the parent", parent.hasDictionary("parent"));
+
+ // Check that the grandparent dictionary isn't updated
+ assertFalse("There should not be an update to the grandparent", grandparent.hasDictionary("grandparent"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("grandparentOfHiddenElement", "grandparent", false);
+ writeConfiguration(writer);
+ try {
+ grandparent.waitForUpdate("grandparent");
+ parent.waitForUpdate("parent");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ // We don't care. Just waiting to make sure server update has gone through. If something went wrong earlier, that might not happen.
+ }
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedDefaultsTestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedDefaultsTestRunner.java
new file mode 100755
index 00000000000..666503ac363
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedDefaultsTestRunner.java
@@ -0,0 +1,117 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config.nested;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.Dictionary;
+import java.util.Vector;
+
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryTest;
+
+import com.ibm.ws.config.xml.internal.XMLConfigConstants;
+
+public class NestedDefaultsTestRunner extends BaseTestRunner {
+
+ private final String parentName = "test.config.nested.defaults";
+ private FactoryTest parent;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/nested-defaults-test", new TestDynamicConfigServlet(), null, null);
+
+ this.parent = new FactoryTest(parentName);
+ addTest(parent);
+ }
+
+ public void testRemoveAttribute() throws Exception {
+ testNestedDefaults("cardPos");
+ }
+
+ public void testRemoveAttributeNegativeCardinality() throws Exception {
+ testNestedDefaults("cardNeg");
+ }
+
+ public void testRemoveAttributeZeroCardinality() throws Exception {
+ testNestedDefaults("cardZero");
+ }
+
+ private void testNestedDefaults(String childName) throws Exception {
+
+ Dictionary dictionary;
+ ConfigWriter writer;
+ String[] pids = new String[] {};
+
+ try {
+ parent.reset();
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("<{0} id=\"parent\" someAttribute=\"empty attributes test\">" +
+ " <{1} hello=\"hello\" enabled=\"true\"/>" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate("parent");
+ assertEquals("someAttribute should be \"empty attributes test\"",
+ "empty attributes test", dictionary.get("someAttribute"));
+
+ // *** STEP 2 ***
+ // Remove attribute from child
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, "parent", false);
+ writer.addConfig("<{0} id=\"parent\" someAttribute=\"empty attributes test\">" +
+ " <{1}/>" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ dictionary = parent.waitForUpdate("parent");
+ assertEquals("someAttribute should be \"empty attributes test\"",
+ "empty attributes test", dictionary.get("someAttribute"));
+
+ Object children = dictionary.get(childName);
+ if (children instanceof String) {
+ pids = new String[] { (String) children };
+ } else if (children instanceof Vector) {
+ Vector v = (Vector) children;
+ pids = v.toArray(pids);
+ } else {
+ pids = (String[]) dictionary.get(childName);
+ }
+
+ assertNotNull("There should be a child element", pids);
+ assertEquals("There should be only one child element", 1, pids.length);
+
+ Configuration childConfig = configAdmin.getConfiguration(pids[0]);
+
+ assertEquals("Enabled attribute should be true", Boolean.TRUE, childConfig.getProperties().get("enabled"));
+ assertNull("The attribute hello should be null", childConfig.getProperties().get("hello"));
+ assertEquals("The parent's child pid should equal the child's service.pid value", pids[0], childConfig.getProperties().get(XMLConfigConstants.CFG_SERVICE_PID));
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, "parent", false);
+ writeConfiguration(writer);
+ }
+
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedMergeRulesTestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedMergeRulesTestRunner.java
new file mode 100755
index 00000000000..4c907ea98e8
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedMergeRulesTestRunner.java
@@ -0,0 +1,595 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config.nested;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.http.HttpService;
+
+import com.ibm.wsspi.kernel.service.location.WsLocationAdmin;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryTest;
+
+/**
+ *
+ */
+@Component(service = NestedMergeRulesTestRunner.class,
+ name = "test.server.config.nestedMergeRules",
+ immediate = true,
+ property = { "service.vendor=IBM" })
+public class NestedMergeRulesTestRunner extends BaseTestRunner {
+
+ private FactoryTest parentFactoryONE;
+ private FactoryTest parentFactoryMULTIPLE;
+
+ private static final String parentName = "test.nestedmerge.parent";
+
+ private static final String XML_NEW_LINE = "\r\n";
+
+ private ConfigWriter writer;
+
+ private ConfigurationAdmin configAdmin;
+
+ @Override
+ @Reference(name = "locationService", service = WsLocationAdmin.class)
+ protected void setLocationService(WsLocationAdmin ref) {
+ this.locationService = ref;
+ }
+
+ @Override
+ protected void unsetLocationService(WsLocationAdmin ref) {
+ if (ref == this.locationService) {
+ this.locationService = null;
+ }
+ }
+
+ @Override
+ @Reference(name = "http", service = HttpService.class)
+ protected void setHttp(HttpService ref) {
+ this.http = ref;
+ }
+
+ @Override
+ protected void unsetHttp(HttpService ref) {
+ if (ref == this.http) {
+ this.http = null;
+ }
+ }
+
+ @Override
+ @Activate
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/nested-merge-rules", new TestDynamicConfigServlet(), null, null);
+
+ this.parentFactoryONE = new FactoryTest(parentName + ".ONE");
+ this.parentFactoryMULTIPLE = new FactoryTest(parentName + ".MULTIPLE");
+ addTest(parentFactoryONE);
+ addTest(parentFactoryMULTIPLE);
+
+ BundleContext bundleContext = context.getBundleContext();
+ ServiceReference> ref = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
+ this.configAdmin = (ConfigurationAdmin) bundleContext.getService(ref);
+
+ }
+
+ private static class Child {
+
+ Map attributes = new HashMap();
+
+ void addAttribute(String name, String value) {
+ attributes.put(name, value);
+ }
+
+ void validateAttributes(Dictionary values) {
+ for (Map.Entry entry : attributes.entrySet()) {
+ if (!"id".equals(entry.getKey())) {
+ assertEquals(entry.getValue(), values.get(entry.getKey()));
+ }
+ }
+ }
+
+ protected String getAlias() {
+ return "child";
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append('<');
+ builder.append(getAlias());
+ for (Map.Entry entry : attributes.entrySet()) {
+ builder.append(' ');
+ builder.append(entry.getKey());
+ builder.append('=');
+ builder.append('"');
+ builder.append(entry.getValue());
+ builder.append('"');
+ }
+ builder.append("/>");
+ return builder.toString();
+ }
+
+ /**
+ * @return
+ */
+ protected String getId() {
+ return attributes.get("id");
+ }
+
+ }
+
+ private static class DefaultChild extends Child {
+ @Override
+ protected String getAlias() {
+ return "defaultChild";
+ }
+
+ @Override
+ protected String getId() {
+ return "childId";
+ }
+ }
+
+ private class Parent {
+ List children = new ArrayList();
+ private final String id;
+ private final Cardinality cardinality;
+ private final String parentAliasName;
+
+ public Parent(String id, Cardinality cardinality) {
+ this.id = id;
+ this.cardinality = cardinality;
+ parentAliasName = "nmrParent." + cardinality;
+ }
+
+ void addChild(Child child) {
+ children.add(child);
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ void validateAttributes(Dictionary values, Result expected) throws IOException {
+ assertEquals("id should be " + getId(),
+ getId(), values.get("id"));
+
+ validateChildren(values, expected);
+
+ }
+
+ void validateChildren(Dictionary values, Result expected) throws IOException {
+ String childAliasName = "child";
+ Object childValue = values.get(childAliasName);
+ assertNotNull(childValue);
+
+ if (expected.getNumberOfChildren() == 1) {
+ if (cardinality == Cardinality.ONE) {
+ assertTrue("There should be one child pid", childValue instanceof String);
+ validateSingleChild((String) childValue);
+ } else {
+ assertEquals("There should be one child pid", 1, ((String[]) childValue).length);
+ validateChildren((String[]) childValue);
+ }
+ } else {
+ String[] childValues = (String[]) childValue;
+ assertEquals("The number of children should equal the number of evaluated pids",
+ expected.getNumberOfChildren(), childValues.length);
+ validateChildren(childValues);
+ }
+
+ }
+
+ /**
+ * @param childValue
+ * @throws IOException
+ */
+ private void validateChildren(String[] childValues) throws IOException {
+ for (String pid : childValues) {
+ Configuration cfg = configAdmin.getConfiguration(pid);
+ Dictionary dictionary = cfg.getProperties();
+ Child child = getChild(dictionary);
+ child.validateAttributes(dictionary);
+ }
+
+ }
+
+ /**
+ * @param object
+ * @return
+ */
+ private Child getChild(Dictionary dictionary) {
+ String id = (String) dictionary.get("id");
+ if (id == null) {
+ return null;
+ } else {
+ for (Child child : children) {
+ if (id.equals(child.getId())) {
+ return child;
+ } else if (id.contains("default-")) {
+ Enumeration keys = dictionary.keys();
+ String key = keys.nextElement();
+ if ("id".equals(key))
+ key = keys.nextElement();
+ if (child.attributes.containsKey(key))
+ return child;
+ }
+ }
+ return null;
+ }
+ }
+
+ /**
+ * @param childValue
+ * @throws IOException
+ */
+ private void validateSingleChild(String childValue) throws IOException {
+ Configuration cfg = configAdmin.getConfiguration(childValue);
+ for (Child child : children) {
+ child.validateAttributes(cfg.getProperties());
+ }
+
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append('<');
+ builder.append(parentAliasName);
+ builder.append(" id=");
+ builder.append('"');
+ builder.append(id);
+ builder.append('"');
+ builder.append('>');
+
+ for (Child child : children) {
+ builder.append(XML_NEW_LINE);
+ builder.append(child);
+ }
+ builder.append(XML_NEW_LINE);
+ builder.append('<');
+ builder.append('/');
+ builder.append(parentAliasName);
+ builder.append('>');
+ return builder.toString();
+ }
+
+ public void addChildren(Child... children) {
+ for (Child child : children) {
+ addChild(child);
+ }
+ }
+
+ /**
+ *
+ */
+ public void write() throws Exception {
+ writer = readConfiguration();
+ writer.addConfig(toString());
+ writeConfiguration(writer);
+ }
+
+ public void delete(Result expected) throws Exception {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig(parentAliasName, getId(), false);
+ writeConfiguration(writer);
+ if (expected.shouldSucceed())
+ assertNull(getFactory().waitForUpdate(getId()));
+ else
+ assertFalse(getFactory().hasDictionary(getId()));
+
+ }
+
+ /**
+ * @throws IOException
+ *
+ */
+ public void validate(Result expected) throws IOException {
+ if (expected.shouldSucceed()) {
+ Dictionary dictionary = getFactory().waitForUpdate(getId());
+ validateAttributes(dictionary, expected);
+ } else {
+ assertFalse(getFactory().hasDictionary(getId()));
+ }
+ }
+
+ /**
+ * @return
+ */
+ private FactoryTest getFactory() {
+ if (cardinality == Cardinality.ONE)
+ return parentFactoryONE;
+ else
+ return parentFactoryMULTIPLE;
+ }
+
+ /**
+ *
+ */
+ public void test(Result result) throws Exception {
+
+ try {
+ clean();
+ write();
+ validate(result);
+ } finally {
+ delete(result);
+ }
+
+ }
+
+ /**
+ *
+ */
+ private void clean() {
+ parentFactoryONE.reset();
+ parentFactoryMULTIPLE.reset();
+ }
+ }
+
+ /**
+ * Multiple children with null IDs should be merged when cardinality is zero
+ */
+ public void testNullIDsCardinalityZero() throws Exception {
+
+ Parent parent = new Parent("parent", Cardinality.ONE);
+ Child c1 = new Child();
+ c1.addAttribute("attr1", "a1");
+ Child c2 = new Child();
+ c2.addAttribute("attr2", "a2");
+ parent.addChildren(c1, c2);
+
+ Result r = new Result(true, 1);
+ parent.test(r);
+
+ }
+
+ /**
+ * Multiple children with distinct IDs should be merged. This makes no sense to me whatsoever, but it was the
+ * resolution of the design issue.
+ *
+ * @throws Exception
+ */
+ public void testMultipleIDsCardinalityZero() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.ONE);
+ Child c1 = new Child();
+ c1.addAttribute("id", "id1");
+ c1.addAttribute("attr1", "a1");
+ Child c2 = new Child();
+ c2.addAttribute("id", "id2");
+ c2.addAttribute("attr2", "a2");
+ parent.addChildren(c1, c2);
+
+ Result r = new Result(true, 1);
+ parent.test(r);
+ }
+
+ /**
+ * Multiple children with the same ID should be merged when cardinality is zero.
+ *
+ * @throws Exception
+ */
+ public void testSingleIDCardinalityZero() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.ONE);
+ Child c1 = new Child();
+ c1.addAttribute("id", "id1");
+ c1.addAttribute("attr1", "a1");
+ Child c2 = new Child();
+ c2.addAttribute("id", "id1");
+ c2.addAttribute("attr2", "a2");
+ parent.addChildren(c1, c2);
+
+ Result r = new Result(true, 1);
+ parent.test(r);
+ }
+
+ /**
+ * Multiple distinct IDs with multiple cardinality should result in multiple children.
+ *
+ * @throws Exception
+ */
+ public void testMultipleIDsCardinalityMultiple() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.MULTIPLE);
+ Child c1 = new Child();
+ c1.addAttribute("id", "id1");
+ c1.addAttribute("attr1", "a1");
+ Child c2 = new Child();
+ c2.addAttribute("id", "id2");
+ c2.addAttribute("attr2", "a2");
+ parent.addChildren(c1, c2);
+
+ Result r = new Result(true, 2);
+ parent.test(r);
+ }
+
+ /**
+ * Multiple null IDs with multiple cardinality should result in multiple children.
+ *
+ * @throws Exception
+ */
+ public void testNullIDsCardinalityMultiple() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.MULTIPLE);
+ Child c1 = new Child();
+ c1.addAttribute("attr1", "a1");
+ Child c2 = new Child();
+ c2.addAttribute("attr2", "a2");
+ parent.addChildren(c1, c2);
+
+ Result r = new Result(true, 2);
+ parent.test(r);
+ }
+
+ /**
+ * Multiple children with the same ID should result in one merged element
+ *
+ * @throws Exception
+ */
+ public void testSingleIDCardinalityMultiple() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.MULTIPLE);
+ Child c1 = new Child();
+ c1.addAttribute("id", "id1");
+ c1.addAttribute("attr1", "a1");
+ Child c2 = new Child();
+ c2.addAttribute("id", "id1");
+ c2.addAttribute("attr2", "a2");
+ parent.addChildren(c1, c2);
+
+ Result r = new Result(true, 1);
+ parent.test(r);
+ }
+
+ public void testMixedIDsCardinalityMultiple() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.MULTIPLE);
+ Child c1 = new Child();
+ c1.addAttribute("id", "id1");
+ c1.addAttribute("attr1", "a1");
+
+ Child c2 = new Child();
+ c2.addAttribute("id", "id1");
+ c2.addAttribute("attr2", "a2");
+
+ Child c3 = new Child();
+ c3.addAttribute("id", "id2");
+ c3.addAttribute("attr1", "b1");
+
+ parent.addChildren(c1, c2, c3);
+
+ Result r = new Result(true, 2);
+ parent.test(r);
+ }
+
+ public void testMultipleParentsNullIDsCardinalityZero() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.ONE);
+ Child c1 = new Child();
+ c1.addAttribute("attr1", "a1");
+ parent.addChild(c1);
+
+ Parent parent2 = new Parent("parent2", Cardinality.ONE);
+ Child c2 = new Child();
+ c2.addAttribute("attr2", "a2");
+ parent2.addChild(c2);
+
+ Result r = new Result(true, 1);
+ parent.test(r);
+ parent2.test(r);
+ }
+
+ public void testMultipleParentsSingleIDCardinalityZero() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.ONE);
+ Child c1 = new Child();
+ c1.addAttribute("id", "id1");
+ c1.addAttribute("attr1", "a1");
+ parent.addChild(c1);
+
+ Parent parent2 = new Parent("parent2", Cardinality.ONE);
+ Child c2 = new Child();
+ c2.addAttribute("id", "id1");
+ c2.addAttribute("attr2", "a2");
+ parent2.addChild(c2);
+
+ Result r = new Result(true, 1);
+ parent.test(r);
+ parent2.test(r);
+ }
+
+ public void testMultipleParentsMixedIDsCardinalityMultiple() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.MULTIPLE);
+ Parent parent2 = new Parent("parent2", Cardinality.MULTIPLE);
+
+ Child c1 = new Child();
+ c1.addAttribute("id", "id1");
+ c1.addAttribute("attr1", "a1");
+
+ Child c2 = new Child();
+ c2.addAttribute("id", "id1");
+ c2.addAttribute("attr2", "a2");
+
+ Child c3 = new Child();
+ c3.addAttribute("id", "id2");
+ c3.addAttribute("attr1", "b1");
+
+ parent.addChildren(c1, c2, c3);
+
+ Child c4 = new Child();
+ c4.addAttribute("id", "id1");
+ c4.addAttribute("attr4", "a4");
+
+ Child c5 = new Child();
+ c5.addAttribute("id", "id2");
+ c5.addAttribute("attr5", "attr5");
+
+ parent2.addChildren(c4, c5);
+
+ Result r = new Result(true, 2);
+
+ parent.test(r);
+ }
+
+ public void testDefaultIDMerging() throws Exception {
+ Parent parent = new Parent("parent", Cardinality.MULTIPLE);
+ DefaultChild c1 = new DefaultChild();
+ c1.addAttribute("attr1", "a1");
+ DefaultChild c2 = new DefaultChild();
+ c2.addAttribute("attr2", "a2");
+ parent.addChildren(c1, c2);
+
+ Result r = new Result(true, 1);
+ parent.test(r);
+ }
+
+ private static class Result {
+
+ private final int numberOfElements;
+ private final boolean shouldWork;
+
+ public Result(boolean shouldWork, int elements) {
+ this.shouldWork = shouldWork;
+ this.numberOfElements = elements;
+ }
+
+ public boolean shouldSucceed() {
+ return shouldWork;
+ }
+
+ public int getNumberOfChildren() {
+ return numberOfElements;
+ }
+ }
+
+ private static enum Cardinality {
+ ONE, MULTIPLE
+ };
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedSingletonTestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedSingletonTestRunner.java
new file mode 100755
index 00000000000..cd909085bc7
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/NestedSingletonTestRunner.java
@@ -0,0 +1,179 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config.nested;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.SingletonTest;
+
+/**
+ *
+ */
+public class NestedSingletonTestRunner extends BaseTestRunner {
+
+ private SingletonTest child;
+ private final String parentName = "test.config.nested.managed.metatype";
+ private final String parentAlias = "singletonNested";
+ private final String childName = "test.singleton.under.singleton";
+ private final String nestedElementTwo = "resultTwo";
+ private final String singletonElement = "singletonResult";
+ private final String nestedElement = "testResult";
+ private SingletonTest parent;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/nested-singleton-test", new TestDynamicConfigServlet(), null, null);
+
+ this.child = new SingletonTest(childName);
+ this.parent = new SingletonTest(parentName);
+ addTest(child);
+ addTest(parent);
+ }
+
+ public static Map> getMetatypeExpectedProperties() {
+ Map map1 = new HashMap();
+ map1.put("pass", Integer.valueOf(9999));
+ map1.put("fail", Integer.valueOf(7777));
+
+ Map map2 = new HashMap();
+ map2.put("pass", Integer.valueOf(100));
+ map2.put("fail", Integer.valueOf(0));
+
+ Map> expectedProperties = new Hashtable>();
+ expectedProperties.put("one", map1);
+ expectedProperties.put("two", map2);
+
+ return expectedProperties;
+ }
+
+ /*
+ * Test that the initial configuration is parsed and transformed correctly. Moved from TestRunner
+ * because it can be affected by testUpdateReceived(). Both should be called from the same test.
+ */
+ public void testInitialConfiguration() throws Exception {
+ Dictionary properties = parent.waitForUpdate();
+
+ String[] singleton = (String[]) properties.get(singletonElement);
+ if (singleton != null) {
+ Configuration singletonConfig = configAdmin.getConfiguration(singleton[0]);
+ Dictionary singletonProps = singletonConfig.getProperties();
+ String singletonString = (String) singletonProps.get("someString");
+ String[] singletonArray = (String[]) singletonProps.get("someArray");
+ assertEquals("aSingleton", singletonString);
+ assertEquals(3, singletonArray.length);
+ }
+ String[] resultsTwo = (String[]) properties.get(nestedElementTwo);
+ assertNotNull(resultsTwo);
+ assertEquals("There should be three nested results", 3, resultsTwo.length);
+ for (int i = 0; i < resultsTwo.length; i++) {
+ Configuration config = configAdmin.getConfiguration(resultsTwo[i]);
+ Dictionary prop = config.getProperties();
+ String someString = (String) prop.get("someString");
+ String[] someArray = (String[]) prop.get("someArray");
+ if ("notDefault".equals(someString)) {
+ assertEquals(3, someArray.length);
+ } else if ("zzz".equals(someString)) {
+ if (someArray.length == 2) {
+ assertEquals("Incorrect defined value for array", "ten", someArray[0]);
+ assertEquals("Incorrect defined value for array", "eleven", someArray[1]);
+ } else if (someArray.length == 3) {
+ assertEquals("Incorrect default value for array", "four", someArray[0]);
+ assertEquals("Incorrect default value for array", "five", someArray[1]);
+ assertEquals("Incorrect default value for array", "six", someArray[2]);
+ } else {
+ fail("Incorrect number of entries for someArray attribute: " + someArray.length);
+ }
+
+ } else {
+ fail("Incorrect value for attribute someString: " + someString);
+ }
+ }
+
+ String[] testResults = (String[]) properties.get(nestedElement);
+ assertNotNull(testResults);
+ assertEquals(2, testResults.length);
+
+ Map> expectedProperties = getMetatypeExpectedProperties();
+ for (int i = 0; i < testResults.length; i++) {
+ Configuration config = configAdmin.getConfiguration(testResults[i]);
+ Dictionary prop = config.getProperties();
+ String innerName = (String) prop.get("name");
+ Map expectedProps = expectedProperties.remove(innerName);
+ assertNotNull("Unexpected name: " + innerName, expectedProps);
+ for (Map.Entry entry : expectedProps.entrySet()) {
+ assertEquals("property " + entry.getKey() + " mismatch", entry.getValue(), prop.get(entry.getKey()));
+ }
+ }
+
+ assertEquals(0, expectedProperties.size());
+ }
+
+ /**
+ * Make sure a cross bundle nested singleton update causes the ManagedService to be updated
+ *
+ * @throws Exception
+ */
+ public void testUpdateReceived() throws Exception {
+
+ ConfigWriter writer;
+ Dictionary dictionary;
+
+ // *** STEP 1 ***
+ // Clear any previous updates
+ child.reset();
+
+ // Delete any existing elements
+ writer = readConfiguration();
+ boolean updated = writer.deleteConfig(parentName, null, true);
+ updated |= writer.deleteConfig(parentAlias, null, true);
+ if (updated) {
+ // The update check here is just a convenience for debugging. When the test is run, there should
+ // always be an element to delete.
+ writeConfiguration(writer);
+ assertNotNull("Singleton deletion should result in a configuration with all default properties", child.waitForUpdate());
+ }
+
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("<{0} name=\"Jane Doe\">" +
+ " <{1} someString=\"hello\"/>" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+
+ dictionary = child.waitForUpdate();
+ assertEquals("someString should be \"hello\"", "hello", dictionary.get("someString"));
+
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, null, true);
+ writer.deleteConfig(parentAlias, null, true);
+ writeConfiguration(writer);
+ assertNull("Singleton deletion should result in a null dictionary", child.waitForUpdate());
+
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/TestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/TestRunner.java
new file mode 100755
index 00000000000..4a86375e42a
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/nested/TestRunner.java
@@ -0,0 +1,650 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config.nested;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.osgi.framework.Constants;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryNestedTest;
+import test.server.config.dynamic.FactoryTest;
+import test.server.config.dynamic.SingletonTest;
+
+import com.ibm.ws.config.xml.internal.XMLConfigConstants;
+
+public class TestRunner extends BaseTestRunner {
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/nested-config-test", new TestDynamicConfigServlet(), null, null);
+ }
+
+ public void testNested() throws Exception {
+ testNested("test.config.nested.singleton", "test.config.nested.singleton",
+ "test.config.nested.child", "test.config.nested.child");
+ }
+
+ public void testNestedMetatype() throws Exception {
+ testNested("nestedSingleton", "test.config.nested.singleton.metatype",
+ "nestedChildOne", "test.config.nested.child.one.metatype");
+ }
+
+ @SuppressWarnings("unchecked")
+ private void testNested(String parentName, String parentPid, String childName, String childPid) throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+ String[] pids;
+
+ SingletonTest parent = new SingletonTest(parentPid);
+ addTest(parent);
+
+ FactoryNestedTest child = new FactoryNestedTest(childPid);
+ addTest(child);
+
+ // *** STEP 1 ***
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate();
+
+ // *** STEP 2 ***
+ // add first nested child
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, null, false);
+ writer.addConfig("<{0} name=\"myNestedSingleton\">" +
+ " <{1} name=\"myNestedChildOne\" a=\"b\" value=\"10\"/>" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ // parent gets injected with the first child pid
+ dictionary = parent.waitForUpdate();
+ assertEquals("name property", "myNestedSingleton", dictionary.get("name"));
+ String parentServicePid = (String) dictionary.get(XMLConfigConstants.CFG_SERVICE_PID);
+ pids = (String[]) dictionary.get(childName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 1, pids.length);
+ String firstChildPid = pids[0];
+
+ // first child instance is created
+ dictionary = child.waitForUpdate(firstChildPid);
+ assertEquals("name property", "myNestedChildOne", dictionary.get("name"));
+ assertEquals("value property", "10", dictionary.get("value"));
+ assertEquals("a property", "b", dictionary.get("a"));
+
+ assertEquals("Nested Child config.parentPID should be equal to parent's service.pid", parentServicePid,
+ dictionary.get(XMLConfigConstants.CFG_PARENT_PID));
+
+ // *** STEP 3 ***
+ // add second nested child
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, null, false);
+ writer.addConfig("<{0} name=\"myNestedSingleton\">" +
+ " <{1} name=\"myNestedChildOne\" a=\"b\" value=\"10\"/>" +
+ " <{1} name=\"myNestedChildTwo\" b=\"c\" value=\"20\"/>" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ // parent gets injected with the second child pid
+ dictionary = parent.waitForUpdate();
+ assertEquals("name property", "myNestedSingleton", dictionary.get("name"));
+ pids = (String[]) dictionary.get(childName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 2, pids.length);
+ Set pidSet = toSet(pids);
+ assertTrue("first child pid", pidSet.contains(firstChildPid));
+ pidSet.remove(firstChildPid);
+ String secondChildPid = pidSet.iterator().next();
+
+ // second child instance is created
+ dictionary = child.waitForUpdate(secondChildPid);
+ assertEquals("name property", "myNestedChildTwo", dictionary.get("name"));
+ assertEquals("value property", "20", dictionary.get("value"));
+ assertEquals("b property", "c", dictionary.get("b"));
+
+ // *** STEP 4 ***
+ // update second child and remove first
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, null, false);
+ writer.addConfig("<{0} name=\"myNestedSingleton\">" +
+ " <{1} name=\"myNestedChildTwo\" b=\"c\" value=\"40\"/>" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ // parent gets updated with a single pid
+ dictionary = parent.waitForUpdate();
+ assertEquals("name property", "myNestedSingleton", dictionary.get("name"));
+ pids = (String[]) dictionary.get(childName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 1, pids.length);
+
+ String deletedPid = null;
+ String updatedPid = null;
+
+ if (firstChildPid.equals(pids[0])) {
+ updatedPid = firstChildPid;
+ deletedPid = secondChildPid;
+ } else if (secondChildPid.equals(pids[0])) {
+ updatedPid = secondChildPid;
+ deletedPid = firstChildPid;
+ } else {
+ fail("Unexpected child pid: " + pids[0]);
+ }
+
+ // one child instance is removed
+ dictionary = child.waitForUpdate(deletedPid);
+ assertNull("child removed", dictionary);
+
+ // one child instance is updated
+ dictionary = child.waitForUpdate(updatedPid);
+ assertEquals("name property", "myNestedChildTwo", dictionary.get("name"));
+ assertEquals("value property", "40", dictionary.get("value"));
+ assertNull("a property", dictionary.get("a"));
+ assertEquals("b property", "c", dictionary.get("b"));
+
+ // *** STEP 5 ***
+ // delete parent configuration
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, null, false);
+ writeConfiguration(writer);
+
+ // remaining child instance is removed
+ dictionary = child.waitForUpdate(updatedPid);
+ assertNull("child was not removed", dictionary);
+
+ // parent is removed
+ dictionary = parent.waitForUpdate();
+ assertNull("parent was not removed", dictionary);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testNestedReferences() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+ String[] pids;
+
+ String parentName = "test.config.nested.singleton.ref";
+ SingletonTest parent = new SingletonTest(parentName);
+ addTest(parent);
+
+ String childName = "test.config.nested.child.ref.1";
+ FactoryNestedTest child = new FactoryNestedTest(childName);
+ addTest(child);
+
+ // *** STEP 1 ***
+ // wait for the initial configuration to be injected.
+ dictionary = parent.waitForUpdate();
+
+ // *** STEP 2 ***
+ // add first nested child
+ writer = readConfiguration();
+ writer.addConfig("<{0} id=\"1\" name=\"myNestedChildOne\" a=\"b\" value=\"10\"/>", childName);
+ writer.deleteConfig(parentName, null, false);
+ writer.addConfig("<{0} name=\"myNestedSingleton\">" +
+ " <{1} ref=\"1\" />" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ // parent gets injected with the first child pid
+ dictionary = parent.waitForUpdate();
+ assertEquals("name property", "myNestedSingleton", dictionary.get("name"));
+ pids = (String[]) dictionary.get(childName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 1, pids.length);
+ String firstChildPid = pids[0];
+
+ // first child instance is created
+ dictionary = child.waitForUpdate(firstChildPid);
+ assertEquals("name property", "myNestedChildOne", dictionary.get("name"));
+ assertEquals("value property", "10", dictionary.get("value"));
+ assertEquals("a property", "b", dictionary.get("a"));
+
+ // *** STEP 3 ***
+ // add second nested child
+ writer = readConfiguration();
+ writer.addConfig("<{0} id=\"2\" name=\"myNestedChildTwo\" b=\"c\" value=\"20\"/>", childName);
+ writer.deleteConfig(parentName, null, false);
+ writer.addConfig("<{0} name=\"myNestedSingleton\">" +
+ " <{1} ref=\"1\" />" +
+ " <{1} ref=\"2\" />" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ // parent gets injected with the second child pid
+ dictionary = parent.waitForUpdate();
+ assertEquals("name property", "myNestedSingleton", dictionary.get("name"));
+ pids = (String[]) dictionary.get(childName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 2, pids.length);
+ Set pidSet = toSet(pids);
+ assertTrue("first child pid", pidSet.contains(firstChildPid));
+ pidSet.remove(firstChildPid);
+ String secondChildPid = pidSet.iterator().next();
+
+ // second child instance is created
+ dictionary = child.waitForUpdate(secondChildPid);
+ assertEquals("name property", "myNestedChildTwo", dictionary.get("name"));
+ assertEquals("value property", "20", dictionary.get("value"));
+ assertEquals("b property", "c", dictionary.get("b"));
+
+ // *** STEP 4 ***
+ // update second child and remove first
+ writer = readConfiguration();
+ writer.deleteConfig(childName, "1", false);
+ writer.setValue(childName, "2", "value", "40");
+ writeConfiguration(writer);
+
+ // parent gets updated with a single pid
+ dictionary = parent.waitForUpdate();
+ assertEquals("name property", "myNestedSingleton", dictionary.get("name"));
+ pids = (String[]) dictionary.get(childName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 1, pids.length);
+
+ String deletedPid = null;
+ String updatedPid = null;
+
+ if (firstChildPid.equals(pids[0])) {
+ updatedPid = firstChildPid;
+ deletedPid = secondChildPid;
+ } else if (secondChildPid.equals(pids[0])) {
+ updatedPid = secondChildPid;
+ deletedPid = firstChildPid;
+ } else {
+ fail("Unexpected child pid: " + pids[0]);
+ }
+
+ // one child instance is removed
+ dictionary = child.waitForUpdate(deletedPid);
+ assertNull("child removed", dictionary);
+
+ // one child instance is updated
+ dictionary = child.waitForUpdate(updatedPid);
+ assertEquals("name property", "myNestedChildTwo", dictionary.get("name"));
+ assertEquals("value property", "40", dictionary.get("value"));
+ assertNull("a property", dictionary.get("a"));
+ assertEquals("b property", "c", dictionary.get("b"));
+
+ // *** STEP 5 ***
+ // delete parent configuration
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, null, false);
+ writeConfiguration(writer);
+
+ // parent is removed
+ dictionary = parent.waitForUpdate();
+ assertNull("parent was not removed", dictionary);
+
+ // remaining child is still there
+ Configuration[] configs = configAdmin.listConfigurations("(" + Constants.SERVICE_PID + "=" + updatedPid + ")");
+ assertNotNull(configs);
+ assertEquals(1, configs.length);
+ }
+
+ public void testNestedFactoryReferences() throws Exception {
+ testNestedFactoryReferences("test.config.nested.factory.ref", "test.config.nested.factory.ref",
+ "test.config.nested.child.ref.2", "test.config.nested.child.ref.2");
+ }
+
+ public void testNestedMetatypeFactoryReferences() throws Exception {
+ testNestedFactoryReferences("nestedFactory", "test.config.nested.factory.metatype",
+ "nestedChildTwo", "test.config.nested.child.two.metatype");
+ }
+
+ @SuppressWarnings("unchecked")
+ private void testNestedFactoryReferences(String parentName, String parentPid, String childName, String childPid) throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+ String[] pids;
+
+ FactoryTest parent = new FactoryTest(parentPid);
+ addTest(parent);
+
+ FactoryNestedTest child = new FactoryNestedTest(childPid);
+ addTest(child);
+
+ // *** STEP 1 ***
+ // add initial configurations
+ writer = readConfiguration();
+ writer.addConfig("<{0} id=\"1\" name=\"myNestedChildOne\" a=\"b\" value=\"10\"/>", childName);
+ writer.deleteConfig(parentName, null, true);
+ writer.addConfig("<{0} id=\"one\" name=\"myNestedFactoryOne\">" +
+ " <{1} ref=\"1\" />" +
+ "{0}>", parentName, childName);
+ writer.addConfig("<{0} id=\"two\" name=\"myNestedFactoryTwo\">" +
+ " <{1} ref=\"1\" />" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ // parents get injected with the first child pid
+ Dictionary dictionaryOne = parent.waitForUpdate("one");
+ assertEquals("name property", "myNestedFactoryOne", dictionaryOne.get("name"));
+ String[] onePids = (String[]) dictionaryOne.get(childName);
+ assertNotNull("child pids", onePids);
+ assertEquals("child pids", 1, onePids.length);
+
+ Dictionary dictionaryTwo = parent.waitForUpdate("two");
+ assertEquals("name property", "myNestedFactoryTwo", dictionaryTwo.get("name"));
+ String[] twoPids = (String[]) dictionaryTwo.get(childName);
+ assertNotNull("child pids", twoPids);
+ assertEquals("child pids", 1, twoPids.length);
+
+ // both pids should be the same
+ assertEquals("child pids are not the same", onePids[0], twoPids[0]);
+
+ // child "1" is created
+ dictionary = child.waitForUpdate(onePids[0]);
+ assertEquals("name property", "myNestedChildOne", dictionary.get("name"));
+ assertEquals("value property", "10", dictionary.get("value"));
+ assertEquals("a property", "b", dictionary.get("a"));
+
+ // *** STEP 2 ***
+ // add "2" child, modify "1" child, and add reference to "2" child to "one" parent
+ writer = readConfiguration();
+ writer.addConfig("<{0} id=\"2\" name=\"myNestedChildTwo\" b=\"c\" value=\"20\"/>", childName);
+ writer.setValue(childName, "1", "value", "40");
+ writer.deleteConfig(parentName, "one", false);
+ writer.addConfig("<{0} id=\"one\" name=\"myNestedFactoryOne\">" +
+ " <{1} ref=\"1\" />" +
+ " <{1} ref=\"2\" />" +
+ "{0}>", parentName, childName);
+ writeConfiguration(writer);
+
+ // "two" parent should be notified and have no changes
+ dictionary = parent.waitForUpdate("two");
+ dictionaryEquals(dictionaryTwo, dictionary);
+
+ // "one" parent should be notified and have 2 pids
+ dictionary = parent.waitForUpdate("one");
+ assertEquals("name property", "myNestedFactoryOne", dictionary.get("name"));
+ pids = (String[]) dictionary.get(childName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 2, pids.length);
+ Set pidSet = toSet(pids);
+ assertTrue(pidSet.contains(onePids[0]));
+ pidSet.remove(onePids[0]);
+ String child2Pid = pidSet.iterator().next();
+
+ // child "1" is updated
+ dictionary = child.waitForUpdate(onePids[0]);
+ assertEquals("name property", "myNestedChildOne", dictionary.get("name"));
+ assertEquals("value property", "40", dictionary.get("value"));
+ assertEquals("a property", "b", dictionary.get("a"));
+
+ // child "2" is created
+ dictionary = child.waitForUpdate(child2Pid);
+ assertEquals("name property", "myNestedChildTwo", dictionary.get("name"));
+ assertEquals("value property", "20", dictionary.get("value"));
+ assertEquals("b property", "c", dictionary.get("b"));
+
+ // *** STEP 3 ****
+ // delete "1" child
+ writer = readConfiguration();
+ writer.deleteConfig(childName, "1", false);
+ writeConfiguration(writer);
+
+ // child "1" is deleted
+ dictionary = child.waitForUpdate(onePids[0]);
+ assertNull(dictionary);
+
+ // parent "two" has no pids
+ dictionary = parent.waitForUpdate("two");
+ assertEquals("name property", "myNestedFactoryTwo", dictionary.get("name"));
+ assertEquals(Arrays.asList(), Arrays.asList((String[]) dictionary.get(childName)));
+
+ // parent "one" has one pid
+ dictionary = parent.waitForUpdate("one");
+ assertEquals("name property", "myNestedFactoryOne", dictionary.get("name"));
+ pids = (String[]) dictionary.get(childName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 1, pids.length);
+ assertEquals(child2Pid, pids[0]);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testNestedNonUniqueReferences() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+ String[] pids;
+
+ String parentName = "test.config.nested.singleton.1";
+ SingletonTest parent = new SingletonTest(parentName);
+ addTest(parent);
+
+ String childOneName = "test.config.nested.child.ref.3";
+ FactoryNestedTest childOne = new FactoryNestedTest(childOneName);
+ addTest(childOne);
+
+ String childTwoName = "test.config.nested.child.ref.4";
+ FactoryNestedTest childTwo = new FactoryNestedTest(childTwoName);
+ addTest(childTwo);
+
+ dictionary = parent.waitForUpdate();
+
+ // *** STEP 1 ***
+ // add initial configurations - the references use the same id
+ writer = readConfiguration();
+ writer.addConfig("<{0} id=\"1\" name=\"myChildOne\" a=\"b\" value=\"10\"/>", childOneName);
+ writer.addConfig("<{0} id=\"1\" name=\"myChildTwo\" a=\"b\" strValue=\"bob\"/>", childTwoName);
+ writer.deleteConfig(parentName, null, true);
+ writer.addConfig("<{0} name=\"myNestedSingleton\">" +
+ " <{1} ref=\"1\" />" +
+ " <{2} ref=\"1\" />" +
+ "{0}>", parentName, childOneName, childTwoName);
+ writeConfiguration(writer);
+
+ // parent gets injected with the children pids
+ dictionary = parent.waitForUpdate();
+ assertEquals("name property", "myNestedSingleton", dictionary.get("name"));
+
+ pids = (String[]) dictionary.get(childOneName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 1, pids.length);
+ String childOnePid = pids[0];
+
+ pids = (String[]) dictionary.get(childTwoName);
+ assertNotNull("child pids", pids);
+ assertEquals("child pids", 1, pids.length);
+ String childTwoPid = pids[0];
+
+ assertFalse("pids are the same: " + childOnePid, childOnePid.equals(childTwoPid));
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testFactoryOptionalId() throws Exception {
+ ConfigWriter writer;
+
+ FactoryTest parent = new FactoryTest("test.config.nested.factory.optional.metatype", "name");
+ addTest(parent);
+
+ FactoryNestedTest child = new FactoryNestedTest("test.config.nested.factory.optional.child.1");
+ addTest(child);
+
+ FactoryNestedTest childChild = new FactoryNestedTest("test.config.nested.factory.optional.child.2");
+ addTest(childChild);
+
+ String parentName = "nestedOptionalFactory";
+ String firstChildName = "nestedOptionalChildOne";
+ String secondChildName = "nestedOptionalChildTwo";
+
+ // write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("<{0} name=\"myOptionalFactory\">" +
+ " <{1} name=\"myNestedChild\" a=\"b\" value=\"10\">" +
+ " <{2} name=\"myDoubleNestedChild\" threads=\"15\"/>" +
+ " {1}>" +
+ "{0}>", parentName, firstChildName, secondChildName);
+ writeConfiguration(writer);
+
+ // parent get injected with the child
+ Dictionary dictionaryOne = parent.waitForUpdate("myOptionalFactory");
+ assertEquals(Short.valueOf("5"), dictionaryOne.get("poolSize"));
+ String[] onePids = (String[]) dictionaryOne.get(firstChildName);
+ assertNotNull("child pids", onePids);
+ assertEquals("child pids", 1, onePids.length);
+
+ // first child is updated
+ Dictionary dictionaryTwo = child.waitForUpdate(onePids[0]);
+ assertEquals("name property", "myNestedChild", dictionaryTwo.get("name"));
+ assertEquals("value property", "10", dictionaryTwo.get("value"));
+ assertEquals("a property", "b", dictionaryTwo.get("a"));
+ assertEquals(Long.valueOf("5000"), dictionaryTwo.get("idleTime"));
+ String[] twoPids = (String[]) dictionaryTwo.get(secondChildName);
+ assertNotNull("child pids", twoPids);
+ assertEquals("child pids", 1, twoPids.length);
+
+ // second child is updated
+ Dictionary dictionaryThree = childChild.waitForUpdate(twoPids[0]);
+ assertEquals("name property", "myDoubleNestedChild", dictionaryThree.get("name"));
+ assertEquals("value property", "15", dictionaryThree.get("threads"));
+ assertEquals(Integer.valueOf("1000"), dictionaryThree.get("timeout"));
+
+ // update double nested configuration
+ writer = readConfiguration();
+ writer.deleteConfig(parentName, "myOptionalFactory", "name", false);
+ writer.addConfig("<{0} name=\"myOptionalFactory\">" +
+ " <{1} name=\"myNestedChild\" a=\"b\" value=\"10\">" +
+ " <{2} name=\"myDoubleNestedChild\" threads=\"20\"/>" +
+ " {1}>" +
+ "{0}>", parentName, firstChildName, secondChildName);
+ writeConfiguration(writer);
+
+ Dictionary dictionary = null;
+
+ // top parent should be notified of the changes but have no differences
+ dictionary = parent.waitForUpdate("myOptionalFactory");
+ dictionaryEquals(dictionaryOne, dictionary);
+
+ // first child should be notified of the changes but have no differences
+ dictionary = child.waitForUpdate(onePids[0]);
+ dictionaryEquals(dictionaryTwo, dictionary);
+
+ // second child should be notified of the changes
+ dictionary = childChild.waitForUpdate(twoPids[0]);
+ assertEquals("name property", "myDoubleNestedChild", dictionary.get("name"));
+ assertEquals("value property", "20", dictionary.get("threads"));
+ assertEquals(Integer.valueOf("1000"), dictionary.get("timeout"));
+ }
+
+ public static class TimestampFactoryTest extends FactoryTest {
+
+ private long sleep = -1;
+
+ public TimestampFactoryTest(String name) {
+ super(name);
+ }
+
+ public void setSleep(long sleep) {
+ this.sleep = sleep;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public void updated(String pid, Dictionary properties) throws ConfigurationException {
+ properties.put("timestamp", System.currentTimeMillis());
+ if (sleep > 0) {
+ try {
+ Thread.sleep(sleep);
+ } catch (InterruptedException e) {
+ // ignore
+ }
+ }
+ super.updated(pid, properties);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testUpdateOrder() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ TimestampFactoryTest a = new TimestampFactoryTest("test.config.order.a");
+ TimestampFactoryTest b = new TimestampFactoryTest("test.config.order.b");
+ TimestampFactoryTest c = new TimestampFactoryTest("test.config.order.c");
+ TimestampFactoryTest d = new TimestampFactoryTest("test.config.order.d");
+ TimestampFactoryTest e = new TimestampFactoryTest("test.config.order.e");
+
+ addTest(a);
+ addTest(b);
+ addTest(c);
+ addTest(d);
+ addTest(e);
+
+ // *** STEP 1 ***
+ // wait for the initial configuration to be injected.
+ dictionary = a.waitForUpdate("a");
+ assertEquals("a", dictionary.get("name"));
+ dictionary = b.waitForUpdate("b");
+ assertEquals("b", dictionary.get("name"));
+ dictionary = c.waitForUpdate("c");
+ assertEquals("c", dictionary.get("name"));
+ dictionary = d.waitForUpdate("d");
+ assertEquals("d", dictionary.get("name"));
+ dictionary = e.waitForUpdate("e");
+ assertEquals("e", dictionary.get("name"));
+
+ // *** STEP 2 ***
+ // update e and check for updates in right order
+ long timeout = 1000;
+ a.setSleep(timeout);
+ b.setSleep(timeout);
+ c.setSleep(timeout);
+ d.setSleep(timeout);
+ e.setSleep(timeout);
+
+ writer = readConfiguration();
+ writer.setValue("test.config.order.e", "e", "name", "ee");
+ writeConfiguration(writer);
+
+ long aTimeout, bTimeout, cTimeout, dTimeout, eTimeout;
+
+ dictionary = a.waitForUpdate("a");
+ assertEquals("a", dictionary.get("name"));
+ aTimeout = (Long) dictionary.get("timestamp");
+ dictionary = b.waitForUpdate("b");
+ assertEquals("b", dictionary.get("name"));
+ bTimeout = (Long) dictionary.get("timestamp");
+ dictionary = c.waitForUpdate("c");
+ assertEquals("c", dictionary.get("name"));
+ cTimeout = (Long) dictionary.get("timestamp");
+ dictionary = d.waitForUpdate("d");
+ assertEquals("d", dictionary.get("name"));
+ dTimeout = (Long) dictionary.get("timestamp");
+ dictionary = e.waitForUpdate("e");
+ assertEquals("ee", dictionary.get("name"));
+ eTimeout = (Long) dictionary.get("timestamp");
+
+ // expected update order, e, d, c, b, a
+ assertTrue(dTimeout > eTimeout);
+ assertTrue(cTimeout > dTimeout);
+ assertTrue(bTimeout > cTimeout);
+ assertTrue(aTimeout > bTimeout);
+ }
+
+ private static Set toSet(String[] array) {
+ return new HashSet(Arrays.asList(array));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/reference/TestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/reference/TestRunner.java
new file mode 100755
index 00000000000..324c233c618
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/reference/TestRunner.java
@@ -0,0 +1,403 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.config.reference;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.Dictionary;
+import java.util.Vector;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryNestedTest;
+import test.server.config.dynamic.FactoryTest;
+import test.server.config.dynamic.SingletonTest;
+
+public class TestRunner extends BaseTestRunner {
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/reference-config-test", new TestDynamicConfigServlet(), null, null);
+
+ BundleContext bundleContext = context.getBundleContext();
+ ServiceReference> ref = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
+ this.configAdmin = (ConfigurationAdmin) bundleContext.getService(ref);
+
+ }
+
+ public void testTwoReferencesOnePid() throws Exception {
+
+ String id = "testTwoReferencesOnePid";
+
+ FactoryTest parent = new FactoryTest("test.config.reference.parent");
+ addTest(parent);
+
+ ConfigWriter writer = readConfiguration();
+
+ writer.addConfig("" +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ Dictionary dictionary = parent.waitForUpdate(id);
+ assertNotNull(dictionary.get("widget"));
+ assertNotNull(dictionary.get("part"));
+
+ // Update a widget
+
+ writer = readConfiguration();
+ writer.deleteConfig("test.config.reference.parent", id, true);
+ writer.addConfig("" +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ dictionary = parent.waitForUpdate(id);
+ assertNotNull(dictionary.get("widget"));
+ assertNotNull(dictionary.get("part"));
+
+ // Update a part
+ writer = readConfiguration();
+ writer.deleteConfig("test.config.reference.parent", id, true);
+ writer.addConfig("" +
+ " " +
+ " " +
+ "");
+ writeConfiguration(writer);
+
+ // Check that the final configuration is ok
+ dictionary = parent.waitForUpdate(id);
+ String[] widgets = (String[]) dictionary.get("widget");
+ String[] parts = (String[]) dictionary.get("part");
+
+ assertNotNull(widgets);
+ assertNotNull(parts);
+
+ assertEquals(1, widgets.length);
+ assertEquals(1, parts.length);
+
+ String widgetPid = widgets[0];
+ String partPid = parts[0];
+
+ Configuration[] widgetConfigs = configAdmin.listConfigurations("(" + Constants.SERVICE_PID + "=" + widgetPid + ")");
+ Configuration[] partConfigs = configAdmin.listConfigurations("(" + Constants.SERVICE_PID + "=" + partPid + ")");
+ assertNotNull(widgetConfigs);
+ assertNotNull(partConfigs);
+
+ assertEquals("There should be one widget in CA", 1, widgetConfigs.length);
+ assertEquals("There should be one part in CA", 1, partConfigs.length);
+
+ Dictionary widgetDictionary = widgetConfigs[0].getProperties();
+ Dictionary partDictionary = partConfigs[0].getProperties();
+ assertEquals("widget 2", widgetDictionary.get("someProperty"));
+ assertEquals("widget 2", partDictionary.get("someProperty"));
+
+ }
+
+ public void testReferenceAttribute() throws Exception {
+ SingletonTest parent = new SingletonTest("test.config.reference.attribute");
+ addTest(parent);
+
+ FactoryNestedTest child = new FactoryNestedTest("test.config.reference.attribute.child");
+ addTest(child);
+
+ // wait for the initial configuration to be injected.
+ Dictionary parentDictionary = parent.waitForUpdate();
+ assertEquals("version property", "3.0", parentDictionary.get("version"));
+ assertEquals("maxThreads property", Integer.valueOf(100), parentDictionary.get("maxThreads"));
+ String pid = (String) parentDictionary.get("reference");
+ assertNotNull("reference pid", pid);
+
+ // check the child info
+ Dictionary childDictionary = child.waitForUpdate(pid);
+ assertEquals("name property", "one", childDictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(100), childDictionary.get("threads"));
+
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ // STEP 1: update child and check if parent is updated
+ writer = readConfiguration();
+ writer.setValue("childAttributeReference", "ref1", "threads", "500");
+ writeConfiguration(writer);
+
+ // check updated child info
+ dictionary = child.waitForUpdate(pid);
+ assertEquals("name property", "one", dictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(500), dictionary.get("threads"));
+
+ // check parent got updated
+ dictionary = parent.waitForUpdate();
+ dictionaryEquals(parentDictionary, dictionary);
+
+ // STEP 2: delete child and check if parent is updated
+ writer = readConfiguration();
+ writer.deleteConfig("childAttributeReference", "ref1", false);
+ writeConfiguration(writer);
+
+ // check updated child info
+ dictionary = child.waitForUpdate(pid);
+ assertNull(dictionary);
+
+ // check parent got updated
+ dictionary = parent.waitForUpdate();
+ assertEquals("version property", "3.0", dictionary.get("version"));
+ assertEquals("maxThreads property", Integer.valueOf(100), dictionary.get("maxThreads"));
+ assertNull(dictionary.get("reference"));
+
+ // STEP 3: add child back up and check if parent is updated
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ parentDictionary = parent.waitForUpdate();
+ assertEquals("version property", "3.0", parentDictionary.get("version"));
+ assertEquals("maxThreads property", Integer.valueOf(100), parentDictionary.get("maxThreads"));
+ pid = (String) parentDictionary.get("reference");
+ assertNotNull("reference pid", pid);
+
+ // check updated child info
+ dictionary = child.waitForUpdate(pid);
+ assertEquals("name property", "noname", dictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(300), dictionary.get("threads"));
+ }
+
+ public void testReferenceElement() throws Exception {
+
+ SingletonTest parent = new SingletonTest("test.config.reference.element");
+ addTest(parent);
+
+ FactoryNestedTest child = new FactoryNestedTest("test.config.reference.element.child");
+ addTest(child);
+
+ // wait for the initial configuration to be injected.
+ Dictionary parentDictionary = parent.waitForUpdate();
+ assertEquals("version property", "4.0", parentDictionary.get("version"));
+ assertEquals("maxThreads property", Integer.valueOf(200), parentDictionary.get("maxThreads"));
+ // check pids in references
+ String[] pids = (String[]) parentDictionary.get("references");
+ assertNotNull("reference pids", pids);
+ assertEquals("child pids", 4, pids.length);
+ // check pids in referenceList
+ Vector pidList = (Vector) parentDictionary.get("referenceList");
+ assertNotNull("reference pids", pidList);
+ assertEquals("child pids", 4, pidList.size());
+ assertEquals(pids[0], pidList.get(0));
+ assertEquals(pids[1], pidList.get(2));
+ assertEquals(pids[2], pidList.get(1));
+ // check pids in childRef
+ String[] pids2 = (String[]) parentDictionary.get("childRef");
+ assertNotNull(pids2);
+ assertEquals(2, pids2.length);
+ assertEquals(pids[0], pids2[1]);
+ assertEquals(pids[1], pids2[0]);
+ // these elements should not be in the dictionary
+ assertNull(parentDictionary.get("referencesRef"));
+ assertNull(parentDictionary.get("referenceListRef"));
+ assertNull(parentDictionary.get("child"));
+
+ // check the first reference info
+ Dictionary childOneDictionary = child.waitForUpdate(pids[0]);
+ assertEquals("name property", "five", childOneDictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(5), childOneDictionary.get("threads"));
+
+ // check the first reference info
+ Dictionary childTwoDictionary = child.waitForUpdate(pids[1]);
+ assertEquals("name property", "unavailable", childTwoDictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(300), childTwoDictionary.get("threads"));
+
+ // check the second reference info
+ Dictionary childThreeDictionary = child.waitForUpdate(pids[2]);
+ assertEquals("name property", "two", childThreeDictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(200), childThreeDictionary.get("threads"));
+
+ // check the nested reference from "references"
+ Dictionary childFourDictionary = child.waitForUpdate(pids[3]);
+ assertEquals("name property", "nested-one", childFourDictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(5000), childFourDictionary.get("threads"));
+
+ // check the nested reference from "referenceList"
+ Dictionary childFiveictionary = child.waitForUpdate(pidList.get(3));
+ assertEquals("name property", "nested-two", childFiveictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(6000), childFiveictionary.get("threads"));
+
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ // STEP 1: update child and check if parent is updated
+ writer = readConfiguration();
+ writer.setValue("childElementReference", "ref2", "threads", "444");
+ writeConfiguration(writer);
+
+ // check updated child info
+ dictionary = child.waitForUpdate(pids[2]);
+ assertEquals("name property", "two", dictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(444), dictionary.get("threads"));
+
+ // check parent got updated
+ dictionary = parent.waitForUpdate();
+ dictionaryEquals(parentDictionary, dictionary);
+
+ // STEP 2: delete child two and check if parent is updated
+ writer = readConfiguration();
+ writer.deleteConfig("childElementReference", "ref3", false);
+ writeConfiguration(writer);
+
+ // check updated child info
+ dictionary = child.waitForUpdate(pids[1]);
+ assertNull(dictionary);
+
+ // check parent got updated
+ parentDictionary = parent.waitForUpdate();
+ assertEquals("version property", "4.0", parentDictionary.get("version"));
+ assertEquals("maxThreads property", Integer.valueOf(200), parentDictionary.get("maxThreads"));
+ // check pids in references
+ String[] newPids = (String[]) parentDictionary.get("references");
+ assertNotNull("reference pids", newPids);
+ assertEquals("child pids", 3, newPids.length);
+ assertEquals(pids[0], newPids[0]);
+ assertEquals(pids[2], newPids[1]);
+ assertEquals(pids[3], newPids[2]);
+ // check pids in referenceList
+ Vector newPidList = (Vector) parentDictionary.get("referenceList");
+ assertNotNull("reference pids", newPidList);
+ assertEquals("child pids", 3, newPidList.size());
+ assertEquals(pidList.get(0), newPidList.get(0));
+ assertEquals(pids[2], newPidList.get(1));
+ assertEquals(pidList.get(3), newPidList.get(2));
+ // check pids in childRef
+ String[] newPids2 = (String[]) parentDictionary.get("childRef");
+ assertNotNull(newPids2);
+ assertEquals(1, newPids2.length);
+ assertEquals(pids[0], newPids2[0]);
+ // these elements should not be in the dictionary
+ assertNull(parentDictionary.get("referencesRef"));
+ assertNull(parentDictionary.get("referenceListRef"));
+ assertNull(parentDictionary.get("child"));
+
+ // STEP 3: add child two back up and check if parent is updated
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // check parent got updated
+ parentDictionary = parent.waitForUpdate();
+ assertEquals("version property", "4.0", parentDictionary.get("version"));
+ assertEquals("maxThreads property", Integer.valueOf(200), parentDictionary.get("maxThreads"));
+ // check pids in references
+ pids = (String[]) parentDictionary.get("references");
+ assertNotNull("reference pids", pids);
+ assertEquals("child pids", 4, pids.length);
+ assertEquals(newPids[0], pids[0]);
+ assertEquals(newPids[1], pids[2]);
+ assertEquals(newPids[2], pids[3]);
+ // check pids in referenceList
+ pidList = (Vector) parentDictionary.get("referenceList");
+ assertNotNull("reference pids", pidList);
+ assertEquals("child pids", 4, pidList.size());
+ assertEquals(pids[0], pidList.get(0));
+ assertEquals(pids[1], pidList.get(2));
+ assertEquals(pids[2], pidList.get(1));
+ assertEquals(newPidList.get(2), pidList.get(3));
+ // check pids in childRef
+ pids2 = (String[]) parentDictionary.get("childRef");
+ assertNotNull(pids2);
+ assertEquals(2, pids2.length);
+ assertEquals(pids[0], pids2[1]);
+ assertEquals(pids[1], pids2[0]);
+ // these elements should not be in the dictionary
+ assertNull(parentDictionary.get("referencesRef"));
+ assertNull(parentDictionary.get("referenceListRef"));
+ assertNull(parentDictionary.get("child"));
+
+ // check updated child info
+ dictionary = child.waitForUpdate(pids[1]);
+ assertEquals("name property", "noname", dictionary.get("name"));
+ assertEquals("threads property", Integer.valueOf(666), dictionary.get("threads"));
+ }
+
+ public void testReferenceUpdates() throws Exception {
+
+ FactoryTest nodeA = new FactoryTest("test.config.reference.node.a", "uniqueName");
+ addTest(nodeA);
+
+ FactoryTest nodeB = new FactoryTest("test.config.reference.node.b");
+ addTest(nodeB);
+
+ FactoryTest nodeC = new FactoryTest("test.config.reference.node.c");
+ addTest(nodeC);
+
+ Dictionary nodeADictionary = nodeA.waitForUpdate("foo");
+ String nodeBOnePid = (String) nodeADictionary.get("nodeRef");
+ assertNotNull(nodeBOnePid);
+
+ Dictionary nodeCDictionary = nodeC.waitForUpdate("three");
+ assertEquals("ford", nodeCDictionary.get("name"));
+ String nodeCPid = nodeC.getPid("three");
+
+ Dictionary nodeBOneDictionary = nodeB.waitForUpdate("one");
+ assertEquals(Integer.valueOf(100), nodeBOneDictionary.get("value"));
+ assertEquals(nodeBOnePid, nodeB.getPid("one"));
+ assertEquals(nodeCPid, nodeBOneDictionary.get("nodeRef"));
+
+ Dictionary nodeBTwoDictionary = nodeB.waitForUpdate("two");
+ assertEquals(Integer.valueOf(200), nodeBTwoDictionary.get("value"));
+ assertEquals(nodeBOnePid, nodeB.getPid("one"));
+ assertEquals(nodeCPid, nodeBTwoDictionary.get("nodeRef"));
+
+ ConfigWriter writer;
+ Dictionary dictionary;
+
+ // Test 1: Update nodeB one - that should update nodeA
+ writer = readConfiguration();
+ writer.setValue("nodeB", "one", "value", "5555");
+ writeConfiguration(writer);
+
+ nodeBOneDictionary = nodeB.waitForUpdate("one");
+ assertEquals(Integer.valueOf(5555), nodeBOneDictionary.get("value"));
+ assertEquals(nodeBOnePid, nodeB.getPid("one"));
+ assertEquals(nodeCPid, nodeBOneDictionary.get("nodeRef"));
+
+ dictionary = nodeA.waitForUpdate("foo");
+ dictionaryEquals(nodeADictionary, dictionary);
+
+ // Test 2: Update nodeC - that should update everything!
+ writer = readConfiguration();
+ writer.setValue("nodeC", "three", "name", "honda");
+ writeConfiguration(writer);
+
+ nodeCDictionary = nodeC.waitForUpdate("three");
+ assertEquals("honda", nodeCDictionary.get("name"));
+
+ dictionary = nodeB.waitForUpdate("one");
+ dictionaryEquals(nodeBOneDictionary, dictionary);
+
+ dictionary = nodeB.waitForUpdate("two");
+ dictionaryEquals(nodeBTwoDictionary, dictionary);
+
+ dictionary = nodeA.waitForUpdate("foo");
+ dictionaryEquals(nodeADictionary, dictionary);
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/soc/ServiceObjectClassTestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/soc/ServiceObjectClassTestRunner.java
new file mode 100755
index 00000000000..6dd69492b77
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/soc/ServiceObjectClassTestRunner.java
@@ -0,0 +1,198 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config.soc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.Dictionary;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryTest;
+
+/**
+ *
+ */
+public class ServiceObjectClassTestRunner extends BaseTestRunner {
+
+ String simpleSOCPID = "com.ibm.ws.config.soc.simple";
+ String applePID = "com.ibm.ws.config.soc.apple";
+ String orangePID = "com.ibm.ws.config.soc.orange";
+
+ private FactoryTest simpleSOCTest;
+
+ private ConfigurationAdmin configAdmin;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/serviceObjectClass-test", new TestDynamicConfigServlet(), null, null);
+
+ this.simpleSOCTest = new FactoryTest(simpleSOCPID);
+
+ addTest(simpleSOCTest);
+
+ BundleContext bundleContext = context.getBundleContext();
+ ServiceReference> ref = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
+ this.configAdmin = (ConfigurationAdmin) bundleContext.getService(ref);
+ }
+
+ public void testSimpleServiceObjectClass() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ resetFactoryTests();
+
+ /*
+ *
+ *
+ *
+ */
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("");
+ writer.addConfig("");
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = simpleSOCTest.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+
+ String referencePid = (String) dictionary.get("fruitRef");
+
+ Configuration[] references = configAdmin.listConfigurations("(" + Constants.SERVICE_PID + "=" + referencePid + ")");
+ assertNotNull(references);
+ assertEquals("There should be one reference", 1, references.length);
+
+ Dictionary appleDictionary = references[0].getProperties();
+ assertEquals("id should be apple", "apple", appleDictionary.get("id"));
+ assertNull("apple should not contain properties from orange metatype", appleDictionary.get("orangeType"));
+ assertEquals("apple should have properties from apple metatype", "macintosh", appleDictionary.get("appleType"));
+
+ // *** STEP 2 ***
+ // Update apple->orange
+ writer = readConfiguration();
+ writer.setValue("serviceObjectClassTest", "a", "fruitRef", "orange");
+ writeConfiguration(writer);
+
+ // wait for the dictionary update
+ dictionary = simpleSOCTest.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+ referencePid = (String) dictionary.get("fruitRef");
+
+ references = configAdmin.listConfigurations("(" + Constants.SERVICE_PID + "=" + referencePid + ")");
+ assertNotNull(references);
+ assertEquals("There should be one reference", 1, references.length);
+
+ Dictionary orangeDictionary = references[0].getProperties();
+ assertEquals("id should be orange", "orange", orangeDictionary.get("id"));
+ assertNull("orange should not contain properties from apple metatype", orangeDictionary.get("appleType"));
+ assertEquals("orange should have properties from orange metatype", "clementine", orangeDictionary.get("orangeType"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("serviceObjectClassTest", "a", true);
+ writer.deleteConfig("apple", "apple", true);
+ writer.deleteConfig("orange", "orange", true);
+ writeConfiguration(writer);
+ }
+ }
+
+ public void testServiceObjectClassConflict() throws Exception {
+ Dictionary dictionary;
+ ConfigWriter writer;
+
+ try {
+ // Reset to avoid contamination
+ resetFactoryTests();
+
+ /*
+ *
+ *
+ *
+ */
+
+ // *** STEP 1 ***
+ // Write initial configuration
+ writer = readConfiguration();
+ writer.addConfig("");
+ writer.addConfig("");
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // wait for the initial configuration to be injected.
+ dictionary = simpleSOCTest.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+
+ // fruitRef should be null because we can't distinguish between apple/orange
+ assertNull(dictionary.get("fruitRef"));
+
+ // *** STEP 2 ***
+ // Update apple->orange to eliminate conflict
+ writer = readConfiguration();
+ writer.deleteConfig("orange", "apple", true);
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // wait for the dictionary update
+ dictionary = simpleSOCTest.waitForUpdate("a");
+ assertEquals("id should be \"a\"",
+ "a", dictionary.get("id"));
+
+ String referencePid = (String) dictionary.get("fruitRef");
+
+ Configuration[] references = configAdmin.listConfigurations("(" + Constants.SERVICE_PID + "=" + referencePid + ")");
+ assertNotNull(references);
+ assertEquals("There should be one reference", 1, references.length);
+
+ Dictionary appleDictionary = references[0].getProperties();
+ assertEquals("id should be apple", "apple", appleDictionary.get("id"));
+ assertNull("apple should not contain properties from orange metatype", appleDictionary.get("orangeType"));
+ assertEquals("apple should have properties from apple metatype", "macintosh", appleDictionary.get("appleType"));
+
+ } finally {
+ // Clean up
+ writer = readConfiguration();
+ writer.deleteConfig("serviceObjectClassTest", "a", false);
+ writer.deleteConfig("apple", "apple", true);
+ writer.deleteConfig("orange", "orange", true);
+ writer.deleteConfig("orange", "apple", true);
+ writeConfiguration(writer);
+ }
+ }
+
+ /**
+ * Reset factories to avoid test contamination
+ */
+ private void resetFactoryTests() {
+ simpleSOCTest.reset();
+
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/variable/TestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/variable/TestRunner.java
new file mode 100755
index 00000000000..a65b5720988
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/config/variable/TestRunner.java
@@ -0,0 +1,90 @@
+/*
+IBM Confidential
+ *
+OCO Source Materials
+ *
+Copyright IBM Corp. 2011
+ *
+The source code for this program is not published or otherwise divested of
+its trade secrets, irrespective of what has been deposited with the U.S.
+Copyright Office.
+ */
+package test.server.config.variable;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseTestRunner;
+import test.server.config.dynamic.ConfigWriter;
+import test.server.config.dynamic.FactoryTest;
+
+public class TestRunner extends BaseTestRunner {
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ registerServlet("/variable-config-test", new TestDynamicConfigServlet(), null, null);
+ }
+
+ public void testVariableChange() throws Exception {
+
+ FactoryTest parent = new FactoryTest("test.config.variable.factory");
+ addTest(parent);
+
+ // wait for the initial configurations to be injected.
+ Dictionary oneDictionary = parent.waitForUpdate("one");
+ assertEquals("port", Integer.valueOf(1234), oneDictionary.get("port"));
+ assertEquals("host", "localhost", oneDictionary.get("host"));
+ assertEquals("ipAddress", "${localIpAddress}", oneDictionary.get("ipAddress"));
+
+ Dictionary twoDictionary = parent.waitForUpdate("two");
+ assertEquals("port", Integer.valueOf(5678), twoDictionary.get("port"));
+ assertEquals("host", "127.0.0.1", twoDictionary.get("host"));
+ assertEquals("ipAddress", "${localIpAddress}", twoDictionary.get("ipAddress"));
+
+ ConfigWriter writer;
+
+ // STEP 1: change hostname variable
+ writer = readConfiguration();
+ writer.setValue("variable", "hostname", "name", "value", "ibm.com");
+ writeConfiguration(writer);
+
+ // wait for instance one to update
+ oneDictionary = parent.waitForUpdate("one");
+ assertEquals("port", Integer.valueOf(1234), oneDictionary.get("port"));
+ assertEquals("host", "ibm.com", oneDictionary.get("host"));
+ assertEquals("ipAddress", "${localIpAddress}", oneDictionary.get("ipAddress"));
+
+ // STEP 2: add localIpAdress variable
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // wait for instance one update
+ oneDictionary = parent.waitForUpdate("one");
+ assertEquals("port", Integer.valueOf(1234), oneDictionary.get("port"));
+ assertEquals("host", "ibm.com", oneDictionary.get("host"));
+ assertEquals("ipAddress", "192.168.1.1", oneDictionary.get("ipAddress"));
+
+ // wait for instance two update
+ twoDictionary = parent.waitForUpdate("two");
+ assertEquals("port", Integer.valueOf(5678), twoDictionary.get("port"));
+ assertEquals("host", "127.0.0.1", twoDictionary.get("host"));
+ assertEquals("ipAddress", "192.168.1.1", twoDictionary.get("ipAddress"));
+
+ // STEP 3: set localHostNames variable
+ writer = readConfiguration();
+ writer.addConfig("");
+ writeConfiguration(writer);
+
+ // wait for instance two update
+ twoDictionary = parent.waitForUpdate("two");
+ assertEquals("port", Integer.valueOf(5678), twoDictionary.get("port"));
+ assertEquals("host", "w3.ibm.com", twoDictionary.get("host"));
+ assertEquals("ipAddress", "192.168.1.1", twoDictionary.get("ipAddress"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/schema/SchemaGeneratorActivator.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/schema/SchemaGeneratorActivator.java
new file mode 100755
index 00000000000..6469831a933
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/schema/SchemaGeneratorActivator.java
@@ -0,0 +1,108 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.schema;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.Writer;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.ComponentContext;
+
+import test.server.BaseHttpTest;
+
+import com.ibm.websphere.metatype.SchemaGenerator;
+import com.ibm.websphere.metatype.SchemaGeneratorOptions;
+import com.ibm.wsspi.kernel.service.location.WsLocationAdmin;
+import com.ibm.wsspi.kernel.service.location.WsResource;
+
+public class SchemaGeneratorActivator extends BaseHttpTest {
+
+ private BundleContext bundleContext;
+ private SchemaGenerator schemaGenerator;
+ private WsLocationAdmin locationService;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+ this.bundleContext = context.getBundleContext();
+ registerServlet("/schema", new SchemaGeneratorServlet(), null, null);
+ System.out.println("Schema generator servlet started");
+ }
+
+ protected void setSchemaGenerator(SchemaGenerator ref) {
+ this.schemaGenerator = ref;
+ }
+
+ protected void unsetSchemaGenerator(SchemaGenerator ref) {
+ if (ref == this.schemaGenerator) {
+ this.schemaGenerator = null;
+ }
+ }
+
+ protected void setLocationService(WsLocationAdmin ref) {
+ this.locationService = ref;
+ }
+
+ protected void unsetLocationService(WsLocationAdmin ref) {
+ if (ref == this.locationService) {
+ this.locationService = null;
+ }
+ }
+
+ class SchemaGeneratorServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void doGet(HttpServletRequest rq, HttpServletResponse rsp) throws IOException {
+ Bundle[] bundles = bundleContext.getBundles();
+
+ SchemaGeneratorOptions options = new SchemaGeneratorOptions();
+ options.setEncoding("UTF-8");
+ options.setBundles(bundles);
+
+ if ("file".equals(rq.getParameter("output"))) {
+ // generate schema and output it to a file
+ WsResource resource = locationService.resolveResource("${server.config.dir}/schema.xsd");
+ Writer writer = new OutputStreamWriter(resource.putStream(), "UTF-8");
+ PrintWriter pw = rsp.getWriter();
+ try {
+ schemaGenerator.generate(writer, options);
+
+ // Generation didn't die, woohoo!
+ rsp.setContentType("text/plain");
+ pw.println("OK. Wrote: " + resource.toExternalURI());
+ } catch (Throwable t) {
+ System.err.println("Exception " + t);
+ t.printStackTrace();
+ pw.println("ERROR. Exception occurred: " + t.toString());
+ } finally {
+ writer.close();
+ pw.close();
+ }
+ } else {
+ // generate schema and output it back
+ rsp.setContentType("text/xml");
+ rsp.setCharacterEncoding("UTF-8");
+ PrintWriter pw = rsp.getWriter();
+ schemaGenerator.generate(pw, options);
+ }
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/schema/TestRunner.java b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/schema/TestRunner.java
new file mode 100755
index 00000000000..4bc24906d36
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt-bundle/src/test/server/schema/TestRunner.java
@@ -0,0 +1,115 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or otherwise divested of
+ * its trade secrets, irrespective of what has been deposited with the U.S.
+ * Copyright Office.
+ */
+package test.server.schema;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.ComponentContext;
+import org.w3c.dom.Document;
+
+import test.server.BaseHttpTest;
+
+import com.ibm.websphere.metatype.SchemaGenerator;
+import com.ibm.websphere.metatype.SchemaGeneratorOptions;
+import com.ibm.wsspi.kernel.service.location.WsLocationAdmin;
+import com.ibm.wsspi.kernel.service.location.WsLocationConstants;
+import com.ibm.wsspi.kernel.service.location.WsResource;
+
+public class TestRunner extends BaseHttpTest {
+
+ private BundleContext bundleContext;
+ private SchemaGenerator schemaGenerator;
+ private WsLocationAdmin locationService;
+
+ @Override
+ protected void activate(ComponentContext context) throws Exception {
+ super.activate(context);
+
+ bundleContext = context.getBundleContext();
+
+ registerServlet("/schema-test", new TestVerifierServlet(), null, null);
+ }
+
+ protected void setSchemaGenerator(SchemaGenerator ref) {
+ this.schemaGenerator = ref;
+ }
+
+ protected void unsetSchemaGenerator(SchemaGenerator ref) {
+ if (ref == this.schemaGenerator) {
+ this.schemaGenerator = null;
+ }
+ }
+
+ protected void setLocationService(WsLocationAdmin ref) {
+ this.locationService = ref;
+ }
+
+ protected void unsetLocationService(WsLocationAdmin ref) {
+ if (ref == this.locationService) {
+ this.locationService = null;
+ }
+ }
+
+ class TestVerifierServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void doGet(HttpServletRequest rq, HttpServletResponse rsp) throws IOException {
+ PrintWriter pw = rsp.getWriter();
+ rsp.setContentType("text/plain");
+
+ try {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ SchemaGeneratorOptions options = new SchemaGeneratorOptions();
+ options.setEncoding("UTF-8");
+ options.setBundles(bundleContext.getBundles());
+ schemaGenerator.generate(out, options);
+ out.flush();
+
+ SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ Schema schema = schemaFactory.newSchema(new StreamSource(new ByteArrayInputStream(out.toByteArray())));
+
+ DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+ domFactory.setNamespaceAware(true);
+ DocumentBuilder domBuilder = domFactory.newDocumentBuilder();
+
+ WsResource resource = locationService.resolveResource(WsLocationConstants.SYMBOL_SERVER_CONFIG_DIR + "test.xml");
+
+ Document document = domBuilder.parse(resource.get());
+
+ schema.newValidator().validate(new DOMSource(document));
+
+ pw.println("OK");
+ } catch (Exception e) {
+ pw.println("FAILED");
+ e.printStackTrace(pw);
+ }
+ }
+
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/FeatureListMBeanTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/FeatureListMBeanTest.java
new file mode 100755
index 00000000000..f4e67ebccb1
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/FeatureListMBeanTest.java
@@ -0,0 +1,149 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2014
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package com.ibm.ws.config.bvt;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.security.SecureRandom;
+import java.security.cert.X509Certificate;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+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.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import test.common.SharedLocationManager;
+
+import com.ibm.websphere.config.mbeans.FeatureListMBean;
+import com.ibm.websphere.filetransfer.FileTransferMBean;
+import com.ibm.websphere.simplicity.log.Log;
+import com.ibm.ws.jmx.connector.client.rest.ClientProvider;
+import com.ibm.wsspi.kernel.service.location.WsLocationAdmin;
+
+/**
+ * This test tests basic functionality of the com.ibm.websphere.config.mbeans.FeatureListMBean,
+ * i.e. whether a non-empty file is generated by the MBean
+ */
+public class FeatureListMBeanTest {
+
+ private static Class> logClass = FeatureListMBeanTest.class;
+
+ private static String outputDir;
+ private static MBeanServerConnection connection;
+ private static JMXConnector jmxConnector;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ final String methodName = "setUpBeforeClass";
+ Log.entering(logClass, methodName);
+
+ String installDir = System.getProperty("install.dir");
+ WsLocationAdmin locMgr = (WsLocationAdmin) SharedLocationManager.createDefaultLocations(installDir, getProfile());
+
+ outputDir = locMgr.resolveString("${server.output.dir}");
+ Log.info(logClass, methodName, "serverRoot=" + outputDir);
+
+ // Set up the trust store
+ TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
+ @Override
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+
+ @Override
+ public void checkClientTrusted(X509Certificate[] certs, String authType) {}
+
+ @Override
+ public void checkServerTrusted(X509Certificate[] certs, String authType) {}
+ } };
+
+ SSLContext sc = SSLContext.getInstance("SSL");
+ sc.init(null, trustAllCerts, new SecureRandom());
+ HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ HostnameVerifier hv = new HostnameVerifier() {
+ @Override
+ public boolean verify(String urlHostName, SSLSession session) {
+ return true;
+ }
+ };
+ HttpsURLConnection.setDefaultHostnameVerifier(hv);
+
+ Map environment = new HashMap();
+ environment.put("jmx.remote.protocol.provider.pkgs", "com.ibm.ws.jmx.connector.client");
+ environment.put(JMXConnector.CREDENTIALS, new String[] { "theUser", "thePassword" });
+ environment.put(ClientProvider.DISABLE_HOSTNAME_VERIFICATION, true);
+ environment.put(ClientProvider.READ_TIMEOUT, 2 * 60 * 1000);
+ JMXServiceURL url = new JMXServiceURL("REST", "localhost", getSSLPort(), "/IBMJMXConnectorREST");
+ Log.info(logClass, methodName, "JMXServiceURL: " + url);
+ jmxConnector = JMXConnectorFactory.connect(url, environment);
+ connection = jmxConnector.getMBeanServerConnection();
+ assertNotNull("MBeanServerConnection should not be null", connection);
+ }
+
+ @Test
+ public void testFeatureListMBean() throws Exception {
+ String methodName = "testFeatureListMBean";
+ Log.entering(logClass, methodName);
+
+ //Invoke feature list generation
+ ObjectName name = new ObjectName(FeatureListMBean.OBJECT_NAME);
+ String[] signature = new String[] { "java.lang.String", "java.lang.String", "java.lang.String" };
+ Object[] params = new String[] { "UTF-8", Locale.getDefault().toString(), null };
+ @SuppressWarnings("unchecked")
+ Map returnedMap = (Map) connection.invoke(name, "generate", params, signature);
+ Log.info(logClass, methodName, returnedMap.toString());
+ Log.info(logClass, methodName, "Return code from Returned Map should not be 0: " + returnedMap.get(FeatureListMBean.KEY_RETURN_CODE));
+
+ //Check return code
+ assertTrue("Return code is not 0", (Integer) returnedMap.get(FeatureListMBean.KEY_RETURN_CODE) == 0);
+
+ //Download generated file
+ String sourcePath = (String) returnedMap.get(FeatureListMBean.KEY_FILE_PATH);
+ String targetPath = outputDir + "/download_target/featurelist.xml";
+ Log.info(logClass, methodName, "sourcePath: " + sourcePath + "targetPath " + targetPath);
+
+ signature = new String[] { "java.lang.String", "java.lang.String" };
+ params = new Object[] { sourcePath, targetPath };
+ ObjectName objName = new ObjectName(FileTransferMBean.OBJECT_NAME);
+ connection.invoke(objName, "downloadFile", params, signature);
+
+ //Check that file is not empty
+ File file = new File(targetPath);
+ Log.info(logClass, methodName, "Returned file (targetPath): " + file.length());
+ assertTrue("Returned file is empty", file.length() > 0);
+ Log.exiting(logClass, methodName);
+ }
+
+ private static int getSSLPort() {
+ return Integer.valueOf(System.getProperty("HTTP_default.secure", "8020"));
+ }
+
+ private static String getProfile() {
+ return System.getProperty("profile", "com.ibm.ws.config.bvt.schema");
+
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/SchemaMBeanTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/SchemaMBeanTest.java
new file mode 100755
index 00000000000..ca159601a55
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/SchemaMBeanTest.java
@@ -0,0 +1,156 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2014
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package com.ibm.ws.config.bvt;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.security.SecureRandom;
+import java.security.cert.X509Certificate;
+import java.util.HashMap;
+import java.util.Map;
+
+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.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestRule;
+
+import test.common.SharedLocationManager;
+import test.common.SharedOutputManager;
+
+import com.ibm.websphere.config.mbeans.FeatureListMBean;
+import com.ibm.websphere.config.mbeans.ServerSchemaGenerator;
+import com.ibm.websphere.filetransfer.FileTransferMBean;
+import com.ibm.websphere.simplicity.log.Log;
+import com.ibm.ws.jmx.connector.client.rest.ClientProvider;
+import com.ibm.wsspi.kernel.service.location.WsLocationAdmin;
+
+/**
+ *
+ */
+public class SchemaMBeanTest {
+
+ private static Class> logClass = SchemaMBeanTest.class;
+
+ private static String outputDir;
+ private static MBeanServerConnection connection;
+ private static JMXConnector jmxConnector;
+ private static SharedOutputManager outputMgr = SharedOutputManager.getInstance();
+
+ @Rule
+ public TestRule managerRule = outputMgr;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ final String methodName = "setUp";
+ Log.entering(logClass, methodName);
+
+ String installDir = System.getProperty("install.dir");
+ WsLocationAdmin locMgr = (WsLocationAdmin) SharedLocationManager.createDefaultLocations(installDir, getProfile());
+
+ outputDir = locMgr.resolveString("${server.output.dir}");
+ Log.info(logClass, methodName, "serverRoot=" + outputDir);
+
+ // Set up the trust store
+ TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
+ @Override
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+
+ @Override
+ public void checkClientTrusted(X509Certificate[] certs, String authType) {}
+
+ @Override
+ public void checkServerTrusted(X509Certificate[] certs, String authType) {}
+ } };
+
+ SSLContext sc = SSLContext.getInstance("SSL");
+ sc.init(null, trustAllCerts, new SecureRandom());
+ HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ HostnameVerifier hv = new HostnameVerifier() {
+ @Override
+ public boolean verify(String urlHostName, SSLSession session) {
+ return true;
+ }
+ };
+ HttpsURLConnection.setDefaultHostnameVerifier(hv);
+
+ Map environment = new HashMap();
+ environment.put("jmx.remote.protocol.provider.pkgs", "com.ibm.ws.jmx.connector.client");
+ environment.put(JMXConnector.CREDENTIALS, new String[] { "theUser", "thePassword" });
+ environment.put(ClientProvider.DISABLE_HOSTNAME_VERIFICATION, true);
+ environment.put(ClientProvider.READ_TIMEOUT, 2 * 60 * 1000);
+ JMXServiceURL url = new JMXServiceURL("REST", "localhost", getSSLPort(), "/IBMJMXConnectorREST");
+ Log.info(logClass, methodName, "JMXServiceURL: " + url);
+ jmxConnector = JMXConnectorFactory.connect(url, environment);
+ connection = jmxConnector.getMBeanServerConnection();
+ assertNotNull("MBeanServerConnection should not be null", connection);
+ }
+
+ @Test
+ public void testSchemaMBean() throws Exception {
+ String methodName = "testSchemaMBean";
+ Log.entering(logClass, methodName);
+
+ //Invoke schema generation
+ ObjectName name = new ObjectName(ServerSchemaGenerator.OBJECT_NAME);
+ String[] signature = new String[] { "java.lang.String", "java.lang.String", "java.lang.String", "java.lang.String" };
+ Object[] params = new String[] { null, null, null, null };
+ @SuppressWarnings("unchecked")
+ Map returnedMap = (Map) connection.invoke(name, "generateInstallSchema", params, signature);
+ Log.info(logClass, methodName, returnedMap.toString());
+ Log.info(logClass, methodName, "Return code from Returned Map should not be 0: " + returnedMap.get(FeatureListMBean.KEY_RETURN_CODE));
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) == 0);
+
+ //Download generated file
+ String sourcePath = (String) returnedMap.get(ServerSchemaGenerator.KEY_FILE_PATH);
+ String targetPath = outputDir + "/download_target/schema.xsd";
+ Log.info(logClass, methodName, "sourcePath: " + sourcePath + "targetPath " + targetPath);
+
+ signature = new String[] { "java.lang.String", "java.lang.String" };
+ params = new Object[] { sourcePath, targetPath };
+ ObjectName objName = new ObjectName(FileTransferMBean.OBJECT_NAME);
+ connection.invoke(objName, "downloadFile", params, signature);
+
+ //Ensure the file is bigger than 1 MB
+ File file = new File(targetPath);
+ Log.info(logClass, methodName, "Returned file (targetPath): " + file.length());
+ assertTrue("Returned file is empty", file.length() > 1000000);
+ Log.exiting(logClass, methodName);
+ }
+
+ private static int getSSLPort() {
+ return Integer.valueOf(System.getProperty("HTTP_default.secure", "8020"));
+ }
+
+ private static String getProfile() {
+ return System.getProperty("profile", "com.ibm.ws.config.bvt.schema");
+
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/SchemaTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/SchemaTest.java
new file mode 100755
index 00000000000..36fde20df4c
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/SchemaTest.java
@@ -0,0 +1,68 @@
+package com.ibm.ws.config.bvt;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestRule;
+
+import test.common.SharedOutputManager;
+
+public class SchemaTest {
+
+ private static SharedOutputManager outputMgr = SharedOutputManager.getInstance();
+
+ @Rule
+ public TestRule outputRule = outputMgr;
+
+ private String getPort() {
+ return System.getProperty("HTTP_default", "8000");
+ }
+
+ private String read(InputStream in) throws IOException {
+ InputStreamReader isr = new InputStreamReader(in);
+ BufferedReader br = new BufferedReader(isr);
+ StringBuilder builder = new StringBuilder();
+ String line;
+ while ((line = br.readLine()) != null) {
+ builder.append(line);
+ builder.append(System.getProperty("line.separator"));
+ }
+ return builder.toString();
+ }
+
+ @Test
+ public void testSchemaGeneratorAll() throws Exception {
+ test("/schema?output=file", "testSchemaGeneratorAll");
+ }
+
+ private void test(String testUri, String testName) throws Exception {
+ HttpURLConnection con = null;
+ try {
+ URL url = new URL("http://localhost:" + getPort() + testUri);
+ con = (HttpURLConnection) url.openConnection();
+ con.setDoInput(true);
+ con.setDoOutput(true);
+ con.setUseCaches(false);
+ con.setRequestMethod("GET");
+ InputStream is = con.getInputStream();
+ assertNotNull(is);
+
+ String output = read(is);
+ System.out.println(output);
+ assertTrue("Response should start with OK", output.trim().startsWith("OK"));
+ } finally {
+ if (con != null) {
+ con.disconnect();
+ }
+ }
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/ServerXMLConfigurationMBeanTest.java b/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/ServerXMLConfigurationMBeanTest.java
new file mode 100755
index 00000000000..e4233b9f935
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/bvt/src/com/ibm/ws/config/bvt/ServerXMLConfigurationMBeanTest.java
@@ -0,0 +1,113 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2014
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package com.ibm.ws.config.bvt;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestRule;
+
+import test.common.SharedLocationManager;
+import test.common.SharedOutputManager;
+
+import com.ibm.websphere.config.mbeans.ServerXMLConfigurationMBean;
+import com.ibm.websphere.filetransfer.FileTransferMBean;
+import com.ibm.ws.jmx.connector.client.rest.ClientProvider;
+import com.ibm.wsspi.kernel.service.location.WsLocationAdmin;
+
+/**
+ * This test tests the basic functionality of the com.ibm.websphere.config.mbeans.ServerXMLConfigurationMBean.
+ * It verifies that fetchConfigurationFilePaths() returns the expected collection of file paths and then checks
+ * that the files can be downloaded using the FileTransferMBean from those paths.
+ */
+public class ServerXMLConfigurationMBeanTest {
+
+ private static String outputDir;
+ private static MBeanServerConnection connection;
+ private static JMXConnector jmxConnector;
+ private static SharedOutputManager outputMgr = SharedOutputManager.getInstance();
+
+ @Rule
+ public TestRule managerRule = outputMgr;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ String installDir = System.getProperty("install.dir");
+ WsLocationAdmin locMgr = (WsLocationAdmin) SharedLocationManager.createDefaultLocations(installDir, getProfile());
+
+ outputDir = locMgr.resolveString("${server.output.dir}");
+
+ // Set up the trust store
+ System.setProperty("javax.net.ssl.trustStore", outputDir + "/resources/security/key.jks");
+ System.setProperty("javax.net.ssl.trustStorePassword", "Liberty");
+
+ Map environment = new HashMap();
+ environment.put("jmx.remote.protocol.provider.pkgs", "com.ibm.ws.jmx.connector.client");
+ environment.put(JMXConnector.CREDENTIALS, new String[] { "theUser", "thePassword" });
+ environment.put(ClientProvider.DISABLE_HOSTNAME_VERIFICATION, true);
+ environment.put(ClientProvider.READ_TIMEOUT, 2 * 60 * 1000);
+ JMXServiceURL url = new JMXServiceURL("REST", "localhost", getSSLPort(), "/IBMJMXConnectorREST");
+ jmxConnector = JMXConnectorFactory.connect(url, environment);
+ connection = jmxConnector.getMBeanServerConnection();
+ }
+
+ @Test
+ public void testServerXMLConfigurationMBean() throws Exception {
+ ObjectName name = new ObjectName(ServerXMLConfigurationMBean.OBJECT_NAME);
+ @SuppressWarnings("unchecked")
+ Collection configFilePaths = (Collection) connection.invoke(name, "fetchConfigurationFilePaths", new Object[] {}, new String[] {});
+
+ // Check that the collection contains the expected file paths.
+ assertEquals("Config file path collection size is not 2.", 2, configFilePaths.size());
+ assertTrue("server.xml is missing from the collection.",
+ configFilePaths.contains("${server.config.dir}/server.xml"));
+ assertTrue("bvtTestPorts.xml is missing from the collection.",
+ configFilePaths.contains("${shared.config.dir}/bvtTestPorts.xml"));
+
+ // Download configuration files.
+ for (String sourcePath : configFilePaths) {
+ String targetPath = outputDir + "/download_target/" +
+ sourcePath.substring(sourcePath.lastIndexOf('/') + 1);
+
+ String[] signature = new String[] { "java.lang.String", "java.lang.String" };
+ Object[] params = new Object[] { sourcePath, targetPath };
+ ObjectName objName = new ObjectName(FileTransferMBean.OBJECT_NAME);
+ connection.invoke(objName, "downloadFile", params, signature);
+
+ // Check that file is not empty
+ File file = new File(targetPath);
+ assertTrue("Returned file is empty", file.length() > 0);
+ }
+ }
+
+ private static int getSSLPort() {
+ return Integer.valueOf(System.getProperty("HTTP_default.secure", "8020"));
+ }
+
+ private static String getProfile() {
+ return System.getProperty("profile", "com.ibm.ws.config.bvt.schema");
+ }
+}
diff --git a/dev/com.ibm.ws.config_bvt.schema/delivery.sets b/dev/com.ibm.ws.config_bvt.schema/delivery.sets
new file mode 100755
index 00000000000..9a2dcf02d11
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/delivery.sets
@@ -0,0 +1 @@
+SLE
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_bvt.schema/osgitck-bvt.xml.disabled b/dev/com.ibm.ws.config_bvt.schema/osgitck-bvt.xml.disabled
new file mode 100755
index 00000000000..f73b8e4b4fa
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/osgitck-bvt.xml.disabled
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_bvt.schema/publish/features/testschema-1.0.mf b/dev/com.ibm.ws.config_bvt.schema/publish/features/testschema-1.0.mf
new file mode 100755
index 00000000000..dffbf68043b
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/publish/features/testschema-1.0.mf
@@ -0,0 +1,7 @@
+Subsystem-ManifestVersion: 1
+IBM-ShortName:testschema-1.0
+Subsystem-SymbolicName: testschema-1.0; visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Content: test.server.schema; version="[1,1.0.100)"
+Subsystem-Type: osgi.subsystem.feature
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/.gitignore b/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/.gitignore
new file mode 100644
index 00000000000..7f52d8f632f
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/.gitignore
@@ -0,0 +1 @@
+/download_target
diff --git a/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/bootstrap.properties b/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/bootstrap.properties
new file mode 100755
index 00000000000..dee20e162ff
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/bootstrap.properties
@@ -0,0 +1,4 @@
+com.ibm.ws.logging.trace.specification=*=event=enabled:config=all=enabled
+com.ibm.ws.logging.max.file.size=0
+
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/jvm.options b/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/jvm.options
new file mode 100755
index 00000000000..32354345ade
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/jvm.options
@@ -0,0 +1 @@
+-Xmx256M
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/server.xml b/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/server.xml
new file mode 100755
index 00000000000..d55c4a4e967
--- /dev/null
+++ b/dev/com.ibm.ws.config_bvt.schema/publish/servers/com.ibm.ws.config.bvt.schema/server.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ httpservice-2.2
+ testschema-1.0
+ restConnector-1.0
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/.classpath b/dev/com.ibm.ws.config_fat/.classpath
new file mode 100644
index 00000000000..c422489df40
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/.classpath.gradle b/dev/com.ibm.ws.config_fat/.classpath.gradle
new file mode 100644
index 00000000000..c422489df40
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/.classpath.gradle
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/.gitignore b/dev/com.ibm.ws.config_fat/.gitignore
new file mode 100644
index 00000000000..27e131e35a6
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/.gitignore
@@ -0,0 +1 @@
+/bootstrapping.properties
diff --git a/dev/com.ibm.ws.config_fat/.project b/dev/com.ibm.ws.config_fat/.project
new file mode 100755
index 00000000000..c33ca1c04e7
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/.project
@@ -0,0 +1,23 @@
+
+
+ com.ibm.ws.config_fat
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ bndtools.core.bndbuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ bndtools.core.bndnature
+
+
diff --git a/dev/com.ibm.ws.config_fat/.settings/org.eclipse.core.resources.prefs b/dev/com.ibm.ws.config_fat/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000000..25d9425fe34
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/dev/com.ibm.ws.config_fat/.settings/org.eclipse.jdt.core.prefs b/dev/com.ibm.ws.config_fat/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..f48ecd6cc60
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,280 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+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=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=18
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=2
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=2
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=2
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=20
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=4
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+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=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+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=false
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+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=180
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=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=8
+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_label=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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not 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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not 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.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+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=180
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+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=false
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/dev/com.ibm.ws.config_fat/.settings/org.eclipse.jdt.ui.prefs b/dev/com.ibm.ws.config_fat/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000000..c92277a371a
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,62 @@
+#Ant properties
+#Automatically generated by the ant prepare.settings.files task
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=/**\n *\n * ${tags}\n *//**\n * ${tags}\n * ${see_to_target}\n *//**\n * ${tags}\n *//** *//**\n * ${tags}\n *//**\n * @param ${param} the ${bare_field_name} to set\n *//*\n* IBM Confidential\n*\n* OCO Source Materials\n*\n* WLP Copyright IBM Corp. ${year}\n*\n* The source code for this program is not published or otherwise divested \n* of its trade secrets, irrespective of what has been deposited with the \n* U.S. Copyright Office.\n*//**\n * @return the ${bare_field_name}\n */${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}\n\n\n\n// ${todo} Auto-generated catch block\n// Do you need FFDC here? Remember FFDC instrumentation and @FFDCIgnore\n// http\://was.pok.ibm.com/xwiki/bin/view/Liberty/LoggingFFDC\n${exception_var}.printStackTrace();// ${todo} Auto-generated method stub\n${body_statement}${body_statement}\n// ${todo} Auto-generated constructor stubreturn ${field};${field} \= ${param};
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=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=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=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=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+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/dev/com.ibm.ws.config_fat/bnd.bnd b/dev/com.ibm.ws.config_fat/bnd.bnd
new file mode 100644
index 00000000000..abe08945c20
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/bnd.bnd
@@ -0,0 +1,14 @@
+-include= ~../cnf/resources/bnd/bundle.props
+bVersion=1.0
+
+src: \
+ fat/src
+
+-buildpath: \
+ ${javac.bootclasspath.java6}, \
+ ../build.sharedResources/lib/junit/old/junit.jar;version=file, \
+ fattest.simplicity;version=latest, \
+ ../fattest.simplicity/lib/public.api.jar;version=file, \
+ com.ibm.websphere.filetransfer;version=latest, \
+ com.ibm.ws.jmx.connector.client.rest;version=latest, \
+ com.ibm.ws.config;version=latest
diff --git a/dev/com.ibm.ws.config_fat/bnd.bnd.gradle b/dev/com.ibm.ws.config_fat/bnd.bnd.gradle
new file mode 100644
index 00000000000..abe08945c20
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/bnd.bnd.gradle
@@ -0,0 +1,14 @@
+-include= ~../cnf/resources/bnd/bundle.props
+bVersion=1.0
+
+src: \
+ fat/src
+
+-buildpath: \
+ ${javac.bootclasspath.java6}, \
+ ../build.sharedResources/lib/junit/old/junit.jar;version=file, \
+ fattest.simplicity;version=latest, \
+ ../fattest.simplicity/lib/public.api.jar;version=file, \
+ com.ibm.websphere.filetransfer;version=latest, \
+ com.ibm.ws.jmx.connector.client.rest;version=latest, \
+ com.ibm.ws.config;version=latest
diff --git a/dev/com.ibm.ws.config_fat/build-test.xml b/dev/com.ibm.ws.config_fat/build-test.xml
new file mode 100755
index 00000000000..d42ad757442
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/build-test.xml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/build.gradle b/dev/com.ibm.ws.config_fat/build.gradle
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/dev/com.ibm.ws.config_fat/delivery.sets b/dev/com.ibm.ws.config_fat/delivery.sets
new file mode 100755
index 00000000000..674398425a0
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/delivery.sets
@@ -0,0 +1 @@
+SLE
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/BadConfigTests.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/BadConfigTests.java
new file mode 100755
index 00000000000..05ffbca817e
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/BadConfigTests.java
@@ -0,0 +1,124 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.List;
+
+import org.junit.Test;
+
+import componenttest.annotation.ExpectedFFDC;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+/**
+ *
+ */
+public class BadConfigTests {
+
+ @Test
+ public void testBadPortConfig() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.bad");
+ server.startServer("badconfig.log");
+
+ try {
+ // Start the server with bad configuration
+ assertNotNull("There should be an error during server start", server.waitForStringInLog("CWWKG0075E.*missingbvt.prop.HTTP_default.*"));
+ assertNotNull("The server should start", server.waitForStringInLog("CWWKF0011I.*"));
+ assertNull("There should not be a cached instance used", server.waitForStringInLog("CWWKG0076W", 1000));
+
+ // Update the configuration to good values
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("badconfig/goodConfig.xml");
+
+ assertNotNull("The config should be updated", server.waitForStringInLogUsingMark("CWWKG0017I.*"));
+ assertNull("There should not be a validation error", server.waitForStringInLogUsingMark("CWWKG0075E", 1000));
+
+ // Update at runtime to an invalid configuration. The cached values should still be used
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("badconfig/badHttp.xml");
+
+ assertNotNull("There should be an error during server start", server.waitForStringInLogUsingMark("CWWKG0075E.*missingbvt.prop.HTTP_default.*"));
+ assertNotNull("There should be a cached instance used", server.waitForStringInLogUsingMark("CWWKG0076W"));
+ assertNotNull("The config should be updated", server.waitForStringInLogUsingMark("CWWKG0017I.*"));
+
+ // Update a singleton () at runtime. The cached values should still be used
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("badconfig/badLogging.xml");
+
+ assertNotNull("There should be a warning during server start", server.waitForStringInLogUsingMark("CWWKG0083W.*maxFiles.*-1.*2.*"));
+ assertNotNull("The config should be updated", server.waitForStringInLogUsingMark("CWWKG0017I.*"));
+
+ } finally {
+ server.stopServer();
+ }
+
+ }
+
+ @Test
+ public void testUniqueValueConflictConfig() throws Exception {
+
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.uniquevalueconflict");
+ server.startServer("uniquevalueconflict.log");
+ try {
+ // Update the configuration to good values
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("badconfig/UniqueValueConflict.xml");
+
+ assertNotNull(" Distinct values specified for the attribute", server.waitForStringInLogUsingMark("CWWKG0031E.*"));
+ assertNotNull(" ConfigUpdateException does not occur", server.waitForStringInLogUsingMark("CWWKG0074E.*"));
+ }
+
+ finally {
+ server.stopServer();
+ }
+
+ }
+
+ @Test
+ public void testInvalidOptionInJDBCConfig() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.invalidJDBCoption");
+ server.startServer("invalidJDBCoption.log");
+
+ assertNotNull("The server should start", server.waitForStringInLog("CWWKF0011I.*"));
+
+ // Clear log offsets so we can search for all warning messages
+ server.resetLogOffsets();
+
+ try {
+ List matches = server.findStringsInLogs("CWWKG0032W.*createDatabase.*whatever.*");
+ // Start the server with invalid configuration and ensure that the warning is printed exactly once
+ assertEquals("There should be exactly one (1) warning for createDatabase", 1, matches.size());
+ } finally {
+ server.stopServer();
+ }
+
+ }
+
+ @Test
+ @ExpectedFFDC("java.net.MalformedURLException")
+ public void testInvalidOptionalInclude() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.invalidOptionalInclude");
+ server.startServer("invalidOptionalInclude.log");
+
+ try {
+ // Start the server, skipping the optional include with a bad protocol - ensure warning message is printed
+ assertNotNull("There should be an error during server start", server.waitForStringInLog("CWWKG0084W.*bogus.*"));
+ } finally {
+ server.stopServer();
+ }
+
+ }
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ChildAliasTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ChildAliasTest.java
new file mode 100755
index 00000000000..c518137022b
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ChildAliasTest.java
@@ -0,0 +1,236 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2012, 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestName;
+
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+public class ChildAliasTest {
+
+ /**
+ * Utility to set the method name as a String before the test
+ */
+ @Rule
+ public TestName name = new TestName();
+
+ public String testName = "";
+
+ @Before
+ public void setTestName() {
+ // set the current test name
+ testName = name.getMethodName();
+ }
+
+ private static final String CONTEXT_ROOT = "/childalias";
+
+ private static LibertyServer testServer = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.childalias");
+
+ @BeforeClass
+ public static void setUpForConfigExtensionsTests() throws Exception {
+ //copy the extensions tests features into the server features location
+ testServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/childAliasTest-1.0.mf");
+ testServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/childAliasTestB-1.0.mf");
+ testServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/childAliasTestC-1.0.mf");
+
+ // Copy the config fat internal feature
+ testServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+
+ //copy the extensions tests bundles into the server lib location
+ testServer.copyFileToLibertyInstallRoot("lib", "bundles/test.config.childalias_1.0.0.jar");
+ testServer.copyFileToLibertyInstallRoot("lib", "bundles/test.config.childalias.b_1.0.0.jar");
+ testServer.copyFileToLibertyInstallRoot("lib", "bundles/test.config.childalias.c_1.0.0.jar");
+
+ testServer.startServer();
+ //make sure the URL is available
+ assertNotNull(testServer.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT));
+ assertNotNull(testServer.waitForStringInLog("CWWKF0011I"));
+ }
+
+ @AfterClass
+ public static void shutdown() throws Exception {
+ testServer.stopServer();
+ testServer.deleteFileFromLibertyInstallRoot("lib/features/childAliasTest-1.0.mf");
+ testServer.deleteFileFromLibertyInstallRoot("lib/features/childAliasTestB-1.0.mf");
+ testServer.deleteFileFromLibertyInstallRoot("lib/features/childAliasTestC-1.0.mf");
+ testServer.deleteFileFromLibertyInstallRoot("lib/test.config.childalias_1.0.0.jar");
+ testServer.deleteFileFromLibertyInstallRoot("lib/test.config.childalias.b_1.0.0.jar");
+ testServer.deleteFileFromLibertyInstallRoot("lib/test.config.childalias.c_1.0.0.jar");
+
+ testServer.deleteFileFromLibertyInstallRoot("lib/features/configfatlibertyinternals-1.0.mf");
+ }
+
+ @Test
+ public void testChildAlias1() throws Exception {
+ test(testServer);
+ }
+
+ @Test
+ public void testChildAlias2() throws Exception {
+ test(testServer);
+ }
+
+ @Test
+ public void testChildAliasSingleton1() throws Exception {
+ test(testServer);
+ }
+
+ @Test
+ public void testChildAliasSingleton2() throws Exception {
+ test(testServer);
+ }
+
+ @Test
+ public void testBundleOrdering1() throws Exception {
+ // Because this test ensures bundle ordering with config elements defined
+ // in different bundles, a fresh start of the server with the config is needed
+ // so that this test can run in any order while simulating bundle start ordering.
+ testServer.stopServer();
+ testServer.setServerConfigurationFile("childalias/server.xml");
+ testServer.startServer();
+
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverB.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ @Test
+ public void testBundleOrdering2() throws Exception {
+ // Because this test ensures bundle ordering with config elements defined
+ // in different bundles, a fresh start of the server with the config is needed
+ // so that this test can run in any order while simulating bundle start ordering.
+ testServer.stopServer();
+ testServer.setServerConfigurationFile("childalias/serverB.xml");
+ testServer.startServer();
+
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverC.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ @Test
+ public void testBundleOrderingAliasConflict() throws Exception {
+ // Because this test ensures bundle ordering with config elements defined
+ // in different bundles, a fresh start of the server with the config is needed
+ // so that this test can run in any order while simulating bundle start ordering.
+ testServer.stopServer();
+ testServer.setServerConfigurationFile("childalias/serverB.xml");
+ testServer.startServer();
+
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverC.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ @Test
+ public void testRemoveChild() throws Exception {
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverC2.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ @Test
+ public void testAddNewChild() throws Exception {
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverC3.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ @Test
+ public void testUpdateChild() throws Exception {
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverC4.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ @Test
+ public void testRemoveSingletonChild() throws Exception {
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverC5.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ @Test
+ public void testAddNewSingletonChild() throws Exception {
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverC6.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ @Test
+ public void testUpdateSingletonChild() throws Exception {
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile("childalias/serverC7.xml");
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ test(testServer);
+ }
+
+ private void test(LibertyServer server) throws Exception {
+ HttpURLConnection con = null;
+ try {
+ URL url = new URL("http://" + server.getHostname() + ":" + server.getHttpDefaultPort() +
+ CONTEXT_ROOT + "/child-alias-test?" + "testName=" + testName);
+ con = (HttpURLConnection) url.openConnection();
+ con.setDoInput(true);
+ con.setDoOutput(true);
+ con.setUseCaches(false);
+ con.setRequestMethod("GET");
+ InputStream is = con.getInputStream();
+ assertNotNull(is);
+
+ String output = read(is);
+ System.out.println(output);
+ assertTrue(output, output.trim().startsWith("OK"));
+ } finally {
+ if (con != null) {
+ con.disconnect();
+ }
+ }
+ }
+
+ private static String read(InputStream in) throws IOException {
+ InputStreamReader isr = new InputStreamReader(in);
+ BufferedReader br = new BufferedReader(isr);
+ StringBuilder builder = new StringBuilder();
+ String line;
+ while ((line = br.readLine()) != null) {
+ builder.append(line);
+ builder.append(System.getProperty("line.separator"));
+ }
+ return builder.toString();
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ConfigExtensionsTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ConfigExtensionsTest.java
new file mode 100755
index 00000000000..87a0274de05
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ConfigExtensionsTest.java
@@ -0,0 +1,298 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2012, 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestName;
+
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+import componenttest.topology.utils.HttpUtils;
+
+/**
+ *
+ */
+public class ConfigExtensionsTest {
+
+ /**
+ * Utility to set the method name as a String before the test
+ */
+ @Rule
+ public TestName name = new TestName();
+
+ public String testName = "";
+ private static final String servicePidName = "service.pid";
+
+ @Before
+ public void setTestName() {
+ // set the current test name
+ testName = name.getMethodName();
+ }
+
+ private static final String CONTEXT_ROOT = "/config-extensions-test";
+ private static final String PID_PASS = "PASSED: test bundle was called with properties for ID";
+ private static LibertyServer extensionsServer = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.extensions");
+
+ @BeforeClass
+ public static void setUpForConfigExtensionsTests() throws Exception {
+ //copy the extensions tests features into the server features location
+ extensionsServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configExtensionsTest-1.0.mf");
+ extensionsServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configExtensionsTestB-1.0.mf");
+ //copy the extensions tests bundles into the server lib location
+ extensionsServer.copyFileToLibertyInstallRoot("lib", "bundles/test.config.extensions_1.0.0.jar");
+ extensionsServer.copyFileToLibertyInstallRoot("lib", "bundles/test.config.extensions.b_1.0.0.jar");
+ extensionsServer.copyFileToLibertyInstallRoot("lib", "bundles/test.config.extensions.schema.generator_1.0.0.jar");
+
+ //use our default server.xml to start with
+ extensionsServer.setServerConfigurationFile("extensions/server.xml");
+ extensionsServer.startServer();
+ //make sure the URL is available
+ extensionsServer.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT);
+ }
+
+ @AfterClass
+ public static void shutdown() throws Exception {
+ extensionsServer.stopServer();
+ // Delete the files we copied over
+ extensionsServer.deleteFileFromLibertyInstallRoot("lib/features/configExtensionsTest-1.0.mf");
+ extensionsServer.deleteFileFromLibertyInstallRoot("lib/features/configExtensionsTestB-1.0.mf");
+
+ extensionsServer.deleteFileFromLibertyInstallRoot("lib/test.config.extensions_1.0.0.jar");
+ extensionsServer.deleteFileFromLibertyInstallRoot("lib/test.config.extensions.b_1.0.0.jar");
+ extensionsServer.deleteFileFromLibertyInstallRoot("lib/test.config.extensions.schema.generator_1.0.0.jar");
+
+ }
+
+ /**
+ * Tests whether the ibm:extends works at runtime.
+ * The test verifies that the delegating factory service registered by the ExtendedMetatypeManager
+ * does make a call to the factory service that is provided by the super type
+ */
+ @Test
+ public void testExtendsBasic() throws Exception {
+ String servicePid = servicePidName + "=test.config.extensions.super";
+ //verify that the MSF was called with config for the correct id as expected
+ //If the ID property was incorrect, the delegating listener forwarded the wrong information or was provided the wrong information by config
+ HttpUtils.findStringInUrl(extensionsServer, CONTEXT_ROOT + "/test?id=test.config.extensions.sub.config1&" + servicePid, PID_PASS);
+ }
+
+ /**
+ * Tests whether the ibm:rename works at runtime.
+ * The test verifies that an attribute specified in the server.xml using an ibm:rename
+ * gets converted to the original name before being passed back to the super type.
+ */
+ @Test
+ public void testExtendsRename() throws Exception {
+ String servicePid = servicePidName + "=test.config.extensions.super";
+ //check that the renamed property came from test.config.extensions.sub configuration
+ //If the renamed property value was not correct, the delegating listener did not pass the value back to the original key name or did not detect the rename
+ HttpUtils.findStringInUrl(extensionsServer, CONTEXT_ROOT + "/test?id=test.config.extensions.sub.config1&prop=testAttribute1&" + servicePid, "renamed value");
+ }
+
+ /**
+ * This is the same as testExtendsBasic, but for a sub type that ibm:extends another
+ * sub type, so it checks that the service factory call gets delegated all the way back to the
+ * top of the stack.
+ */
+ @Test
+ public void testExtendsHierarchy() throws Exception {
+ String servicePid = servicePidName + "=test.config.extensions.super";
+ //check that the properties supplied for next go through the hierarchy to the top parent
+ HttpUtils.findStringInUrl(extensionsServer, CONTEXT_ROOT + "/test?id=test.config.extensions.sub.sub.config1&" + servicePid, PID_PASS);
+
+ HttpUtils.findStringInUrl(extensionsServer, CONTEXT_ROOT + "/test?id=test.config.extensions.sub.sub.config1&prop=testAttribute1&" + servicePid, "rqd");
+ HttpUtils.findStringInUrl(extensionsServer, CONTEXT_ROOT + "/test?id=test.config.extensions.sub.sub.config1&prop=testAttribute2&" + servicePid, "2");
+ HttpUtils.findStringInUrl(extensionsServer, CONTEXT_ROOT + "/test?id=test.config.extensions.sub.sub.config1&prop=testAttr3RenameSub&" + servicePid, "3");
+ HttpUtils.findStringInUrl(extensionsServer, CONTEXT_ROOT + "/test?id=test.config.extensions.sub.sub.config1&prop=testAttribute4&" + servicePid, "four");
+ }
+
+ /**
+ * This tests the error scenario where someone tries to use the ibm:extends
+ * attribute on a non-factory PID
+ */
+ @Test
+ public void testExtendsNonFactory() throws Exception {
+ String id = "CWWKG0061E";
+ assertNotNull("The error message " + id + " for trying to use ibm:extends on a non-factory PID was not found",
+ extensionsServer.waitForStringInLog(id + ".*test\\.config\\.extensions\\.sub\\.non\\.factorypid.*test\\.config\\.extensions\\.sub"));
+ }
+
+ /**
+ * This tests the error scenario where someone tries uses the ibm:extends
+ * attribute on a factory PID, but the specified super is a non-factory PID
+ */
+ @Test
+ public void testExtendsNonFactorySuper() {
+ String id = "CWWKG0062E";
+ assertNotNull("The error message " + id + " for trying to use ibm:extends with a non-factory super was not found",
+ extensionsServer.waitForStringInLog(id + ".*test\\.config\\.extensions\\.parent\\.non\\.factorypid.*test\\.config\\.extensions\\.extends\\.non\\.factorypid"));
+ }
+
+ /**
+ * This tests the scenario where ibm:extends provides a value that does not exist
+ */
+ @Test
+ public void testInvalidSuper() {
+ String id = "CWWKG0059E";
+ assertNotNull("The error message " + id + " for invalid super was not found",
+ extensionsServer.waitForStringInLog(id + ".*test\\.config\\.extensions\\.sub\\.error\\.no\\.parent\\.pid.*test\\.config\\.extensions\\.invalid\\.parent"));
+ }
+
+ /**
+ * This tests the scenario where ibm:extends provides a value that does not exist
+ */
+ @Test
+ public void testInvalidRename() {
+ String id = "CWWKG0067E";
+ assertNotNull(
+ "The error message " + id + " for invalid rename was not found",
+ extensionsServer.waitForStringInLog(id
+ + ".*testInvalidAttribute.*testInvalidAttrRename.*test\\.config\\.extensions\\.sub\\.error\\.no\\.parent\\.override\\.attr"));
+ }
+
+ @Test
+ public void testRequiredAttributes() {
+ String id = "CWWKG0058E";
+ //[ERROR ] CWWKG0058E: test.config.extensions.extends.attr.required is missing required attribute testAttr4
+ assertNotNull("The error message " + id + " for a missing required attribute defined on a sub type was not found",
+ extensionsServer.waitForStringInLog(id + ".*" +
+ "test\\.config\\.extensions\\.extends\\.attr\\.required" +
+ ".*" +
+ "testAttr4"));
+
+ assertNotNull("The error message " + id + " for a missing required attribute defined on a super type was not found",
+ extensionsServer.waitForStringInLog(id + ".*" +
+ "test\\.config\\.extensions\\.extends\\.attr\\.required\\.parent" +
+ ".*" +
+ "testAttribute2"));
+ }
+
+ @Test
+ public void testAttemptToOverrideFinalMeta() {
+ String id = "CWWKG0060E";
+ assertNotNull("The error message " + id + " for attempting to re-assign a final value was not found",
+ extensionsServer.waitForStringInLog(id + ".*" + "testOverrideFinal" + ".*" + "test.config.extensions.override.final" + ".*" + "test.config.extensions.super"));
+ }
+
+ /**
+ * This tests the scenario where ibm:extends is used on an OCD when the super type does not exist.
+ * A feature is then installed that provides the super.
+ * After the feature is installed it should be possible to use the sub type.
+ *
+ * This test requires a different server configuration, so it must restore
+ * the original that other tests rely upon.
+ */
+ @Test
+ public void testLateArrivingSecondBundleSuper() throws Exception {
+ try {
+ //stop the server, collecting logs from any previous tests
+ //and switch to the alternate serverB1.xml config
+ extensionsServer.stopServer(true);
+ extensionsServer.setServerConfigurationFile("extensions/serverB1.xml");
+ extensionsServer.startServer();
+ String id = "CWWKG0059E";
+ assertNotNull("The error message " + id + " for invalid super was not found",
+ extensionsServer.waitForStringInLog(id + ".*test\\.config\\.extensions\\.different\\.bundle.*test\\.config\\.extensions\\.super"));
+ //now switch on the bundle providing the super (and our test system wab)
+ //by setting the serverB2.xml config
+ extensionsServer.setMarkToEndOfLog();
+ extensionsServer.setServerConfigurationFile("extensions/serverB2.xml");
+ //wait for our test app to be available
+ extensionsServer.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT);
+ String servicePid = servicePidName + "=test.config.extensions.super";
+ //now check that the super got a call for the sub defined in the other bundle
+ HttpUtils.findStringInUrl(extensionsServer, CONTEXT_ROOT + "/test?id=test.config.extensions.different.bundle.config&" + servicePid, PID_PASS);
+ } finally {
+ //stop and package up this server
+ extensionsServer.stopServer(true);
+ //restore the original server.xml
+ //by setting our original server.xml back again
+ extensionsServer.setServerConfigurationFile("extensions/server.xml");
+ //and finally restart the server
+ extensionsServer.startServer();
+ //make sure the URL is available
+ extensionsServer.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT);
+ }
+ }
+
+ /**
+ * This test requires a different server configuration, so it must restore
+ * the original that other tests rely upon.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testSchemaGeneratorErrorMessages() throws Exception {
+ try {
+ extensionsServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configExtensionsSchemaGeneratorTest-1.0.mf");
+ extensionsServer.stopServer(true);
+ extensionsServer.setServerConfigurationFile("extensions/serverSchemaGenerator.xml");
+ extensionsServer.startServer();
+
+ String msgId = "CWWKG0063E";
+ assertNotNull("Expected message " + msgId + " not found in log.", extensionsServer.waitForStringInLog(msgId + ".*testInvalidAttribute"));
+
+ msgId = "CWWKG0064E";
+ assertNotNull("Expected message " + msgId + " not found in log.", extensionsServer.waitForStringInLog(msgId + ".*testAttr2Rename"));
+
+ msgId = "CWWKG0065E";
+ assertNotNull("Expected message " + msgId + " not found in log.", extensionsServer.waitForStringInLog(msgId + ".*test.config.extensions.parent.non.factorypid"));
+
+ msgId = "CWWKG0066E";
+ assertNotNull("Expected message " + msgId + " not found in log.", extensionsServer.waitForStringInLog(msgId + ".*test.config.extensions.sub.error.no.parent.pid"));
+ } finally {
+ //stop and package up this server
+ extensionsServer.stopServer(true);
+ //restore the original server.xml
+ //by setting our original server.xml back again
+ extensionsServer.setServerConfigurationFile("extensions/server.xml");
+ //and finally restart the server
+ extensionsServer.startServer();
+ //make sure the URL is available
+ extensionsServer.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT);
+ }
+ }
+
+ /**
+ * This tests the scenario where a PID that extends another PID that has a name=internal attr, is configured correctly.
+ */
+ @Test
+ public void testInternalExtension() throws Exception {
+
+ String servicePid = servicePidName + "=test.config.extensions.internal.super";
+
+ //check that the required attribute has been set on the internal super class
+ HttpUtils.findStringInUrl(extensionsServer,
+ CONTEXT_ROOT + "/test?pid=test.config.extensions.internal.sub1&id=internal1&prop=internalAttr1&" + servicePid,
+ "sub1Attr1");
+ }
+
+ /**
+ * This tests the scenario where a PID that extends another PID that has a name=internal attr, and is missing a required attr, issues the
+ * expected error message.
+ */
+ @Test
+ public void testInternalExtensionWithMissingRequiredAttribute() throws Exception {
+
+ String id = "CWWKG0058E";
+ assertNotNull(
+ "The error message " + id + " for internal required attribute was not found",
+ extensionsServer.waitForStringInLog(id + ".*internalsub2.*internalAttr1"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ConfigValidatorTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ConfigValidatorTest.java
new file mode 100755
index 00000000000..a84ea7cb8ac
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ConfigValidatorTest.java
@@ -0,0 +1,112 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+import componenttest.annotation.ExpectedFFDC;
+import componenttest.topology.impl.LibertyFileManager;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+/**
+ * Tests the XML signing and validation functions, ensuring correct behavior when signing is enforced
+ * and invalid documents are encountered.
+ */
+public class ConfigValidatorTest {
+
+ // Since we have tracing enabled give server longer timeout to start up.
+ private static final long SERVER_START_TIMEOUT = 30 * 1000;
+
+ @Test
+ @ExpectedFFDC({ "com.ibm.websphere.config.ConfigValidationException", "java.lang.ClassNotFoundException" })
+ public void testValidator() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.validator");
+ String jarName = "com.ibm.ws.config.ext_1.0." + server.getMicroVersion() + ".jar";
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+
+ // Backup fragment and bring in embedder validation fragment
+ LibertyFileManager.renameLibertyFile(server.getMachine(),
+ server.getInstallRoot() + "/lib/" + jarName,
+ server.getInstallRoot() + "/lib/" + jarName + ".bak");
+ server.copyFileToLibertyInstallRoot("lib", "validator/" + jarName);
+
+ try {
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+
+ server.startServer("goodSignature.log", true, true, false);
+ assertNotNull("Configuration validation should be issued",
+ server.waitForStringInLog("CWWKG0043I:.*EmbeddedXMLConfigValidator"));
+
+ // Copy in invalid server.xml, trigger refresh
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("validator/bad-signature.xml");
+ assertNotNull("An error message should be issued with invalid config refresh",
+ server.waitForStringInLog("CWWKG0047E:.*"));
+ assertNotNull("A warning message should be issued with invalid config refresh",
+ server.waitForStringInLog("CWWKG0057W:.*"));
+ assertTrue(server.isStarted());
+
+ // Stop server, don't clean up.
+ server.stopServer(false);
+
+ try {
+ server.startServerExpectFailure("badSignature.log", false, false);
+ } catch (Exception e) {
+ System.out.println("Caught exception of type " + e.getClass());
+ }
+ assertNotNull("An error message should be issued on invalid config startup",
+ server.waitForStringInLog("CWWKG0047E:.*"));
+ assertNotNull("A fatal message should be issued on invalid config startup",
+ server.waitForStringInLog("CWWKG0044E:.*"));
+ assertNotNull("The server should be stopped after invalid config startup",
+ server.waitForStringInLog("CWWKE0036I:.*"));
+
+ // Stop server, don't clean up.
+ server.stopServer(false);
+
+ // Copy in invalid server.xml
+ server.setServerConfigurationFile("validator/dropins-enabled.xml");
+
+ try {
+ server.startServerExpectFailure("dropinsEnabled.log", false, false);
+ } catch (Exception e) {
+ System.out.println("Caught exception of type " + e.getClass());
+ }
+ assertNotNull("There should be a message about a valid signature",
+ server.waitForStringInLog("CWWKG0055I:.*"));
+ assertNotNull("There should be a fatal message because dropins are enabled",
+ server.waitForStringInLog("CWWKG0056E:.*"));
+ assertNotNull("The server should be stopped after invalid config startup",
+ server.waitForStringInLog("CWWKE0036I:.*"));
+
+ } finally {
+ // Just in case one of the conditions above failed, make sure the server
+ // stops. Skip the server archive here (it would get skipped for already stopped)
+ server.stopServer(false);
+
+ // Make sure we *do* capture the data for these attempts
+ server.postStopServerArchive();
+
+ // Restore default validation fragment
+ LibertyFileManager.deleteLibertyFile(server.getMachine(),
+ server.getInstallRoot() + "/lib/" + jarName);
+ LibertyFileManager.renameLibertyFile(server.getMachine(),
+ server.getInstallRoot() + "/lib/" + jarName + ".bak",
+ server.getInstallRoot() + "/lib/" + jarName);
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/DelayedVariableTests.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/DelayedVariableTests.java
new file mode 100755
index 00000000000..bc10c617f11
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/DelayedVariableTests.java
@@ -0,0 +1,56 @@
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+public class DelayedVariableTests extends ServletRunner {
+
+ private static final String CONTEXT_ROOT = "varmergedconfig";
+
+ @Override
+ protected String getContextRoot() {
+ return CONTEXT_ROOT;
+ }
+
+ @Override
+ protected String getServletMapping() {
+ return "delayedVarTests";
+ }
+
+ private static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.delayedVar");
+
+ @Test
+ public void testVariableDelay() throws Exception {
+ test(server);
+ }
+
+ @BeforeClass
+ public static void setUpForMergedConfigTests() throws Exception {
+ //copy the config feature into the server features location
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/delayedVariable-1.0.mf");
+
+ //copy the bundle into the server lib location
+ server.copyFileToLibertyInstallRoot("lib", "bundles/test.config.variables_1.0.0.jar");
+
+ server.startServer("delayedVariables.log");
+ //make sure the URL is available
+ assertNotNull(server.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT));
+ assertNotNull(server.waitForStringInLog("CWWKF0011I"));
+ }
+
+ @AfterClass
+ public static void shutdown() throws Exception {
+ server.stopServer();
+ server.deleteFileFromLibertyInstallRoot("lib/features/configfatlibertyinternals-1.0.mf");
+ server.deleteFileFromLibertyInstallRoot("lib/test.config.variables_1.0.0.jar");
+ server.deleteFileFromLibertyInstallRoot("lib/features/delayedVariable-1.0.mf");
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/DropinsTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/DropinsTest.java
new file mode 100755
index 00000000000..bcb4ce55d85
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/DropinsTest.java
@@ -0,0 +1,240 @@
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import componenttest.annotation.ExpectedFFDC;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+public class DropinsTest extends ServletRunner {
+
+ private static final String CONTEXT_ROOT = "configdropins";
+
+ @Override
+ protected String getContextRoot() {
+ return CONTEXT_ROOT;
+ }
+
+ @Override
+ protected String getServletMapping() {
+ return "dropinsTest";
+ }
+
+ private static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.dropins");
+
+ @Test
+ public void testNonXmlFile() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinDefaultConfiguration("dropins/simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/simple.notxml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinDefaultConfiguration("simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("simple.notxml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ @ExpectedFFDC("com.ibm.websphere.config.ConfigParserException")
+ public void testBrokenDropin() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/simple.xml");
+ server.addDropinDefaultConfiguration("dropins/aBrokenFile.xml");
+ server.addDropinOverrideConfiguration("dropins/aBrokenFile.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ assertEquals("There should be two CWWKG0014E errors", 2, server.waitForMultipleStringsInLog(2, "CWWKG0014E"));
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("simple.xml");
+ server.deleteDropinDefaultConfiguration("aBrokenFile.xml");
+ server.deleteDropinOverrideConfiguration("aBrokenFile.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ public void testSimpleDefaults() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinDefaultConfiguration("dropins/simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinDefaultConfiguration("simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ public void testSimpleOverrides() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ public void testSimpleOverrides2() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/simple2.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("simple2.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ public void testDefaultsOrdering() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinDefaultConfiguration("dropins/simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.addDropinDefaultConfiguration("dropins/simple2.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinDefaultConfiguration("simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.deleteDropinDefaultConfiguration("simple2.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ public void testOverridesOrdering() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/simple2.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("simple.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("simple2.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ public void testNoServerValue1() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinDefaultConfiguration("dropins/alibrary.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinDefaultConfiguration("alibrary.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ public void testNoServerValue2() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/alibrary.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("alibrary.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @Test
+ public void testNoServerValue3() throws Exception {
+ try {
+ server.setMarkToEndOfLog();
+ server.addDropinDefaultConfiguration("dropins/alibrary.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.addDropinOverrideConfiguration("dropins/blibrary.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ } finally {
+ server.setMarkToEndOfLog();
+ server.deleteDropinDefaultConfiguration("alibrary.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ server.setMarkToEndOfLog();
+ server.deleteDropinOverrideConfiguration("blibrary.xml");
+ server.waitForConfigUpdateInLogUsingMark(null);
+ }
+ }
+
+ @BeforeClass
+ public static void setUpForDropinsTests() throws Exception {
+ //copy the feature into the server features location
+
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+
+ // Delete dropin configurations just in case
+ server.deleteAllDropinConfigurations();
+
+ server.startServer("configDropins.log");
+
+ //make sure the URL is available
+ assertNotNull(server.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT));
+ assertNotNull(server.waitForStringInLog("CWWKF0011I"));
+
+ }
+
+ @AfterClass
+ public static void shutdown() throws Exception {
+ server.stopServer();
+ server.deleteFileFromLibertyInstallRoot("lib/features/configfatlibertyinternals-1.0.mf");
+
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FATSuite.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FATSuite.java
new file mode 100755
index 00000000000..845f3c16802
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FATSuite.java
@@ -0,0 +1,39 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2012
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({
+ ServerConfigTest.class,
+ ConfigExtensionsTest.class,
+ ConfigValidatorTest.class,
+ ChildAliasTest.class,
+ ProductExtensionsTest.class,
+ BadConfigTests.class,
+ MergedConfigTests.class,
+ VariableMergeTests.class,
+ MetatypeProviderTest.class,
+ WSConfigurationHelperTest.class,
+ SchemaGeneratorMBeanTest.class,
+ FeaturelistGeneratorMBeanTest.class,
+ ServerXMLConfigurationMBeanTest.class,
+ DropinsTest.class,
+ DelayedVariableTests.class
+
+})
+public class FATSuite {
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FeatureUpdateTests.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FeatureUpdateTests.java
new file mode 100755
index 00000000000..64da2e209a9
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FeatureUpdateTests.java
@@ -0,0 +1,107 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2014
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Set;
+
+import org.junit.Test;
+
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+/**
+ *
+ */
+public class FeatureUpdateTests {
+ private void test(LibertyServer server, String testUri) throws Exception {
+ HttpURLConnection con = null;
+ try {
+ URL url = new URL("http://" + server.getHostname() + ":" + server.getHttpDefaultPort() + testUri);
+ con = (HttpURLConnection) url.openConnection();
+ con.setDoInput(true);
+ con.setDoOutput(true);
+ con.setUseCaches(false);
+ con.setRequestMethod("GET");
+ InputStream is = con.getInputStream();
+ assertNotNull(is);
+
+ String output = read(is);
+ System.out.println(output);
+ assertTrue(output, output.trim().startsWith("Test Passed"));
+ } finally {
+ if (con != null) {
+ con.disconnect();
+ }
+ }
+ }
+
+ private static String read(InputStream in) throws IOException {
+ InputStreamReader isr = new InputStreamReader(in);
+ BufferedReader br = new BufferedReader(isr);
+ StringBuilder builder = new StringBuilder();
+ String line;
+ while ((line = br.readLine()) != null) {
+ builder.append(line);
+ builder.append(System.getProperty("line.separator"));
+ }
+ return builder.toString();
+ }
+
+ private final Set emptySet = Collections.emptySet();
+
+ // Just make sure we don't get an FFDC when we remove a feature that something else has a reference to.
+ // In this test, the reference is also ibm:flat
+ @Test
+ public void testFeatureRemovalFlat() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.features");
+ server.startServer("removeJDBCFeature.log");
+
+ try {
+ // switch to new configuration to remove jdbc-4.0 feature
+ server.setServerConfigurationFile("featureRemove/serverRemoveJDBC.xml");
+ assertNotNull("The server configuration update should complete",
+ server.waitForConfigUpdateInLogUsingMark(emptySet));
+ } finally {
+ server.stopServer();
+ }
+
+ }
+
+ // Just make sure we don't get an FFDC when we remove a feature that something else has a reference to.
+ // In this test, the reference is not marked ibm:flat
+ // We're also removing the configuration that the OpenID feature config points to.
+ @Test
+ public void testFeatureRemoval() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.features");
+ server.startServer("removeOpenIDFeature.log");
+
+ try {
+ // switch to new configuration to remove jdbc-4.0 feature
+ server.setServerConfigurationFile("featureRemove/serverRemoveOpenID.xml");
+ assertNotNull("The server configuration update should complete",
+ server.waitForConfigUpdateInLogUsingMark(emptySet));
+ } finally {
+ server.stopServer();
+ }
+
+ }
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FeaturelistGeneratorMBeanTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FeaturelistGeneratorMBeanTest.java
new file mode 100755
index 00000000000..08210a096c2
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/FeaturelistGeneratorMBeanTest.java
@@ -0,0 +1,376 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2014
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.security.SecureRandom;
+import java.security.cert.X509Certificate;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.management.JMX;
+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.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.ibm.websphere.config.mbeans.FeatureListMBean;
+import com.ibm.websphere.filetransfer.FileTransferMBean;
+import com.ibm.websphere.simplicity.RemoteFile;
+import com.ibm.websphere.simplicity.log.Log;
+import com.ibm.ws.jmx.connector.client.rest.ClientProvider;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+/**
+ * FAT-Tests to test the functionality of com.ibm.websphere.config.mbeans.FeatureListMBean
+ */
+public class FeaturelistGeneratorMBeanTest {
+
+ private static Class> logClass = FeaturelistGeneratorMBeanTest.class;
+
+ private static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.schemaGen.mbean");
+
+ private static String outputDir;
+ private static MBeanServerConnection connection;
+ private static JMXConnector jmxConnector;
+
+ private static ObjectName featurelistGenObjName;
+ private static ObjectName fileTranObjectName;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ final String methodName = "setUp";
+ Log.entering(logClass, methodName);
+
+ outputDir = server.getServerRoot();
+ Log.info(logClass, methodName, "serverRoot=" + outputDir);
+
+ Log.info(logClass, methodName, "Starting server=" + server.getServerName());
+ server.startServer();
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKT0016I.*IBMJMXConnectorREST'");
+ assertNotNull("'CWWKT0016I.*IBMJMXConnectorREST' was not received on server",
+ server.waitForStringInLog("CWWKT0016I.*IBMJMXConnectorREST"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKO0219I.*ssl'");
+ assertNotNull("'CWWKO0219I.*ssl' was not recieved on server",
+ server.waitForStringInLog("CWWKO0219I.*ssl"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWPKI0803A.*ssl'");
+ assertNotNull("'CWPKI0803A.*ssl' was not generated on server",
+ server.waitForStringInLog("CWPKI0803A"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKS0008I: The security service is ready'");
+ assertNotNull("'CWWKS0008I: The security service is ready' was not generated on server",
+ server.waitForStringInLog("CWWKS0008I"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKS4105I: LTPA configuration is ready'");
+ assertNotNull("'CWWKS4105I: LTPA configuration is ready' was not generated on server",
+ server.waitForStringInLog("CWWKS4105I"));
+
+ // Set up the trust store
+ TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
+ @Override
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+
+ @Override
+ public void checkClientTrusted(X509Certificate[] certs, String authType) {}
+
+ @Override
+ public void checkServerTrusted(X509Certificate[] certs, String authType) {}
+ } };
+
+ SSLContext sc = SSLContext.getInstance("SSL");
+ sc.init(null, trustAllCerts, new SecureRandom());
+ HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ HostnameVerifier hv = new HostnameVerifier() {
+ @Override
+ public boolean verify(String urlHostName, SSLSession session) {
+ return true;
+ }
+ };
+ HttpsURLConnection.setDefaultHostnameVerifier(hv);
+
+ Map environment = new HashMap();
+ environment.put("jmx.remote.protocol.provider.pkgs", "com.ibm.ws.jmx.connector.client");
+ environment.put(JMXConnector.CREDENTIALS, new String[] { "theUser", "thePassword" });
+ environment.put(ClientProvider.DISABLE_HOSTNAME_VERIFICATION, true);
+ environment.put(ClientProvider.READ_TIMEOUT, 2 * 60 * 1000);
+ JMXServiceURL url = new JMXServiceURL("REST", "localhost", getSSLPort(), "/IBMJMXConnectorREST");
+ Log.info(logClass, methodName, "JMXServiceURL=" + url.toString());
+ jmxConnector = JMXConnectorFactory.connect(url, environment);
+ assertNotNull("JMXConnector should not be null", jmxConnector);
+ connection = jmxConnector.getMBeanServerConnection();
+ assertNotNull("MBeanServerConnection should not be null", connection);
+
+ featurelistGenObjName = new ObjectName(FeatureListMBean.OBJECT_NAME);
+ fileTranObjectName = new ObjectName(FileTransferMBean.OBJECT_NAME);
+
+ Log.exiting(logClass, "setUp");
+ }
+
+ @AfterClass
+ public static void cleanUp() throws Exception {
+ String methodName = "tearDown";
+ Log.entering(logClass, methodName);
+
+ if (server != null && server.isStarted()) {
+ Log.finer(logClass, methodName, "Server is up, stopping it");
+ jmxConnector.close();
+ server.stopServer();
+ }
+ Log.exiting(logClass, methodName);
+ }
+
+ /**
+ * Invoke FeaturelistMBean.generate method
+ *
+ * @param params
+ * @return response from MBean invoke
+ * @throws Exception
+ */
+ private Map invokeFeatureListMBeanGenerate(Object[] params) throws Exception {
+ Log.entering(logClass, "invokeFeatureListMBeanGenerate", params);
+ String[] signature = new String[] { "java.lang.String", "java.lang.String", "java.lang.String" };
+
+ @SuppressWarnings("unchecked")
+ Map returnedMap = (Map) connection.invoke(featurelistGenObjName, "generate", params, signature);
+ Log.info(logClass, "invokeFeatureListMBeanGenerate", returnedMap.toString());
+ Log.exiting(logClass, "invokeFeatureListMBeanGenerate", returnedMap);
+ return returnedMap;
+ }
+
+ /**
+ * Invoke FileTransferMBean.downloadFile method
+ *
+ * @param params
+ * @throws Exception
+ */
+ private void invokeFileTransferMBeanDownloadFile(Object[] params) throws Exception {
+ Log.entering(logClass, "invokeFileTransferMBeanDownloadFile", params);
+ String[] signature = new String[] { "java.lang.String", "java.lang.String" };
+ connection.invoke(fileTranObjectName, "downloadFile", params, signature);
+ Log.exiting(logClass, "invokeFileTransferMBeanDownloadFile");
+ }
+
+ /**
+ * Invoke FileTransferMBean.deleteFile method
+ *
+ * @param params
+ * @throws Exception
+ */
+ private void invokeFileTransferMBeanDeleteFile(Object[] params) throws Exception {
+ Log.entering(logClass, "invokeFileTransferMBeanDeleteFile", params);
+ String[] signature = new String[] { "java.lang.String" };
+ connection.invoke(fileTranObjectName, "deleteFile", params, signature);
+ Log.exiting(logClass, "invokeFileTransferMBeanDeleteFile");
+ }
+
+ /**
+ * Invoke FeaturelistMBean.generate method
+ *
+ * @param encoding, locale, productExtension is empty
+ * @throws Exception
+ */
+ @Test
+ public void testEmptyStrings() throws Exception {
+ //Invoke featureList generation
+ Object[] params = new String[] { "", "", "" }; //encoding, locale, productExtension
+ Map returnedMap = invokeFeatureListMBeanGenerate(params);
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(FeatureListMBean.KEY_RETURN_CODE) == 0);
+
+ //Ensure generated file is bigger than 0.1 MB
+ String filePath = returnedMap.get(FeatureListMBean.KEY_FILE_PATH).toString();
+ File file = new File(filePath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath(), file.length() > 100000);
+ }
+
+ /**
+ * Invoke FeaturelistMBean.generate method
+ *
+ * @param encoding, locale, productExtension is empty
+ * @throws Exception
+ */
+ @Test
+ public void testInvalidEncoding() throws Exception {
+ final String encodingValue = "en-Test";
+
+ Object[] params = new String[] { encodingValue, null, null }; //encoding, locale, productExtension
+ Map returnedMap = invokeFeatureListMBeanGenerate(params);
+
+ //Check return code
+ assertTrue("Return Code should be 21 and not 0", (Integer) returnedMap.get(FeatureListMBean.KEY_RETURN_CODE) != 0);
+
+ //Retrieve output
+ String output = (String) returnedMap.get(FeatureListMBean.KEY_OUTPUT);
+ assertTrue("Output does not contain expected UnsupportedEncodingException. output=" + output, output.contains("java.io.UnsupportedEncodingException: " + encodingValue));
+ }
+
+ /**
+ * Invoke FeaturelistMBean.generate method
+ *
+ * @param encoding, locale is invalid, productExtension
+ * @throws Exception
+ */
+ @Test
+ public void testInvalidLocale() throws Exception {
+ final String localeValue = "localeTest";
+
+ Object[] params = new String[] { null, localeValue, null }; //encoding, locale, productExtension
+ Map returnedMap = invokeFeatureListMBeanGenerate(params);
+
+ //Check return code
+ assertTrue("Return Code should be 0", (Integer) returnedMap.get(FeatureListMBean.KEY_RETURN_CODE) == 0);
+
+ //Ensure generated file is bigger than 0.1 MB
+ String filePath = returnedMap.get(FeatureListMBean.KEY_FILE_PATH).toString();
+ File file = new File(filePath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath(), file.length() > 100000);
+ }
+
+ /**
+ * Invoke FeaturelistMBean.generate method
+ *
+ * @param encoding, locale, productExtension is invalid
+ * @throws Exception
+ */
+ @Test
+ public void testInvalidProductExt() throws Exception {
+ final String productExtValue = "productExt";
+
+ Object[] params = new String[] { null, null, productExtValue }; //encoding, locale, productExtension
+ Map returnedMap = invokeFeatureListMBeanGenerate(params);
+
+ //Check return code
+ assertTrue("Return Code should be 21 and not 0", (Integer) returnedMap.get(FeatureListMBean.KEY_RETURN_CODE) == 21);
+
+ //Retrieve output
+ String output = (String) returnedMap.get(FeatureListMBean.KEY_OUTPUT);
+ assertTrue("Output does not contain expected CWWKG0080E. output=" + output,
+ output.contains("CWWKG0080E"));
+ }
+
+ /**
+ * Invoke FeaturelistMBean.generate method and using FileTransferMBean remotely to download
+ * feature list file and deletes it
+ *
+ * @param encoding, locale, productExtension is empty
+ * @throws Exception
+ */
+ @Test
+ public void testGenerateDownloadAndDelete() throws Exception {
+ Object[] params = new String[] { "UTF-16", "fr", "" }; //encoding, locale, productExtension
+ Map returnedMap = invokeFeatureListMBeanGenerate(params);
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(FeatureListMBean.KEY_RETURN_CODE) == 0);
+
+ //Download generated file
+ String sourcePath = returnedMap.get(FeatureListMBean.KEY_FILE_PATH).toString();
+ String targetPath = outputDir + "/download_target/featurelistNonDefault.xml";
+
+ params = new Object[] { sourcePath, targetPath };
+ invokeFileTransferMBeanDownloadFile(params);
+
+ //Ensure the file is bigger than 0.1 MB
+ File file = new File(targetPath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath(), file.length() > 100000);
+
+ // Remotely delete the generated featurelist file
+ RemoteFile remoteFile = server.getMachine().getFile(sourcePath);
+
+ //first check if the file exists
+ assertTrue("Generated featurelist file should exist at this point. remoteFile=" + remoteFile.getAbsolutePath(), remoteFile.exists());
+
+ params = new Object[] { remoteFile.getAbsolutePath() };
+ invokeFileTransferMBeanDeleteFile(params);
+
+ //Verify the file is deleted
+ assertFalse("Generated featurelist file should have been deleted. remoteFile=" + remoteFile.getAbsolutePath(), remoteFile.exists());
+ }
+
+ /**
+ * Invoke FeaturelistMBean.generate method with correct parameters
+ *
+ * @param encoding, locale, productExtension
+ * @throws Exception
+ */
+ @Test
+ public void testGenerateSuccessfulFeaturelist() throws Exception {
+ Object[] params = new String[] { "UTF-8", Locale.getDefault().toString(), null }; //encoding, locale, productExtension
+ Map returnedMap = invokeFeatureListMBeanGenerate(params);
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(FeatureListMBean.KEY_RETURN_CODE) == 0);
+
+ //Ensure generated file is bigger than 0.1 MB
+ String filePath = returnedMap.get(FeatureListMBean.KEY_FILE_PATH).toString();
+ File file = new File(filePath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath(), file.length() > 100000);
+
+ }
+
+ /**
+ * Invoke FeaturelistMBean.generate method using the JMX MBean API
+ * downloads the feature list and transfers it over using FileTransfer MBean
+ *
+ * @param encoding, locale, productExtension
+ * @throws Exception
+ */
+ @Test
+ public void testFeaturelistGenMBeanCallAPI() throws Exception {
+ FeatureListMBean featurelistGenMbean = JMX.newMBeanProxy(connection, featurelistGenObjName, FeatureListMBean.class);
+ assertNotNull("We should have got access to the FeatureListMBean API", featurelistGenMbean);
+
+ Map returnedMap = featurelistGenMbean.generate(null, null, null); //encoding, locale, productExtension
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(FeatureListMBean.KEY_RETURN_CODE) == 0);
+
+ //Download generated file
+ String sourcePath = returnedMap.get(FeatureListMBean.KEY_FILE_PATH).toString();
+ String targetPath = outputDir + "/download_target/featurelistNonDefault.xml";
+
+ Object[] params = new Object[] { sourcePath, targetPath };
+ invokeFileTransferMBeanDownloadFile(params);
+
+ //Ensure the file is bigger than 0.1 MB
+ File file = new File(targetPath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath(), file.length() > 100000);
+ }
+
+ private static int getSSLPort() {
+ return Integer.valueOf(System.getProperty("HTTP_default.secure", "8020"));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/MergedConfigTests.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/MergedConfigTests.java
new file mode 100755
index 00000000000..2d490b5b590
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/MergedConfigTests.java
@@ -0,0 +1,141 @@
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+public class MergedConfigTests extends ServletRunner {
+
+ private static final String CONTEXT_ROOT = "mergedconfig";
+ private static final String ALL_IN_ONE_SERVER = "merge/allInOne.xml";
+ private static final String IGNORE_SERVER = "merge/ignore.xml";
+ private static final String REPLACE_SERVER = "merge/replace.xml";
+ private static final String MERGE_SERVER = "merge/merge.xml";
+ private static final String IGNORE_REPLACE_SERVER = "merge/ignoreReplace.xml";
+ private static final String FOUR_LEVEL_REPLACE_SERVER = "merge/fourLevelReplace.xml";
+ private static final String FOUR_LEVEL_IGNORE_SERVER = "merge/fourLevelIgnore.xml";
+
+ @Override
+ protected String getContextRoot() {
+ return CONTEXT_ROOT;
+ }
+
+ @Override
+ protected String getServletMapping() {
+ return "mergedConfigTest";
+ }
+
+ private static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.merging");
+
+ @Test
+ public void testMergedConfig() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(ALL_IN_ONE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+
+ }
+
+ @Test
+ public void testMergedIncludesReplace() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(REPLACE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @Test
+ public void testMergedIncludesIgnore() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(IGNORE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @Test
+ public void testMergedIncludesMerge() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(MERGE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @Test
+ public void testMergedIncludesIgnoreReplace() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(IGNORE_REPLACE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @Test
+ public void testMergedIncludesFourLevelReplace() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(FOUR_LEVEL_REPLACE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @Test
+ public void testMergedIncludesFourLevelIgnore() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(FOUR_LEVEL_IGNORE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @Test
+ public void testDefaultInstances1() throws Exception {
+ // Test that a normal defaultInstances file was read. This works with any of the server.xml files, so no need to
+ // update.
+ test(server);
+ }
+
+ @Test
+ public void testDefaultInstances2() throws Exception {
+ // Verify onConflict="merge_when_exists". Works with any server.xml from these tests, so no need to update it.
+ test(server);
+ }
+
+ @Test
+ public void testDefaultInstances3() throws Exception {
+ // Verify onConflict="merge_when_does_not_exist". Works with any server.xml from these tests, so no need to update it.
+ test(server);
+ }
+
+ @BeforeClass
+ public static void setUpForMergedConfigTests() throws Exception {
+ //copy the feature into the server features location
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/mergedConfigTest-1.0.mf");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+
+ //copy the bundle into the server lib location
+ server.copyFileToLibertyInstallRoot("lib", "bundles/test.merged.config_1.0.0.jar");
+
+ server.startServer("mergedConfig.log");
+ //make sure the URL is available
+ assertNotNull(server.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT));
+ assertNotNull(server.waitForStringInLog("CWWKF0011I"));
+ }
+
+ @AfterClass
+ public static void shutdown() throws Exception {
+ server.stopServer();
+ server.deleteFileFromLibertyInstallRoot("lib/features/mergedConfigTest-1.0.mf");
+ server.deleteFileFromLibertyInstallRoot("lib/test.merged.config_1.0.0.jar");
+ server.deleteFileFromLibertyInstallRoot("lib/features/configfatlibertyinternals-1.0.mf");
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/MetatypeProviderTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/MetatypeProviderTest.java
new file mode 100755
index 00000000000..702bbe38371
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/MetatypeProviderTest.java
@@ -0,0 +1,88 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2012, 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+//@Mode(TestMode.FULL)
+public class MetatypeProviderTest extends ServletRunner {
+
+ private static final String CONTEXT_ROOT = "metatypeprovider";
+ private static final String NO_METATYPE_SERVER = "metatype/noMetatypeServer.xml";
+ private static final String ORIGINAL_SERVER = "metatype/server.xml";
+
+ @Override
+ protected String getContextRoot() {
+ return CONTEXT_ROOT;
+ }
+
+ @Override
+ protected String getServletMapping() {
+ return "providerTest";
+ }
+
+ private static LibertyServer testServer = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.metatype.provider");
+
+ @BeforeClass
+ public static void setUpForMetatypeProviderTests() throws Exception {
+ //copy the feature into the server features location
+ testServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/metatypeProviderTest-1.0.mf");
+ testServer.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+
+ //copy the bundle into the server lib location
+ testServer.copyFileToLibertyInstallRoot("lib", "bundles/test.metatype.provider_1.0.0.jar");
+
+ testServer.startServer();
+ //make sure the URL is available
+ assertNotNull(testServer.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT));
+ assertNotNull(testServer.waitForStringInLog("CWWKF0011I"));
+ }
+
+ @AfterClass
+ public static void shutdown() throws Exception {
+ testServer.stopServer();
+ testServer.deleteFileFromLibertyInstallRoot("lib/features/metatypeProviderTest-1.0.mf");
+ testServer.deleteFileFromLibertyInstallRoot("lib/test.metatype.provider_1.0.0.jar");
+ testServer.deleteFileFromLibertyInstallRoot("lib/features/configfatlibertyinternals-1.0.mf");
+ }
+
+ @Test
+ public void testMetatypeProvider1() throws Exception {
+ test(testServer);
+ }
+
+ @Test
+ public void testMetatypeProvider2() throws Exception {
+ test(testServer);
+ }
+
+ @Test
+ public void testMetatypeProvider3() throws Exception {
+
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile(NO_METATYPE_SERVER);
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+
+ test(testServer);
+
+ testServer.setMarkToEndOfLog();
+ testServer.setServerConfigurationFile(ORIGINAL_SERVER);
+ testServer.waitForConfigUpdateInLogUsingMark(null);
+ }
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ProductExtensionsTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ProductExtensionsTest.java
new file mode 100755
index 00000000000..314891cd122
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ProductExtensionsTest.java
@@ -0,0 +1,384 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.ibm.websphere.simplicity.ProgramOutput;
+import com.ibm.websphere.simplicity.RemoteFile;
+import com.ibm.websphere.simplicity.log.Log;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+import componenttest.topology.utils.HttpUtils;
+
+/**
+ * Schema product extension tests.
+ */
+public class ProductExtensionsTest {
+ public static final Class> c = ProductExtensionsTest.class;
+ public static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.product.extension");
+ public static String javaExc;
+ public static String installRoot;
+
+ // Product extension variables.
+ public static final String PRODUCT_FEATURE_PATH = "producttest/lib/features/";
+ public static final String PRODUCT_BUNDLE_PATH = "producttest/lib/";
+ public static final String PRODUCT_EXTENSIONS_PATH = "etc/extensions/";
+ public static final String PRODUCT_EXT_NAME = "testproduct";
+ public static final String PRODUCT_FEATURE_PROPERTIES_FILE = "productExtensions/propertiesFiles/testproduct.properties";
+ public static final String PRODUCT_FEATURE_PRODTEST_MF = "productExtensions/features/prodtest1-1.0.mf";
+ public static final String PRODUCT_FEATURE_PRODTEST_JAR = "bundles/test.prod.extensions_1.0.0.jar";
+ public static final String PROD_EXT_CONTEXT_ROOT = "/product1-extensions-test";
+ public static final String PRODUCT_CONFIG_ALIAS = "prodtest1Config";
+ public static final String PRODUCT_SERVER_XML_INVALID = "productExtensions/config/prod.ext.invalid.server.xml";
+ public static final String PRODUCT_SERVER_XML_VALID = "productExtensions/config/prod.ext.valid.server.xml";
+ public static final String PRODUCT_SERVER_XML_USING_FACTORY_PID = "productExtensions/config/prod.ext.factory.pid.server.xml";
+
+ // User product extension variables.
+ public static final String USER_FEATURE_PATH = "usr/extension/lib/features/";
+ public static final String USER_BUNDLE_PATH = "usr/extension/lib/";
+ public static final String USER_FEATURE_PRODTEST_MF = "productExtensions/features/userProdtest1-1.0.mf";
+ public static final String USER_BUNDLE_JAR = "bundles/test.user.prod.extensions_1.0.0.jar";
+ public static final String USER_CONFIG_ALIAS = "userProdtest1Config";
+ public static final String USER_PRODUCT_SERVER_XML_INVALID = "productExtensions/config/user.prod.ext.invalid.server.xml";
+ public static final String USER_PRODUCT_SERVER_XML_VALID = "productExtensions/config/user.prod.ext.valid.server.xml";
+ public static final String USER_PRODUCT_SERVER_XML_USING_FACTORY_PID = "productExtensions/config/user.prod.ext.factory.pid.server.xml";
+ private static final String USER_PROD_EXT_CONTEXT_ROOT = "/user.product1-extensions-test";
+
+ // Other variables.
+ public static final String CORE_PRODUCT_NAME = "core";
+ public static final String USR_PRODUCT_NAME = "usr";
+ private static final String PASS_STRING = "TEST_PASSED";
+
+ /**
+ * Setup the environment.
+ *
+ * @param svr The server instance.
+ *
+ * @throws Exception
+ */
+ @BeforeClass
+ public static void setupEnv() throws Exception {
+ final String METHOD_NAME = "setup";
+ Log.entering(c, METHOD_NAME);
+ server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.product.extension");
+ installRoot = server.getInstallRoot();
+ javaExc = System.getProperty("java.home") + "/bin/java";
+ Log.info(c, METHOD_NAME, "java: " + javaExc);
+ Log.info(c, METHOD_NAME, "installRoot: " + installRoot);
+
+ // Install product extensions.
+ installProductExtension();
+ installUserProductExtension();
+
+ // Create a directory to store the output files.
+ File toolsOutputDir = new File(installRoot + "/tool.output.dir");
+ toolsOutputDir.mkdir();
+ }
+
+ /**
+ * Cleans up the installation from any files that may have been left around.
+ *
+ * @throws Exception
+ */
+ @AfterClass
+ public static void AfterClassCleanup() throws Exception {
+ final String METHOD_NAME = "cleanup";
+ Log.entering(c, METHOD_NAME);
+
+ tidyup();
+
+ Log.exiting(c, METHOD_NAME);
+ }
+
+ /**
+ * Tests that the ws-schema.jar tool accounts for product extensions.
+ * The test is expected successfully complete and the product names must be tagged appropriately in the
+ * serverType section of the generated schema.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testSchemaGeneratorToolOutputForTaggedProdExtEntries() throws Exception {
+ final String METHOD_NAME = "testFeatureToolWithProdExtArgument";
+ Log.entering(c, METHOD_NAME);
+
+ String[] parms = new String[] { "-jar", installRoot + "/bin/tools/ws-schemagen.jar", installRoot + "/tool.output.dir/schema.xml" };
+ ProgramOutput po = server.getMachine().execute(javaExc, parms, installRoot);
+ logInfo(po, "tool.output.dir/prodExtFeaturelist.xml");
+
+ RemoteFile rf = server.getFileFromLibertyInstallRoot("tool.output.dir/schema.xml");
+
+ InputStream in = rf.openForReading();
+ DataInputStream dis = new DataInputStream(in);
+ BufferedReader br = new BufferedReader(new InputStreamReader(dis));
+ String line;
+
+ boolean foundUsrConfigElement = false;
+ boolean foundProdConfigElement = false;
+ int prefixedElementsCount = 0;
+ boolean foundServerTypeElement = false;
+ while ((line = br.readLine()) != null) {
+ if (!foundServerTypeElement && line.contains("name=\"serverType\"")) {
+ foundServerTypeElement = true;
+ }
+
+ if (foundServerTypeElement) {
+ if (line.contains("name=\"" + USR_PRODUCT_NAME + "_" + USER_CONFIG_ALIAS + "\"")) {
+ prefixedElementsCount++;
+ foundUsrConfigElement = true;
+ } else if (line.contains("name=\"" + PRODUCT_EXT_NAME + "_" + PRODUCT_CONFIG_ALIAS + "\"")) {
+ prefixedElementsCount++;
+ foundProdConfigElement = true;
+ }
+ }
+ }
+
+ assertTrue("There should have been only 2 elements prefixed with _", (prefixedElementsCount == 2));
+ assertTrue("There should have been a " + USR_PRODUCT_NAME + "_" + USER_CONFIG_ALIAS + " element in the schemaOutput.", foundUsrConfigElement);
+ assertTrue("There should have been a " + PRODUCT_EXT_NAME + "_" + PRODUCT_CONFIG_ALIAS + " element in the schemaOutput.", foundProdConfigElement);
+
+ Log.exiting(c, METHOD_NAME);
+ }
+
+ /**
+ * Test a product extension installation with metatype configuration.
+ * The test is expected to successfully complete.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testProductInstallWithMetatypeConfig() throws Exception {
+ String method = "testProductInstallWithMetatypeConfig";
+ Log.entering(c, method);
+
+ server.setServerConfigurationFile(PRODUCT_SERVER_XML_VALID);
+ server.startServer();
+ try {
+ server.waitForStringInLog("CWWKT0016I.*" + PROD_EXT_CONTEXT_ROOT);
+ HttpUtils.findStringInUrl(server, PROD_EXT_CONTEXT_ROOT + "/test", PASS_STRING);
+ } finally {
+ server.stopServer();
+ }
+
+ Log.exiting(c, method);
+ }
+
+ /**
+ * Test a product extension installation with the an invalid OCD alias configuration.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testProductInstallWithInvalidAliasConfig() throws Exception {
+ String method = "testProductInstallWithInvalidAliasConfig";
+ Log.entering(c, method);
+
+ server.setServerConfigurationFile(PRODUCT_SERVER_XML_INVALID);
+ server.startServer();
+ try {
+ server.waitForStringInLog("CWWKT0016I.*" + PROD_EXT_CONTEXT_ROOT);
+ HttpUtils.findStringInUrl(server, PROD_EXT_CONTEXT_ROOT + "/test", "TEST_FAILED: getAttribute1 returned: null");
+ } finally {
+ server.stopServer();
+ }
+
+ Log.exiting(c, method);
+ }
+
+ /**
+ * Test a user product extension installation with metatype configuration.
+ * The test is expected to successfully complete.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testUserProductInstallWithMetatypeConfig() throws Exception {
+ String method = "testUserProductInstallWithMetatypeConfig";
+ Log.entering(c, method);
+
+ server.setServerConfigurationFile(USER_PRODUCT_SERVER_XML_VALID);
+ server.startServer();
+ try {
+ server.waitForStringInLog("CWWKT0016I.*" + USER_PROD_EXT_CONTEXT_ROOT);
+ HttpUtils.findStringInUrl(server, USER_PROD_EXT_CONTEXT_ROOT + "/test", PASS_STRING);
+ } finally {
+ server.stopServer();
+ }
+
+ Log.exiting(c, method);
+ }
+
+ /**
+ * Test a product extension installation with the an invalid OCD alias configuration.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testUserProductInstallWithInvalidAliasConfig() throws Exception {
+ String method = "testUserProductInstallWithInvalidAliasConfig";
+ Log.entering(c, method);
+
+ server.setServerConfigurationFile(USER_PRODUCT_SERVER_XML_INVALID);
+ server.startServer();
+ try {
+ server.waitForStringInLog("CWWKT0016I.*" + USER_PROD_EXT_CONTEXT_ROOT);
+ HttpUtils.findStringInUrl(server, USER_PROD_EXT_CONTEXT_ROOT + "/test", "TEST_FAILED: getAttribute1 returned: null");
+ } finally {
+ server.stopServer();
+ }
+
+ Log.exiting(c, method);
+ }
+
+ /**
+ * Test a product extension installation with metatype configuration using the factory pid
+ * The test is expected to successfully complete.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testProductInstallWithMetatypeConfigUsingFactoryPid() throws Exception {
+ String method = "testProductInstallWithMetatypeConfigUsingFactoryPid";
+ Log.entering(c, method);
+
+ server.setServerConfigurationFile(PRODUCT_SERVER_XML_USING_FACTORY_PID);
+ server.startServer();
+ try {
+ server.waitForStringInLog("CWWKT0016I.*" + PROD_EXT_CONTEXT_ROOT);
+ HttpUtils.findStringInUrl(server, PROD_EXT_CONTEXT_ROOT + "/test", PASS_STRING);
+ } finally {
+ server.stopServer();
+ }
+
+ Log.exiting(c, method);
+ }
+
+ /**
+ * Test a user product extension installation with metatype configuration using the factory pid.
+ * The test is expected to successfully complete.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testUserProductInstallWithMetatypeConfigUsingFactoryPid() throws Exception {
+ String method = "testUserProductInstallWithMetatypeConfigUsingFactoryPid";
+ Log.entering(c, method);
+
+ server.setServerConfigurationFile(USER_PRODUCT_SERVER_XML_USING_FACTORY_PID);
+ server.startServer();
+ try {
+ server.waitForStringInLog("CWWKT0016I.*" + USER_PROD_EXT_CONTEXT_ROOT);
+ HttpUtils.findStringInUrl(server, USER_PROD_EXT_CONTEXT_ROOT + "/test", PASS_STRING);
+ } finally {
+ server.stopServer();
+ }
+
+ Log.exiting(c, method);
+ }
+
+ /**
+ * Prints an extended debug output.
+ *
+ * @param po The programOutput
+ * @param fileName
+ * @throws Exception
+ */
+ public void logInfo(ProgramOutput po, String fileName) throws Exception {
+ String methodName = "logInfo";
+ Log.info(c, methodName, "Return Code: " + po.getReturnCode() + ". STDOUT: " + po.getStdout());
+
+ if (po.getReturnCode() != 0) {
+ Log.info(c, methodName, "STDERR: " + po.getStderr());
+ RemoteFile rf = server.getFileFromLibertyInstallRoot(fileName);
+ BufferedReader br = new BufferedReader(new InputStreamReader(rf.openForReading()));
+ StringBuffer sb = new StringBuffer();
+ String line = null;
+ while ((line = br.readLine()) != null) {
+ sb.append(line);
+ sb.append("\n");
+ }
+ Log.info(c, methodName, "File " + fileName + " content:\n" + sb.toString());
+ br.close();
+ }
+ }
+
+ /**
+ * Installs a specific product extension.
+ *
+ * @throws Exception
+ */
+ public static void installProductExtension() throws Exception {
+ String method = "installProductExtension";
+ Log.entering(c, method, "Intalling product extension: " + PRODUCT_EXT_NAME + ".");
+
+ server.copyFileToLibertyInstallRoot(PRODUCT_FEATURE_PATH, PRODUCT_FEATURE_PRODTEST_MF);
+ assertTrue("Product feature: " + PRODUCT_FEATURE_PRODTEST_MF + " should have been copied to: " + PRODUCT_FEATURE_PATH,
+ server.fileExistsInLibertyInstallRoot(PRODUCT_FEATURE_PATH + "prodtest1-1.0.mf"));
+
+ server.copyFileToLibertyInstallRoot(PRODUCT_BUNDLE_PATH, PRODUCT_FEATURE_PRODTEST_JAR);
+ assertTrue("Product bundle: " + PRODUCT_FEATURE_PRODTEST_JAR + " should have been copied to: " + PRODUCT_BUNDLE_PATH,
+ server.fileExistsInLibertyInstallRoot(PRODUCT_BUNDLE_PATH + "test.prod.extensions_1.0.0.jar"));
+
+ server.copyFileToLibertyInstallRoot(PRODUCT_EXTENSIONS_PATH, PRODUCT_FEATURE_PROPERTIES_FILE);
+ assertTrue("Product extension props file: " + PRODUCT_FEATURE_PROPERTIES_FILE + " should have been copied to: " + PRODUCT_EXTENSIONS_PATH,
+ server.fileExistsInLibertyInstallRoot(PRODUCT_EXTENSIONS_PATH + "testproduct.properties"));
+
+ Log.exiting(c, method, "Product extension: " + PRODUCT_EXT_NAME + " has been installed.");
+
+ }
+
+ /**
+ * Installs a specific product extension if the default USR location.
+ *
+ * @throws Exception
+ */
+ public static void installUserProductExtension() throws Exception {
+ String method = "installUserProductExtension";
+ Log.entering(c, method, "Intalling user product extension.");
+
+ server.copyFileToLibertyInstallRoot(USER_FEATURE_PATH, USER_FEATURE_PRODTEST_MF);
+ assertTrue("User product feature: " + USER_FEATURE_PRODTEST_MF + " should have been copied to: " + USER_FEATURE_PATH,
+ server.fileExistsInLibertyInstallRoot(USER_FEATURE_PATH + "userProdtest1-1.0.mf"));
+
+ server.copyFileToLibertyInstallRoot(USER_BUNDLE_PATH, USER_BUNDLE_JAR);
+ assertTrue("User product bundle: " + USER_BUNDLE_JAR + " should have been copied to: " + USER_BUNDLE_PATH,
+ server.fileExistsInLibertyInstallRoot(USER_BUNDLE_PATH + "test.user.prod.extensions_1.0.0.jar"));
+
+ Log.exiting(c, method, "User product extension using feature: " + USER_FEATURE_PRODTEST_MF + " has been installed.");
+ }
+
+ /**
+ * Cleans up the installation from any dirs/files that this test may have created.
+ *
+ * @throws Exception
+ */
+ public static void tidyup() throws Exception {
+ if (server.isStarted())
+ server.stopServer();
+
+ server.deleteDirectoryFromLibertyInstallRoot("producttest");
+ server.deleteDirectoryFromLibertyInstallRoot("etc/extensions");
+ server.deleteDirectoryFromLibertyInstallRoot("usr/extension/");
+ server.deleteDirectoryFromLibertyInstallRoot("tool.output.dir");
+ }
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/SchemaGeneratorMBeanTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/SchemaGeneratorMBeanTest.java
new file mode 100755
index 00000000000..b89083a69bc
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/SchemaGeneratorMBeanTest.java
@@ -0,0 +1,455 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2014
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.management.JMX;
+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.net.ssl.HttpsURLConnection;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.ibm.websphere.config.mbeans.ServerSchemaGenerator;
+import com.ibm.websphere.filetransfer.FileTransferMBean;
+import com.ibm.websphere.simplicity.RemoteFile;
+import com.ibm.websphere.simplicity.log.Log;
+import com.ibm.ws.jmx.connector.client.rest.ClientProvider;
+import componenttest.annotation.ExpectedFFDC;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+import componenttest.topology.utils.HttpUtils;
+
+/**
+ * FAT-Tests to test the functionality of com.ibm.websphere.config.mbeans.ServerSchemaGenerator MBean
+ */
+public class SchemaGeneratorMBeanTest {
+
+ private static Class> logClass = SchemaGeneratorMBeanTest.class;
+
+ private static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.schemaGen.mbean");
+
+ private static final String SUCCESS_MESSAGE = "Setup completed successfully.";
+ private static final long MIN_FILE_SIZE = 500000;
+ private static final long SERVER_FILE_SIZE = 5000;
+
+ private static String outputDir;
+ private static MBeanServerConnection connection;
+ private static JMXConnector jmxConnector;
+
+ private static ObjectName schemaGenObjName;
+ private static ObjectName fileTranObjectName;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ final String methodName = "setUp";
+ Log.entering(logClass, methodName);
+
+ outputDir = server.getServerRoot();
+ Log.info(logClass, methodName, "serverRoot=" + outputDir);
+
+ Log.info(logClass, methodName, "Starting server=" + server.getServerName());
+ server.startServer();
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKT0016I.*IBMJMXConnectorREST'");
+ assertNotNull("'CWWKT0016I.*IBMJMXConnectorREST' was not received on server",
+ server.waitForStringInLog("CWWKT0016I.*IBMJMXConnectorREST"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKO0219I.*ssl'");
+ assertNotNull("'CWWKO0219I.*ssl' was not recieved on server",
+ server.waitForStringInLog("CWWKO0219I.*ssl"));
+
+ // Set up the trust store
+ System.setProperty("javax.net.ssl.trustStore", outputDir + "/resources/security/key.jks");
+ System.setProperty("javax.net.ssl.trustStorePassword", "Liberty");
+
+ Map environment = new HashMap();
+ environment.put("jmx.remote.protocol.provider.pkgs", "com.ibm.ws.jmx.connector.client");
+ environment.put(JMXConnector.CREDENTIALS, new String[] { "theUser", "thePassword" });
+ environment.put(ClientProvider.DISABLE_HOSTNAME_VERIFICATION, true);
+ environment.put(ClientProvider.READ_TIMEOUT, 2 * 60 * 1000);
+ JMXServiceURL url = new JMXServiceURL("REST", "localhost", getSSLPort(), "/IBMJMXConnectorREST");
+ Log.info(logClass, methodName, "JMXServiceURL=" + url.toString());
+ jmxConnector = JMXConnectorFactory.connect(url, environment);
+ assertNotNull("JMXConnector should not be null", jmxConnector);
+ connection = jmxConnector.getMBeanServerConnection();
+ assertNotNull("MBeanServerConnection should not be null", connection);
+
+ schemaGenObjName = new ObjectName(ServerSchemaGenerator.OBJECT_NAME);
+ fileTranObjectName = new ObjectName(FileTransferMBean.OBJECT_NAME);
+
+ Log.exiting(logClass, "setUp");
+ }
+
+ @AfterClass
+ public static void cleanUp() throws Exception {
+ String methodName = "tearDown";
+ Log.entering(logClass, methodName);
+
+ if (server != null && server.isStarted()) {
+ Log.finer(logClass, methodName, "Server is up, stopping it");
+ jmxConnector.close();
+ server.stopServer();
+ }
+ Log.exiting(logClass, methodName);
+ }
+
+ /**
+ * Invoke ServerSchemaGenerator.generateInstallSchema method
+ *
+ * @param params
+ * @return response from MBean invoke
+ * @throws Exception
+ */
+ private Map invokeGenerateInstallSchema(Object[] params) throws Exception {
+ Log.entering(logClass, "invokeGenerateInstallSchema", params);
+ String[] signature = new String[] { "java.lang.String", "java.lang.String", "java.lang.String", "java.lang.String" };
+
+ @SuppressWarnings("unchecked")
+ Map returnedMap = (Map) connection.invoke(schemaGenObjName, "generateInstallSchema", params, signature);
+
+ Log.exiting(logClass, "invokeGenerateInstallSchema", returnedMap);
+ return returnedMap;
+ }
+
+ /**
+ * Invoke ServerSchemaGenerator.generateServerSchema method
+ *
+ * @param params
+ * @return response from MBean invoke
+ * @throws Exception
+ */
+ private Map invokeGenerateServerSchema(Object[] params) throws Exception {
+ Log.entering(logClass, "invokeGenerateServerSchema", params);
+ String[] signature = new String[] { "java.lang.String", "java.lang.String", "java.lang.String", "java.lang.String" };
+
+ @SuppressWarnings("unchecked")
+ Map returnedMap = (Map) connection.invoke(schemaGenObjName, "generateServerSchema", params, signature);
+
+ Log.exiting(logClass, "invokeGenerateServerSchema", returnedMap);
+ return returnedMap;
+ }
+
+ /**
+ * Invoke ServerSchemaGenerator.generate method
+ *
+ * @param params
+ * @return response from MBean invoke
+ * @throws Exception
+ */
+ private String invokeSchemaGenMBeanGenerate() throws Exception {
+
+ Object[] params = new String[] {};
+ String[] signature = new String[] {};
+
+ String response = (String) connection.invoke(schemaGenObjName, "generate", params, signature);
+
+ Log.finest(logClass, "invokeSchemaGenMBeanGenerate", "response=" + response);
+ return response;
+ }
+
+ /**
+ * Invoke FileTransferMBean.downloadFile method
+ *
+ * @param params
+ * @throws Exception
+ */
+ private void invokeFileTransferMBeanDownloadFile(Object[] params) throws Exception {
+ Log.entering(logClass, "invokeFileTransferMBeanDownloadFile", params);
+ String[] signature = new String[] { "java.lang.String", "java.lang.String" };
+ connection.invoke(fileTranObjectName, "downloadFile", params, signature);
+ Log.exiting(logClass, "invokeFileTransferMBeanDownloadFile");
+ }
+
+ /**
+ * Invoke FileTransferMBean.deleteFile method
+ *
+ * @param params
+ * @throws Exception
+ */
+ private void invokeFileTransferMBeanDeleteFile(Object[] params) throws Exception {
+ Log.entering(logClass, "invokeFileTransferMBeanDeleteFile", params);
+ String[] signature = new String[] { "java.lang.String" };
+ connection.invoke(fileTranObjectName, "deleteFile", params, signature);
+ Log.exiting(logClass, "invokeFileTransferMBeanDeleteFile");
+ }
+
+ @Test
+ public void testDefaultValuesRestartServer() throws Exception {
+ String methodName = "testDefaultValuesRestartServer";
+
+ //Invoke schema generation
+ Object[] params = new String[] { "1.0", "1", "UTF-8", Locale.getDefault().toString() }; //schemaVersion, outputVersion, encoding, locale
+ Map returnedMap = invokeGenerateInstallSchema(params);
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) == 0);
+
+ //Download generated file
+ String sourcePath = (String) returnedMap.get(ServerSchemaGenerator.KEY_FILE_PATH);
+ String targetPath = outputDir + "/download_target/schemaDefaultValues.xsd";
+
+ params = new Object[] { sourcePath, targetPath };
+ invokeFileTransferMBeanDownloadFile(params);
+
+ //Ensure the file is bigger than expected minimum size
+ File file = new File(targetPath);
+ assertTrue("targetPath file is not expected size. File=" + file.getAbsolutePath() + " : size=" + file.length(), file.length() > MIN_FILE_SIZE);
+
+ Log.info(logClass, methodName, "Restarting server");
+ server.restartServer();
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKT0016I.*IBMJMXConnectorREST'");
+ assertNotNull("'CWWKT0016I.*IBMJMXConnectorREST' was not received on server",
+ server.waitForStringInLog("CWWKT0016I.*IBMJMXConnectorREST"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKO0219I.*ssl'");
+ assertNotNull("'CWWKO0219I.*ssl' was not recieved on server",
+ server.waitForStringInLog("CWWKO0219I.*ssl"));
+
+ // Verify that the file was cleaned up after server restart
+ assertFalse("Generated schema file was not deleted after server restart. File=" + sourcePath, new File(sourcePath).exists());
+ }
+
+ @Test
+ public void testEmptyStrings() throws Exception {
+ //Invoke schema generation
+ Object[] params = new String[] { "", "", "", "" }; //schemaVersion, outputVersion, encoding, locale
+ Map returnedMap = invokeGenerateInstallSchema(params);
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) == 0);
+
+ //Ensure generated file is bigger than expected minimum size
+ String filePath = (String) returnedMap.get(ServerSchemaGenerator.KEY_FILE_PATH);
+ File file = new File(filePath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath() + " : size=" + file.length(), file.length() > MIN_FILE_SIZE);
+ }
+
+ @Test
+ public void testGenerateDownloadAndDelete() throws Exception {
+ Object[] params = new String[] { "1.1", "2", "UTF-16", "fr" }; //schemaVersion, outputVersion, encoding, locale
+ Map returnedMap = invokeGenerateInstallSchema(params);
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) == 0);
+
+ //Download generated file
+ String sourcePath = (String) returnedMap.get(ServerSchemaGenerator.KEY_FILE_PATH);
+ String targetPath = outputDir + "/download_target/schemaNonDefault.xsd";
+
+ params = new Object[] { sourcePath, targetPath };
+ invokeFileTransferMBeanDownloadFile(params);
+
+ //Ensure the file is bigger than expected minimum size
+ File file = new File(targetPath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath() + " : size=" + file.length(), file.length() > MIN_FILE_SIZE);
+
+ // Remotely delete the generated schema file
+ RemoteFile remoteFile = server.getMachine().getFile(sourcePath);
+
+ //first check if the file exists
+ assertTrue("Generated schema file should exist at this point. remoteFile=" + remoteFile.getAbsolutePath(), remoteFile.exists());
+
+ params = new Object[] { remoteFile.getAbsolutePath() };
+ invokeFileTransferMBeanDeleteFile(params);
+
+ //Verify the file is deleted
+ assertFalse("Generated schema file should have been deleted. remoteFile=" + remoteFile.getAbsolutePath() + " : size" + remoteFile.length(), remoteFile.exists());
+ }
+
+ @Test
+ public void testGenerateServerSchema() throws Exception {
+ Object[] params = new String[] { null, null, null, null }; //schemaVersion, outputVersion, encoding, locale
+ Map returnedMap = invokeGenerateServerSchema(params);
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) == 0);
+ //Download generated file
+ String sourcePath = (String) returnedMap.get(ServerSchemaGenerator.KEY_FILE_PATH);
+ String targetPath = outputDir + "/download_target/serverschema.xsd";
+
+ params = new Object[] { sourcePath, targetPath };
+ invokeFileTransferMBeanDownloadFile(params);
+
+ //Ensure the file is bigger than expected minimum size
+ File file = new File(targetPath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath() + " : size=" + file.length(), file.length() > SERVER_FILE_SIZE);
+
+ }
+
+ @ExpectedFFDC("java.lang.IllegalArgumentException")
+ @Test
+ public void testInvalidSchemaVersion() throws Exception {
+ final String schemaVersion = "9876";
+ Object[] params = new String[] { schemaVersion, null, null, null }; //schemaVersion, outputVersion, encoding, locale
+ Map returnedMap = invokeGenerateInstallSchema(params);
+
+ //Check return code
+ assertTrue("Return code should not be 0", (Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) != 0);
+
+ //Retrieve output
+ String output = (String) returnedMap.get(ServerSchemaGenerator.KEY_OUTPUT);
+
+ assertTrue("Output does not contain expected IllegalArgumentException. output=" + output, output.contains("java.lang.IllegalArgumentException: " + schemaVersion));
+ }
+
+ @ExpectedFFDC("java.lang.IllegalArgumentException")
+ @Test
+ public void testInvalidOutputVersion() throws Exception {
+ final String outputVersion = "312";
+ Object[] params = new String[] { null, outputVersion, null, null }; //schemaVersion, outputVersion, encoding, locale
+ Map returnedMap = invokeGenerateInstallSchema(params);
+
+ //Check return code
+ assertTrue("Return code should not be 0", (Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) != 0);
+
+ //Retrieve output
+ String output = (String) returnedMap.get(ServerSchemaGenerator.KEY_OUTPUT);
+
+ assertTrue("Output does not contain expected IllegalArgumentException. output=" + output, output.contains("java.lang.IllegalArgumentException: " + outputVersion));
+ }
+
+ @Test
+ public void testInvalidEncoding() throws Exception {
+ final String encodingValue = "encodingABC";
+ Object[] params = new String[] { null, null, encodingValue, null }; //schemaVersion, outputVersion, encoding, locale
+ Map returnedMap = invokeGenerateInstallSchema(params);
+
+ //Check return code
+ assertTrue("Return code should not be 0", (Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) != 0);
+
+ //Retrieve output
+ String output = (String) returnedMap.get(ServerSchemaGenerator.KEY_OUTPUT);
+
+ assertTrue("Output does not contain expected UnsupportedEncodingException. output=" + output, output.contains("java.io.UnsupportedEncodingException: " + encodingValue));
+ }
+
+ /**
+ * Schema Generator replaces invalid locale with the default locale. So an output should be generated.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testInvalidLocale() throws Exception {
+ //Invoke schema generation
+ final String localeValue = "localeXYZ";
+ Object[] params = new String[] { null, null, null, localeValue }; //schemaVersion, outputVersion, encoding, locale
+ Map returnedMap = invokeGenerateInstallSchema(params);
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) == 0);
+
+ //Ensure generated file is bigger than expected minimum size
+ String filePath = (String) returnedMap.get(ServerSchemaGenerator.KEY_FILE_PATH);
+ File file = new File(filePath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath() + " : size=" + file.length(), file.length() > MIN_FILE_SIZE);
+ }
+
+ @Test
+ public void testSchemaGenMBeanCallAPI() throws Exception {
+ ServerSchemaGenerator schemaGenMBean = JMX.newMBeanProxy(connection, schemaGenObjName, ServerSchemaGenerator.class);
+ assertNotNull("We should have got access to the ServerSchemaGenerator API", schemaGenMBean);
+
+ Map returnedMap = schemaGenMBean.generateInstallSchema(null, null, null, null); //schemaVersion, outputVersion, encoding, locale
+
+ //Check return code
+ assertTrue((Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) == 0);
+
+ //Download generated file
+ String sourcePath = (String) returnedMap.get(ServerSchemaGenerator.KEY_FILE_PATH);
+ String targetPath = outputDir + "/download_target/schemaNonDefaultAPI.xsd";
+
+ Object[] params = new Object[] { sourcePath, targetPath };
+ invokeFileTransferMBeanDownloadFile(params);
+
+ //Ensure the file is bigger than expected minimum size
+ File file = new File(targetPath);
+ assertTrue("File is not expected size. File=" + file.getAbsolutePath() + " : size=" + file.length(), file.length() > MIN_FILE_SIZE);
+ }
+
+ @Test
+ public void testInvokeGenerateMethod() throws Exception {
+ //Invoke schema generation using the ServerSchemaGenerator.generate method
+ String returnedVal = invokeSchemaGenMBeanGenerate();
+ assertTrue(returnedVal != null && returnedVal.length() > 0);
+ }
+
+ /**
+ * Calls a servlet that uses the JMX REST client to connect to the server
+ * and check a few MBeanServerConnection methods and MBean API calls.
+ */
+ @Test
+ public void testSchemaGenAppClient() throws Exception {
+ // Call AppClientServletSchemaGen, check for good result
+ String encodedServerRoot = URLEncoder.encode(server.getServerRoot(), "UTF-8");
+ URL url = new URL("https", server.getHostname(), server.getHttpDefaultSecurePort(), "/mbeans/appClient?serverRoot=" + encodedServerRoot);
+ HttpsURLConnection con = (HttpsURLConnection) HttpUtils.getHttpConnection(url, HttpURLConnection.HTTP_OK, 60);
+ HttpUtils.findStringInHttpConnection(con, SUCCESS_MESSAGE);
+ }
+
+ private static int getSSLPort() {
+ return Integer.valueOf(System.getProperty("HTTP_default.secure", "8020"));
+ }
+
+ /**
+ * Schema Generator for server throws illegalargument exception for a invalid locale.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testServerSchemaInvalidLocale() throws Exception {
+ //Invoke schema generation
+ final String localeValue = "localeXYZ";
+ Object[] params = new String[] { null, null, null, localeValue }; //schemaVersion, outputVersion, encoding, locale
+ try {
+ Map returnedMap = invokeGenerateServerSchema(params);
+ } catch (Exception ie) {
+ assertTrue(true);
+ }
+
+ }
+
+ @Test
+ @ExpectedFFDC("java.io.UnsupportedEncodingException")
+ public void testServerSchemaInvalidEncoding() throws Exception {
+ final String encodingValue = "encodingABC";
+ Object[] params = new String[] { null, null, encodingValue, null }; //schemaVersion, outputVersion, encoding, locale
+
+ Map returnedMap = invokeGenerateServerSchema(params);
+
+ //Check return code
+ assertTrue("Return code should not be 0", (Integer) returnedMap.get(ServerSchemaGenerator.KEY_RETURN_CODE) != 0);
+
+ //Retrieve output
+ String output = (String) returnedMap.get(ServerSchemaGenerator.KEY_OUTPUT);
+
+ assertTrue("Output does not contain expected IOException. output=" + output, output.contains("java.io.IOException: " + encodingValue));
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServerConfigTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServerConfigTest.java
new file mode 100755
index 00000000000..38de7b0016f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServerConfigTest.java
@@ -0,0 +1,656 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2011, 2014
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ */
+
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.List;
+
+import org.junit.Test;
+
+import com.ibm.websphere.simplicity.RemoteFile;
+import com.ibm.websphere.simplicity.config.ConfigMonitorElement;
+import com.ibm.websphere.simplicity.config.ServerConfiguration;
+
+import componenttest.exception.TopologyException;
+import componenttest.topology.impl.LibertyFileManager;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+public class ServerConfigTest {
+
+ // Since we have tracing enabled give server longer timeout to start up.
+ private static final long SERVER_START_TIMEOUT = 30 * 1000;
+
+ @Test
+ public void testRestart() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.restart");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+ server.startServer("before.log");
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKF0008I")); // Feature update completed
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ try {
+ // run the test one
+ test(server, "/restart/restart?testName=before");
+
+ server.stopServer(false);
+
+ // switch to new configuration
+ server.copyFileToLibertyServerRoot("restart/server.xml");
+
+ server.startServer("after.log", false);
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up the second time", server.waitForStringInLog("CWWKF0008I")); // Feature update completed
+ assertNotNull("The restart application never came up the second time", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // run the test two
+ test(server, "/restart/restart?testName=after");
+ } finally {
+ server.stopServer();
+ server.deleteFileFromLibertyInstallRoot("lib/com.ibm.ws.config.metatype_1.0.jar");
+ }
+ }
+
+ @Test
+ public void testRefresh() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.refresh");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+ server.startServer("refresh.log");
+
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ try {
+ // run the test one
+ test(server, "/restart/restart?testName=before");
+
+ // switch to new configuration
+ server.copyFileToLibertyServerRoot("refresh/server.xml");
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // run the test two
+ test(server, "/restart/restart?testName=after");
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ @Test
+ public void testVariableRestart() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.restart.var");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+ server.startServer("restart-var-before.log");
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ try {
+ // run the test one
+ test(server, "/restart/restart?testName=beforeVariable");
+
+ server.stopServer(false);
+
+ // switch to new bootstrap.properties
+ server.copyFileToLibertyServerRoot("restart.var/bootstrap.properties");
+
+ server.startServer("restart-var-after.log", false);
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // run the test two
+ test(server, "/restart/restart?testName=afterVariable");
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ @Test
+ public void testValidate() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.validate");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+
+ server.copyFileToLibertyInstallRoot("lib/features", "metatype/metatype-1.0.mf");
+ server.copyFileToLibertyInstallRoot("lib", "metatype/com.ibm.ws.config.metatype_1.0.jar");
+
+ server.startServer();
+
+ try {
+ assertStringsPresentInLog(server, new String[] { ".*CWWKG0011W.*person.*", ".*firstName.*Jane.*" });
+ assertStringsPresentInLog(server, new String[] { ".*CWWKG0011W.*ejb.*threadPool.*", ".*minThreads.*5.*" });
+ assertStringsPresentInLog(server, new String[] { ".*CWWKG0011W.*quickStartSecurity.*" });
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ @Test
+ public void testValidateUpdateFileTag() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.validateConfig");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+ server.startServer();
+
+ try {
+ assertASCIIFileTag(server.getDefaultLogFile());
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ @Test
+ public void testRelativeImports() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.import");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+ server.startServer("imports.log");
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ try {
+ // run the test one
+ test(server, "/restart/restart?testName=checkImport");
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ @Test
+ public void testRefreshError() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.refresh.error");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+ server.startServer("refresh-error.log");
+
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ try {
+ // run the test one
+ test(server, "/restart/restart?testName=before");
+
+ // switch to new (bad) configuration
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("refresh/bad-server.xml");
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+
+ // wait for error
+ assertNotNull("No refresh error", server.waitForStringInLog("CWWKG0014E.*"));
+
+ // run the test one again since nothing has changed
+ test(server, "/restart/restart?testName=before");
+
+ // switch to new (good) configuration
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("refresh/server.xml");
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+
+ // run the test two
+ test(server, "/restart/restart?testName=after");
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ /**
+ * This test makes sure that you can update the server configuration and that the changes will be picked up when using a polled style of update trigger. It will then disable
+ * the polling to make sure changes are no longer picked up.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testServerConfigUpdating() throws Exception {
+ LibertyServer server = LibertyServerFactory.getStartedLibertyServer("com.ibm.ws.config.update");
+
+ try {
+ // The server has no update trigger so first set one to polled. Polled is the default so this change should be picked up
+ ServerConfiguration config = server.getServerConfiguration();
+ ConfigMonitorElement configMonitor = config.getConfig();
+ configMonitor.setUpdateTrigger("polled");
+ server.updateServerConfiguration(config);
+ assertNotNull("The server configuration was not updated when setting it to polled", server.waitForStringInLog("CWWKG0017I"));
+
+ long startTime = System.currentTimeMillis();
+ // Now update the server configuration to make sure that still works
+ server.setMarkToEndOfLog();
+ config.addApplication("inexistent", ".", "war");
+ server.updateServerConfiguration(config);
+ assertNotNull("The server configuration was not updated when adding a feature", server.waitForStringInLog("CWWKG0017I"));
+
+ // Now turn off server config monitoring and make sure the updating stops
+ server.setMarkToEndOfLog();
+ configMonitor.setUpdateTrigger("disabled");
+ server.updateServerConfiguration(config);
+ assertNotNull("The server configuration was not updated for disabling monitoring", server.waitForStringInLog("CWWKG0017I"));
+
+ /*
+ * Updating is now turned off so do another update and make sure that the message is NOT displayed in the log (we wait for 4 messages but expect 3). The default wait
+ * time for this is 30s which is a bit long but also machine specific so make a note of how long it took to update the config during the last 2 updates and wait for
+ * that long.
+ */
+ long updateDuration = System.currentTimeMillis() - startTime;
+ server.setMarkToEndOfLog();
+ config.removeApplicationsByName("inexistent");
+ server.updateServerConfiguration(config);
+ assertNull("The server configuration was updated even though monitoring is disabled", server.waitForStringInLog("CWWKG0017I", updateDuration));
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ /**
+ * This test just makes sure that if the server config update trigger is set to mbean then it doesn't monitor the file.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testMbeanConfigUpdate() throws Exception {
+ LibertyServer server = LibertyServerFactory.getStartedLibertyServer("com.ibm.ws.config.update.mbean");
+
+ try {
+ // This server has and update trigger set to mbean so the file should not be monitored, update it and make sure a config update isn't triggered
+ ServerConfiguration config = server.getServerConfiguration();
+ config.getFeatureManager().getFeatures().add("servlet-3.0");
+ server.updateServerConfiguration(config);
+ //we are waiting for a message not to appear in the log - 10 seconds is probably long enough instead of the default 2 min
+ // (note that, for whatever reason, LibertyServer doubles the timeout we pass in)
+ assertNull("The server configuration was updated when it shouldn't of been monitoring the file", server.waitForStringInLog("CWWKG0017I", 5000));
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ private void test(LibertyServer server, String testUri) throws Exception {
+ HttpURLConnection con = null;
+ try {
+ URL url = new URL("http://" + server.getHostname() + ":" + server.getHttpDefaultPort() + testUri);
+ con = (HttpURLConnection) url.openConnection();
+ con.setDoInput(true);
+ con.setDoOutput(true);
+ con.setUseCaches(false);
+ con.setRequestMethod("GET");
+ InputStream is = con.getInputStream();
+ assertNotNull(is);
+
+ String output = read(is);
+ System.out.println(output);
+ assertTrue(output, output.trim().startsWith("Test Passed"));
+ } finally {
+ if (con != null) {
+ con.disconnect();
+ }
+ }
+ }
+
+ private static String read(InputStream in) throws IOException {
+ InputStreamReader isr = new InputStreamReader(in);
+ BufferedReader br = new BufferedReader(isr);
+ StringBuilder builder = new StringBuilder();
+ String line;
+ while ((line = br.readLine()) != null) {
+ builder.append(line);
+ builder.append(System.getProperty("line.separator"));
+ }
+ return builder.toString();
+ }
+
+ private void assertStringsPresentInLog(LibertyServer server, String[] patterns) throws IOException {
+ for (String pattern : patterns) {
+ String match = server.waitForStringInLog(pattern);
+ // Wait for the application to be installed before proceeding
+ assertNotNull("No lines found matching the pattern: " + pattern, match);
+ }
+ }
+
+ private void assertASCIIFileTag(RemoteFile file) throws Exception {
+
+ String systemOS = System.getProperty("os.name");
+ if (systemOS.equals("z/OS")) {
+ String[] cmdArray = new String[] { "chtag", "-p", file.getAbsolutePath() };
+ Process p = Runtime.getRuntime().exec(cmdArray);
+ p.waitFor();
+ String line = "";
+ StringBuffer exMsg = new StringBuffer();
+ BufferedReader buferr = new BufferedReader(new InputStreamReader(p.getInputStream()));
+ while ((line = buferr.readLine()) != null) {
+ exMsg.append(line + ". ");
+ }
+ buferr.close();
+
+ String result[] = exMsg.toString().split("\\s");
+ assertEquals("t", result[0]);
+ assertEquals("ISO8859-1", result[1]);
+ }
+ }
+
+ @Test
+ public void testCaseSensitivity() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.casesensitivity");
+ // shouldn't take long to fail but it should start pretty fast
+ server.setServerStartTimeout(5000);
+ try {
+ server.startServer("casesensitivity.log");
+ } finally {
+ server.stopServer();
+ }
+ }
+
+ /**
+ * Test a bad required include ()
+ * for startup and update. When the variable onError is set to FAIL, the runtime should
+ * bring down the server on startup and not recognize ANY config changes on update.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testBadRequiredIncludeFAIL() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.import.error");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ LibertyFileManager.copyFileIntoLiberty(server.getMachine(), server.getServerRoot(), "bootstrap.properties",
+ server.pathToAutoFVTTestFiles + "/import.error/bootstrap-onError-FAIL.properties", false,
+ server.getServerRoot());
+ server.setServerConfigurationFile("import.error/original.xml");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+
+ try {
+ // Start out with bad include and onError=FAIL
+ server.startServerExpectFailure("include-error.log", true, true);
+
+ // Now swap in a valid server.xml to test dynamic config update with onError=FAIL
+ server.setServerConfigurationFile("import.error/server.xml");
+
+ server.startServer("include-update-error.log");
+
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // ensure that the config elements work
+ test(server, "/restart/restart?testName=before");
+
+ // switch to new (bad) configuration to test a config update with a bad include
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("import.error/bad-include-server2.xml");
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+
+ // make sure that both errors messages are present, CWWKG0015E is the summary message
+ // that comes out on an update with errors and onError=FAIL
+ assertNotNull(server.waitForStringInLogUsingMark("CWWKG0015E"));
+ assertNotNull(server.waitForStringInLogUsingMark("CWWKG0090E"));
+
+ // ensure that the config elements were not updated
+ test(server, "/restart/restart?testName=before");
+
+ } finally {
+ if (server.isStarted()) {
+ server.stopServer();
+ }
+ }
+ }
+
+ /**
+ * Test a bad required include ()
+ * for startup and update. When the variable onError is not set to FAIL (i.e. INFO, WARN),
+ * the runtime should be tolerant and keep the server running while ignoring the bad
+ * required include.
+ *
+ * For a config update, all changes made to the config should be recognized and only
+ * the bad required include should be ignored.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testBadRequiredIncludeWARN() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.import.error");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+
+ try {
+ // Change to default setting of onError=WARN, but swap in a server.xml that has
+ // malformed xml.
+ server.copyFileToLibertyServerRoot("import.error/bootstrap.properties");
+ server.setServerConfigurationFile("import.error/malformed-server.xml");
+
+ // Start server with malformed xml and onError=WARN. The server will come up with no configuration,
+ // which results in an exception because timed exit isn't enabled.
+ boolean caught = false;
+ try {
+ server.startServer("malformed-xml.log", true, true);
+ } catch (TopologyException ex) {
+ caught = true;
+ server.stopServer();
+ }
+
+ assertTrue("There should be an exception because timedexit is not enabled", caught);
+
+ // Now provide the original server.xml with a bad required include to ensure
+ // that the server comes up and reports the bad include.
+ server.setServerConfigurationFile("import.error/bad-include-server.xml");
+ server.startServer("include-warn.log");
+
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // find the warning in messages.log CWWKG0090E
+ List includeErrors = server.findStringsInLogs("CWWKG0090E");
+ assertEquals("Should have only seen the include error 1 time upon server startup: " + includeErrors, 1, includeErrors.size());
+
+ // ensure that the config elements work
+ test(server, "/restart/restart?testName=before");
+
+ // switch to new (bad) configuration to test a config update with a bad include
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("import.error/bad-include-server2.xml");
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+
+ // ensure that the error message indicating a bad include was provided is there
+ includeErrors = server.findStringsInLogs("CWWKG0090E");
+ assertEquals("Should have only seen the include error 2 times since starting the server: " + includeErrors, 2, includeErrors.size());
+
+ // ensure that the modified config elements work
+ test(server, "/restart/restart?testName=after");
+
+ } finally {
+ if (server.isStarted()) {
+ server.stopServer();
+ }
+ }
+ }
+
+ @Test
+ public void testBadRequiredIncludeModifyOnError() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.import.error");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+
+ try {
+ // Change to default setting of onError=WARN, but swap in a server.xml that has
+ // malformed xml.
+ server.copyFileToLibertyServerRoot("import.error/bootstrap.properties");
+
+ // Now provide the original server.xml with a bad required include to ensure
+ // that the server comes up and reports the bad include.
+ server.setServerConfigurationFile("import.error/bad-include-server.xml");
+ server.startServer("include-warn.log");
+
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // find the warning in messages.log CWWKG0090E
+ List includeErrors = server.findStringsInLogs("CWWKG0090E");
+ assertEquals("Should have only seen the include error 1 time upon server startup: " + includeErrors, 1, includeErrors.size());
+
+ // ensure that the config elements work
+ test(server, "/restart/restart?testName=before");
+
+ // Update onError to IGNORE
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("import.error/bad-include-server-onError-ignore.xml");
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+
+ // ensure that the error message indicating a bad include was provided is there
+ includeErrors = server.findStringsInLogs("CWWKG0090E");
+ assertEquals("Should have only seen the include error 2 times since starting the server: " + includeErrors, 2, includeErrors.size());
+
+ // switch to new (bad) configuration to test a config update with a bad include
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("import.error/bad-include-server-onError-ignore2.xml");
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+
+ // ensure that the error message indicating a bad include was provided is there
+ includeErrors = server.findStringsInLogs("CWWKG0090E");
+ assertEquals("Should not see an include error with onError=IGNORE" + includeErrors, 2, includeErrors.size());
+
+ // ensure that the modified config elements work
+ test(server, "/restart/restart?testName=after");
+
+ } finally {
+ if (server.isStarted()) {
+ server.stopServer();
+ }
+ }
+ }
+
+ @Test
+ public void testVariableMissingName() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.import.error");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+
+ try {
+ LibertyFileManager.copyFileIntoLiberty(server.getMachine(), server.getServerRoot(), "bootstrap.properties",
+ server.pathToAutoFVTTestFiles + "/import.error/bootstrap-onError-FAIL.properties", false,
+ server.getServerRoot());
+ server.setServerConfigurationFile("variable.error/missing-name.xml");
+
+ // With OnError=FAIL, the server should fail to start
+ server.startServerExpectFailure("variable-name-fail.log", true, true);
+
+ // Change OnError to WARN and try again
+ server.copyFileToLibertyServerRoot("import.error/bootstrap.properties");
+
+ server.startServer("variable-name-warn.log", true, true);
+
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // find the warning in messages.log CWWKG0091E
+ List includeErrors = server.findStringsInLogs("CWWKG0091E");
+ assertEquals("Should have only seen the include error 1 time upon server startup: " + includeErrors, 1, includeErrors.size());
+
+ // ensure that the config elements work
+ test(server, "/restart/restart?testName=before");
+
+ // switch to new (bad) configuration to test a config update with a bad variable
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("variable.error/missing-name2.xml");
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+
+ // ensure that the error message indicating a bad variable was provided is there
+ includeErrors = server.findStringsInLogs("CWWKG0091E");
+ assertEquals("Should have only seen the include error 2 times since starting the server: " + includeErrors, 2, includeErrors.size());
+
+ // ensure that the modified config elements work
+ test(server, "/restart/restart?testName=after");
+
+ } finally {
+ if (server.isStarted()) {
+ server.stopServer();
+ }
+ }
+ }
+
+ @Test
+ public void testVariableMissingValue() throws Exception {
+ LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.import.error");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+ server.setServerStartTimeout(SERVER_START_TIMEOUT);
+
+ try {
+ LibertyFileManager.copyFileIntoLiberty(server.getMachine(), server.getServerRoot(), "bootstrap.properties",
+ server.pathToAutoFVTTestFiles + "/import.error/bootstrap-onError-FAIL.properties", false,
+ server.getServerRoot());
+ server.setServerConfigurationFile("variable.error/missing-value.xml");
+
+ // With OnError=FAIL, the server should fail to start
+ server.startServerExpectFailure("variable-value-fail.log", true, true);
+
+ // Change OnError to WARN and try again
+ server.copyFileToLibertyServerRoot("import.error/bootstrap.properties");
+
+ server.startServer("variable-name-warn.log", true, true);
+
+ // Wait for the application to be installed before proceeding
+ assertNotNull("The restart application never came up", server.waitForStringInLog("CWWKZ0001I.* restart"));
+
+ // find the warning in messages.log CWWKG0092E
+ List includeErrors = server.findStringsInLogs("CWWKG0092E");
+ assertEquals("Should have only seen the include error 1 time upon server startup: " + includeErrors, 1, includeErrors.size());
+
+ // ensure that the config elements work
+ test(server, "/restart/restart?testName=before");
+
+ // switch to new (bad) configuration to test a config update with a bad variable
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile("variable.error/missing-value2.xml");
+
+ // cause configuration refresh
+ test(server, "/restart/restart?testName=refresh");
+
+ // ensure that the error message indicating a bad variable was provided is there
+ includeErrors = server.findStringsInLogs("CWWKG0092E");
+ assertEquals("Should have only seen the include error 2 times since starting the server: " + includeErrors, 2, includeErrors.size());
+
+ // ensure that the modified config elements work
+ test(server, "/restart/restart?testName=after");
+
+ } finally {
+ if (server.isStarted()) {
+ server.stopServer();
+ }
+ }
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServerXMLConfigurationMBeanTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServerXMLConfigurationMBeanTest.java
new file mode 100755
index 00000000000..5f46f8b83da
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServerXMLConfigurationMBeanTest.java
@@ -0,0 +1,171 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2014
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.security.SecureRandom;
+import java.security.cert.X509Certificate;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.JMX;
+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.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.ibm.websphere.config.mbeans.ServerXMLConfigurationMBean;
+import com.ibm.websphere.simplicity.log.Log;
+import com.ibm.ws.jmx.connector.client.rest.ClientProvider;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+/**
+ * Tests that ServerXMLConfigurationMBean can be accessed through a proxy. Note that the
+ * BVT tests that the configuration files can be downloaded through the FileTransferMBean
+ * so not going to include a redundant test for that here.
+ */
+public class ServerXMLConfigurationMBeanTest {
+
+ private static Class> logClass = ServerXMLConfigurationMBeanTest.class;
+
+ private static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.schemaGen.mbean");
+
+ private static String outputDir;
+ private static MBeanServerConnection connection;
+ private static JMXConnector jmxConnector;
+
+ private static ObjectName serverXMLConfigurationMBeanObjName;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ final String methodName = "setUp";
+ Log.entering(logClass, methodName);
+
+ outputDir = server.getServerRoot();
+ Log.info(logClass, methodName, "serverRoot=" + outputDir);
+
+ Log.info(logClass, methodName, "Starting server=" + server.getServerName());
+ server.startServer();
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKT0016I.*IBMJMXConnectorREST'");
+ assertNotNull("'CWWKT0016I.*IBMJMXConnectorREST' was not received on server",
+ server.waitForStringInLog("CWWKT0016I.*IBMJMXConnectorREST"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKO0219I.*ssl'");
+ assertNotNull("'CWWKO0219I.*ssl' was not recieved on server",
+ server.waitForStringInLog("CWWKO0219I.*ssl"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWPKI0803A.*ssl'");
+ assertNotNull("'CWPKI0803A.*ssl' was not generated on server",
+ server.waitForStringInLog("CWPKI0803A"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKS0008I: The security service is ready'");
+ assertNotNull("'CWWKS0008I: The security service is ready' was not generated on server",
+ server.waitForStringInLog("CWWKS0008I"));
+
+ Log.info(logClass, methodName, "Waiting for 'CWWKS4105I: LTPA configuration is ready'");
+ assertNotNull("'CWWKS4105I: LTPA configuration is ready' was not generated on server",
+ server.waitForStringInLog("CWWKS4105I"));
+
+ // Set up the trust store
+ TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
+ @Override
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+
+ @Override
+ public void checkClientTrusted(X509Certificate[] certs, String authType) {}
+
+ @Override
+ public void checkServerTrusted(X509Certificate[] certs, String authType) {}
+ } };
+
+ SSLContext sc = SSLContext.getInstance("SSL");
+ sc.init(null, trustAllCerts, new SecureRandom());
+ HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ HostnameVerifier hv = new HostnameVerifier() {
+ @Override
+ public boolean verify(String urlHostName, SSLSession session) {
+ return true;
+ }
+ };
+ HttpsURLConnection.setDefaultHostnameVerifier(hv);
+
+ Map environment = new HashMap();
+ environment.put("jmx.remote.protocol.provider.pkgs", "com.ibm.ws.jmx.connector.client");
+ environment.put(JMXConnector.CREDENTIALS, new String[] { "theUser", "thePassword" });
+ environment.put(ClientProvider.DISABLE_HOSTNAME_VERIFICATION, true);
+ environment.put(ClientProvider.READ_TIMEOUT, 2 * 60 * 1000);
+ JMXServiceURL url = new JMXServiceURL("REST", "localhost", getSSLPort(), "/IBMJMXConnectorREST");
+ Log.info(logClass, methodName, "JMXServiceURL=" + url.toString());
+ jmxConnector = JMXConnectorFactory.connect(url, environment);
+ assertNotNull("JMXConnector should not be null", jmxConnector);
+ connection = jmxConnector.getMBeanServerConnection();
+ assertNotNull("MBeanServerConnection should not be null", connection);
+
+ serverXMLConfigurationMBeanObjName = new ObjectName(ServerXMLConfigurationMBean.OBJECT_NAME);
+
+ Log.exiting(logClass, "setUp");
+ }
+
+ @AfterClass
+ public static void cleanUp() throws Exception {
+ String methodName = "tearDown";
+ Log.entering(logClass, methodName);
+
+ if (server != null && server.isStarted()) {
+ Log.finer(logClass, methodName, "Server is up, stopping it");
+ jmxConnector.close();
+ server.stopServer();
+ }
+ Log.exiting(logClass, methodName);
+ }
+
+ @Test
+ public void testServerXMLConfigurationMBeanCallAPI() throws Exception {
+ ServerXMLConfigurationMBean serverXMLConfigMBean = JMX.newMBeanProxy(connection, serverXMLConfigurationMBeanObjName, ServerXMLConfigurationMBean.class);
+ assertNotNull("ServerXMLConfigurationMBean is unexpectedly null.", serverXMLConfigMBean);
+
+ Collection configFilePaths = serverXMLConfigMBean.fetchConfigurationFilePaths();
+ assertNotNull("Configuration file path collection should not be null.", configFilePaths);
+
+ // Check that the collection contains the expected file paths.
+ assertEquals("Config file path collection size is not 3.", 3, configFilePaths.size());
+ assertTrue("server.xml is missing from the collection.",
+ configFilePaths.contains("${server.config.dir}/server.xml"));
+ assertTrue("fatTestPorts.xml is missing from the collection.",
+ configFilePaths.contains("${wlp.user.dir}/servers/fatTestPorts.xml"));
+ assertTrue("fatTestCommon.xml is missing from the collection.",
+ configFilePaths.contains("${wlp.user.dir}/servers/fatTestCommon.xml"));
+ }
+
+ private static int getSSLPort() {
+ return Integer.valueOf(System.getProperty("HTTP_default.secure", "8020"));
+ }
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServletRunner.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServletRunner.java
new file mode 100755
index 00000000000..e00fd760686
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/ServletRunner.java
@@ -0,0 +1,74 @@
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.rules.TestName;
+
+import componenttest.topology.impl.LibertyServer;
+
+public abstract class ServletRunner {
+
+ /**
+ * Utility to set the method name as a String before the test
+ */
+ @Rule
+ public TestName name = new TestName();
+
+ public String testName = "";
+
+ @Before
+ public void setTestName() {
+ // set the current test name
+ testName = name.getMethodName();
+ }
+
+ protected abstract String getContextRoot();
+
+ protected abstract String getServletMapping();
+
+ protected void test(LibertyServer server) throws Exception {
+ HttpURLConnection con = null;
+ try {
+ URL url = new URL("http://" + server.getHostname() + ":" + server.getHttpDefaultPort() + "/" +
+ getContextRoot() + "/" + getServletMapping() + "?" + "testName=" + testName);
+ con = (HttpURLConnection) url.openConnection();
+ con.setDoInput(true);
+ con.setDoOutput(true);
+ con.setUseCaches(false);
+ con.setRequestMethod("GET");
+ InputStream is = con.getInputStream();
+ assertNotNull(is);
+
+ String output = read(is);
+ System.out.println(output);
+ assertTrue(output, output.trim().startsWith("OK"));
+ } finally {
+ if (con != null) {
+ con.disconnect();
+ }
+ }
+ }
+
+ private static String read(InputStream in) throws IOException {
+ InputStreamReader isr = new InputStreamReader(in);
+ BufferedReader br = new BufferedReader(isr);
+ StringBuilder builder = new StringBuilder();
+ String line;
+ while ((line = br.readLine()) != null) {
+ builder.append(line);
+ builder.append(System.getProperty("line.separator"));
+ }
+ return builder.toString();
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/VariableMergeTests.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/VariableMergeTests.java
new file mode 100755
index 00000000000..fc2c188fca3
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/VariableMergeTests.java
@@ -0,0 +1,88 @@
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+public class VariableMergeTests extends ServletRunner {
+
+ private static final String CONTEXT_ROOT = "varmergedconfig";
+ private static final String ALL_IN_ONE_SERVER = "varmerge/allInOne.xml";
+ private static final String BREAK_SERVER = "varmerge/break.xml";
+ private static final String BREAK_2_SERVER = "varmerge/break2.xml";
+ private static final String IGNORE_SERVER = "varmerge/ignore.xml";
+ private static final String REPLACE_SERVER = "varmerge/replace.xml";
+ private static final String MERGE_SERVER = "varmerge/merge.xml";
+
+ @Override
+ protected String getContextRoot() {
+ return CONTEXT_ROOT;
+ }
+
+ @Override
+ protected String getServletMapping() {
+ return "varMergeTest";
+ }
+
+ private static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.varmerging");
+
+ @Test
+ public void testMergedVariables() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(ALL_IN_ONE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+
+ }
+
+ @Test
+ public void testMergedIncludesReplace() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(REPLACE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @Test
+ public void testMergedIncludesIgnore() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(IGNORE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @Test
+ public void testMergedIncludesMerge() throws Exception {
+ server.setMarkToEndOfLog();
+ server.setServerConfigurationFile(MERGE_SERVER);
+ server.waitForConfigUpdateInLogUsingMark(null);
+
+ test(server);
+ }
+
+ @BeforeClass
+ public static void setUpForMergedConfigTests() throws Exception {
+ //copy the config feature into the server features location
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+
+ server.startServer("varmerge.log");
+ //make sure the URL is available
+ assertNotNull(server.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT));
+ assertNotNull(server.waitForStringInLog("CWWKF0011I"));
+ }
+
+ @AfterClass
+ public static void shutdown() throws Exception {
+ server.stopServer();
+ server.deleteFileFromLibertyInstallRoot("lib/features/configfatlibertyinternals-1.0.mf");
+ }
+
+}
diff --git a/dev/com.ibm.ws.config_fat/fat/src/test/server/config/WSConfigurationHelperTest.java b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/WSConfigurationHelperTest.java
new file mode 100755
index 00000000000..aa85dbe4da8
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/fat/src/test/server/config/WSConfigurationHelperTest.java
@@ -0,0 +1,125 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * WLP Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import componenttest.custom.junit.runner.Mode;
+import componenttest.custom.junit.runner.Mode.TestMode;
+import componenttest.topology.impl.LibertyServer;
+import componenttest.topology.impl.LibertyServerFactory;
+
+/**
+ *
+ */
+
+@Mode(TestMode.FULL)
+public class WSConfigurationHelperTest extends ServletRunner {
+
+ private static final String CONTEXT_ROOT = "confighelper";
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see test.server.config.ServletRunner#getContextRoot()
+ */
+ @Override
+ protected String getContextRoot() {
+ return CONTEXT_ROOT;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see test.server.config.ServletRunner#getServletMapping()
+ */
+ @Override
+ protected String getServletMapping() {
+ return "helperTest";
+ }
+
+ @BeforeClass
+ public static void setUpForMetatypeProviderTests() throws Exception {
+
+ // Use the feature/bundle from the merged config tests
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/mergedConfigTest-1.0.mf");
+ server.copyFileToLibertyInstallRoot("lib", "bundles/test.merged.config_1.0.0.jar");
+ server.copyFileToLibertyInstallRoot("lib/features", "internalFeatureForFat/configfatlibertyinternals-1.0.mf");
+
+ server.startServer("helperTest.log");
+ //make sure the URL is available
+ assertNotNull(server.waitForStringInLog("CWWKT0016I.*" + CONTEXT_ROOT));
+ assertNotNull(server.waitForStringInLog("CWWKF0011I"));
+ }
+
+ @AfterClass
+ public static void shutdown() throws Exception {
+ server.stopServer();
+ server.deleteFileFromLibertyInstallRoot("lib/features/configfatlibertyinternals-1.0.mf");
+ }
+
+ private static LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.config.helper");
+
+ @Test
+ public void testGetDefaultProperties() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testGetDefaultPropertiesWithRequired() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testAddDefaultConfiguration1() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testAddDefaultConfiguration2() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testAddDefaultConfiguration4() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testAddDefaultConfiguration3() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testAddDefaultConfiguration5() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testAddDefaultConfiguration6() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testAddDefaultConfiguration7() throws Exception {
+ test(server);
+ }
+
+ @Test
+ public void testAddDefaultConfiguration8() throws Exception {
+ test(server);
+ }
+}
diff --git a/dev/com.ibm.ws.config_fat/publish/.gitignore b/dev/com.ibm.ws.config_fat/publish/.gitignore
new file mode 100644
index 00000000000..0968b1bceb6
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/.gitignore
@@ -0,0 +1 @@
+/bundles
diff --git a/dev/com.ibm.ws.config_fat/publish/files/.gitignore b/dev/com.ibm.ws.config_fat/publish/files/.gitignore
new file mode 100644
index 00000000000..d4a71b1abe0
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/.gitignore
@@ -0,0 +1,7 @@
+/bundles
+/childalias.zip
+/confighelper.zip
+/dropins.zip
+/mergedconfig.zip
+/metatypeprovider.zip
+/varmerge.zip
diff --git a/dev/com.ibm.ws.config_fat/publish/files/badconfig/UniqueValueConflict.xml b/dev/com.ibm.ws.config_fat/publish/files/badconfig/UniqueValueConflict.xml
new file mode 100755
index 00000000000..b86b3047676
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/badconfig/UniqueValueConflict.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ jsp-2.2
+ jdbc-4.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/badconfig/badHttp.xml b/dev/com.ibm.ws.config_fat/publish/files/badconfig/badHttp.xml
new file mode 100755
index 00000000000..ba1cc2db551
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/badconfig/badHttp.xml
@@ -0,0 +1,18 @@
+
+
+
+
+ servlet-3.0
+ osgiconsole-1.0
+ timedexit-1.0
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/badconfig/badLogging.xml b/dev/com.ibm.ws.config_fat/publish/files/badconfig/badLogging.xml
new file mode 100755
index 00000000000..82e64a44031
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/badconfig/badLogging.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ servlet-3.0
+ osgiconsole-1.0
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/badconfig/goodConfig.xml b/dev/com.ibm.ws.config_fat/publish/files/badconfig/goodConfig.xml
new file mode 100755
index 00000000000..d72781208d2
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/badconfig/goodConfig.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ servlet-3.0
+ osgiconsole-1.0
+ timedexit-1.0
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/server.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/server.xml
new file mode 100755
index 00000000000..b866f31c32f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/server.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/serverB.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverB.xml
new file mode 100755
index 00000000000..cb8acb009cb
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverB.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ childAliasTestB-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC.xml
new file mode 100755
index 00000000000..5c9503cdec5
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ childAliasTestB-1.0
+ childAliasTestC-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC2.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC2.xml
new file mode 100755
index 00000000000..8bb5e698aff
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC2.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ childAliasTestB-1.0
+ childAliasTestC-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC3.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC3.xml
new file mode 100755
index 00000000000..ca75e6cc47a
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC3.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ childAliasTestB-1.0
+ childAliasTestC-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC4.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC4.xml
new file mode 100755
index 00000000000..e8a3157c240
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC4.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ childAliasTestB-1.0
+ childAliasTestC-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC5.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC5.xml
new file mode 100755
index 00000000000..8525e00c57e
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC5.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ childAliasTestB-1.0
+ childAliasTestC-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC6.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC6.xml
new file mode 100755
index 00000000000..0eb20773e2f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC6.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ childAliasTestB-1.0
+ childAliasTestC-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC7.xml b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC7.xml
new file mode 100755
index 00000000000..d6465ea0f46
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/childalias/serverC7.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ childAliasTestB-1.0
+ childAliasTestC-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/dropins/aBrokenFile.xml b/dev/com.ibm.ws.config_fat/publish/files/dropins/aBrokenFile.xml
new file mode 100755
index 00000000000..b35c826f3cf
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/dropins/aBrokenFile.xml
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/dropins/alibrary.xml b/dev/com.ibm.ws.config_fat/publish/files/dropins/alibrary.xml
new file mode 100755
index 00000000000..6b757cb4c21
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/dropins/alibrary.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/dropins/blibrary.xml b/dev/com.ibm.ws.config_fat/publish/files/dropins/blibrary.xml
new file mode 100755
index 00000000000..4aec61a7f86
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/dropins/blibrary.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/dropins/simple.notxml b/dev/com.ibm.ws.config_fat/publish/files/dropins/simple.notxml
new file mode 100755
index 00000000000..c68456f952b
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/dropins/simple.notxml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/dropins/simple.xml b/dev/com.ibm.ws.config_fat/publish/files/dropins/simple.xml
new file mode 100755
index 00000000000..c68456f952b
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/dropins/simple.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/dropins/simple2.xml b/dev/com.ibm.ws.config_fat/publish/files/dropins/simple2.xml
new file mode 100755
index 00000000000..50cab62ebae
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/dropins/simple2.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/extensions/server.xml b/dev/com.ibm.ws.config_fat/publish/files/extensions/server.xml
new file mode 100755
index 00000000000..ae3c77b37c7
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/extensions/server.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ configExtensionsTest-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/extensions/serverB1.xml b/dev/com.ibm.ws.config_fat/publish/files/extensions/serverB1.xml
new file mode 100755
index 00000000000..83eff7671c6
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/extensions/serverB1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ configExtensionsTestB-1.0
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/extensions/serverB2.xml b/dev/com.ibm.ws.config_fat/publish/files/extensions/serverB2.xml
new file mode 100755
index 00000000000..34236ecee93
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/extensions/serverB2.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ configExtensionsTest-1.0
+ configExtensionsTestB-1.0
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/extensions/serverSchemaGenerator.xml b/dev/com.ibm.ws.config_fat/publish/files/extensions/serverSchemaGenerator.xml
new file mode 100755
index 00000000000..fb544c9ade2
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/extensions/serverSchemaGenerator.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ configExtensionsSchemaGeneratorTest-1.0
+ configExtensionsTest-1.0
+ configExtensionsTestB-1.0
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/featureRemove/serverRemoveJDBC.xml b/dev/com.ibm.ws.config_fat/publish/files/featureRemove/serverRemoveJDBC.xml
new file mode 100755
index 00000000000..a4730385b75
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/featureRemove/serverRemoveJDBC.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ osgiConsole-1.0
+ servlet-3.0
+ localConnector-1.0
+ oauth-2.0
+ ssl-1.0
+ openidConnectServer-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ client01
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/featureRemove/serverRemoveOpenID.xml b/dev/com.ibm.ws.config_fat/publish/files/featureRemove/serverRemoveOpenID.xml
new file mode 100755
index 00000000000..2d1d54c9eee
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/featureRemove/serverRemoveOpenID.xml
@@ -0,0 +1,27 @@
+
+
+
+
+ osgiConsole-1.0
+ servlet-3.0
+ jdbc-4.0
+ localConnector-1.0
+ oauth-2.0
+ ssl-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server-onError-ignore.xml b/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server-onError-ignore.xml
new file mode 100755
index 00000000000..c7168bfde9d
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server-onError-ignore.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server-onError-ignore2.xml b/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server-onError-ignore2.xml
new file mode 100755
index 00000000000..c6a27e52250
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server-onError-ignore2.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server.xml b/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server.xml
new file mode 100755
index 00000000000..9585b789821
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server2.xml b/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server2.xml
new file mode 100755
index 00000000000..762079f99a7
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/bad-include-server2.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/bootstrap-onError-FAIL.properties b/dev/com.ibm.ws.config_fat/publish/files/import.error/bootstrap-onError-FAIL.properties
new file mode 100755
index 00000000000..a43b26d2a24
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/bootstrap-onError-FAIL.properties
@@ -0,0 +1,4 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
+relativeLocation=relative.xml
+onError=FAIL
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/files/import.error/bootstrap.properties
new file mode 100755
index 00000000000..84bdd909d92
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/bootstrap.properties
@@ -0,0 +1,3 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
+relativeLocation=relative.xml
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/malformed-server.xml b/dev/com.ibm.ws.config_fat/publish/files/import.error/malformed-server.xml
new file mode 100755
index 00000000000..9037d1d7cda
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/malformed-server.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+ <
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/original.xml b/dev/com.ibm.ws.config_fat/publish/files/import.error/original.xml
new file mode 100755
index 00000000000..654abb21f83
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/original.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/import.error/server.xml b/dev/com.ibm.ws.config_fat/publish/files/import.error/server.xml
new file mode 100755
index 00000000000..030e6d88709
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/import.error/server.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTest-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTest-1.0.mf
new file mode 100755
index 00000000000..a1a5efb9249
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTest-1.0.mf
@@ -0,0 +1,6 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: childAliasTest-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.config.childalias; version="[1,1.0.100)"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTestB-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTestB-1.0.mf
new file mode 100755
index 00000000000..8668eb7b1b4
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTestB-1.0.mf
@@ -0,0 +1,6 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: childAliasTestB-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.config.childalias.b; version="[1,1.0.100)"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTestC-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTestC-1.0.mf
new file mode 100755
index 00000000000..52408615ef9
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/childAliasTestC-1.0.mf
@@ -0,0 +1,6 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: childAliasTestC-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.config.childalias.c; version="[1,1.0.100)"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsSchemaGeneratorTest-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsSchemaGeneratorTest-1.0.mf
new file mode 100755
index 00000000000..43f5edccc91
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsSchemaGeneratorTest-1.0.mf
@@ -0,0 +1,6 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: configExtensionsSchemaGeneratorTest-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.config.extensions.schema.generator; version="[1,1.0.100)"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsTest-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsTest-1.0.mf
new file mode 100755
index 00000000000..d953d105e9b
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsTest-1.0.mf
@@ -0,0 +1,7 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: configExtensionsTest-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.config.extensions; version="[1,1.0.100)",
+ com.ibm.wsspi.appserver.webBundle-1.0; type="osgi.subsystem.feature"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsTestB-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsTestB-1.0.mf
new file mode 100755
index 00000000000..0f458816a93
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configExtensionsTestB-1.0.mf
@@ -0,0 +1,7 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: configExtensionsTestB-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.config.extensions.b; version="[1,1.0.100)",
+ com.ibm.wsspi.appserver.webBundle-1.0; type="osgi.subsystem.feature"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configfatlibertyinternals-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configfatlibertyinternals-1.0.mf
new file mode 100755
index 00000000000..602b7829359
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/configfatlibertyinternals-1.0.mf
@@ -0,0 +1,12 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: configfatlibertyinternals-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+IBM-API-Package: org.osgi.service.cm; type="internal",
+ com.ibm.ws.jmx; type="internal",
+ org.osgi.framework; type="internal",
+ org.osgi.util.tracker; type="internal",
+ com.ibm.websphere.config; type="internal",
+ com.ibm.wsspi.kernel.service.utils; type="internal",
+ com.ibm.wsspi.kernel.service.location; type="internal"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/delayedVariable-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/delayedVariable-1.0.mf
new file mode 100755
index 00000000000..8c6dcd7ade9
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/delayedVariable-1.0.mf
@@ -0,0 +1,6 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: delayedVariable-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.config.variables; version="[1,1.0.100)"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/mergedConfigTest-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/mergedConfigTest-1.0.mf
new file mode 100755
index 00000000000..20e4f39e8d1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/mergedConfigTest-1.0.mf
@@ -0,0 +1,6 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: mergedConfigTest-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.merged.config; version="[1,1.0.100)"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/metatypeProviderTest-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/metatypeProviderTest-1.0.mf
new file mode 100755
index 00000000000..f11c82b456d
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/internalFeatureForFat/metatypeProviderTest-1.0.mf
@@ -0,0 +1,6 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: metatypeProviderTest-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Type: osgi.subsystem.feature
+Subsystem-Content: test.metatype.provider; version="[1,1.0.100)"
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/allInOne.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/allInOne.xml
new file mode 100755
index 00000000000..0a7f9edbf87
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/allInOne.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/break.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/break.xml
new file mode 100755
index 00000000000..e9a94c8b012
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/break.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/break2.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/break2.xml
new file mode 100755
index 00000000000..7f80e024f67
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/break2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/fourLevelIgnore.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/fourLevelIgnore.xml
new file mode 100755
index 00000000000..7f9a98221c0
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/fourLevelIgnore.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/fourLevelReplace.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/fourLevelReplace.xml
new file mode 100755
index 00000000000..fdc4b5c5be1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/fourLevelReplace.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/ignore.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/ignore.xml
new file mode 100755
index 00000000000..deeaa1b53e8
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/ignore.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/ignoreReplace.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/ignoreReplace.xml
new file mode 100755
index 00000000000..d130b7ba172
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/ignoreReplace.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/merge.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/merge.xml
new file mode 100755
index 00000000000..7e3c9e30ccd
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/merge.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/merge/replace.xml b/dev/com.ibm.ws.config_fat/publish/files/merge/replace.xml
new file mode 100755
index 00000000000..5d13ba07de9
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/merge/replace.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/metatype/.gitignore b/dev/com.ibm.ws.config_fat/publish/files/metatype/.gitignore
new file mode 100644
index 00000000000..6070719c4e4
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/metatype/.gitignore
@@ -0,0 +1 @@
+/com.ibm.ws.config.metatype_1.0.jar
diff --git a/dev/com.ibm.ws.config_fat/publish/files/metatype/metatype-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/metatype/metatype-1.0.mf
new file mode 100755
index 00000000000..0284236b04c
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/metatype/metatype-1.0.mf
@@ -0,0 +1,7 @@
+Subsystem-ManifestVersion: 1
+IBM-ShortName: metatype-1.0
+Subsystem-SymbolicName: com.ibm.ws.config.metatype-1.0; visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Content: com.ibm.ws.config.metatype; location:="lib/com.ibm.ws.config.metatype_1.0.jar"
+Subsystem-Type: osgi.subsystem.feature
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/metatype/noMetatypeServer.xml b/dev/com.ibm.ws.config_fat/publish/files/metatype/noMetatypeServer.xml
new file mode 100755
index 00000000000..9ceeb7720fb
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/metatype/noMetatypeServer.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ servlet-3.0
+ osgiconsole-1.0
+ httpservice-2.2
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/metatype/server.xml b/dev/com.ibm.ws.config_fat/publish/files/metatype/server.xml
new file mode 100755
index 00000000000..2fc260e93b7
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/metatype/server.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ servlet-3.0
+ osgiconsole-1.0
+ httpservice-2.2
+ metatypeProviderTest-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.factory.pid.server.xml b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.factory.pid.server.xml
new file mode 100755
index 00000000000..02fd41b0235
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.factory.pid.server.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ osgiconsole-1.0
+ jsp-2.2
+ testproduct:prodtest1-1.0
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.invalid.server.xml b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.invalid.server.xml
new file mode 100755
index 00000000000..b0ccaa6c8ac
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.invalid.server.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ osgiconsole-1.0
+ jsp-2.2
+ testproduct:prodtest1-1.0
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.valid.server.xml b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.valid.server.xml
new file mode 100755
index 00000000000..ea8d784ac47
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/prod.ext.valid.server.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ osgiconsole-1.0
+ jsp-2.2
+ testproduct:prodtest1-1.0
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.factory.pid.server.xml b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.factory.pid.server.xml
new file mode 100755
index 00000000000..a68ca5708fe
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.factory.pid.server.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ osgiconsole-1.0
+ jsp-2.2
+ usr:userProdtest1-1.0
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.invalid.server.xml b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.invalid.server.xml
new file mode 100755
index 00000000000..5a6ed9ab59a
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.invalid.server.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ osgiconsole-1.0
+ jsp-2.2
+ usr:userProdtest1-1.0
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.valid.server.xml b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.valid.server.xml
new file mode 100755
index 00000000000..502875504bc
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/config/user.prod.ext.valid.server.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ osgiconsole-1.0
+ jsp-2.2
+ usr:userProdtest1-1.0
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/features/prodtest1-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/features/prodtest1-1.0.mf
new file mode 100755
index 00000000000..151b88aa1a1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/features/prodtest1-1.0.mf
@@ -0,0 +1,7 @@
+Subsystem-ManifestVersion: 1
+Subsystem-SymbolicName: prodtest1-1.0;visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Content: test.prod.extensions; location:="lib/test.prod.extensions_1.0.0.jar",
+ com.ibm.wsspi.appserver.webBundle-1.0; type="osgi.subsystem.feature"
+Subsystem-Type: osgi.subsystem.feature
+IBM-Feature-Version: 2
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/features/userProdtest1-1.0.mf b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/features/userProdtest1-1.0.mf
new file mode 100755
index 00000000000..86604b524a0
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/features/userProdtest1-1.0.mf
@@ -0,0 +1,8 @@
+Subsystem-ManifestVersion: 1
+IBM-ShortName:userProdtest1-1.0
+Subsystem-SymbolicName: userProdtest1-1.0; visibility:=public
+Subsystem-Version: 1.0.0
+Subsystem-Content: test.user.prod.extensions; version="[1,2)",
+ com.ibm.wsspi.appserver.webBundle-1.0; type="osgi.subsystem.feature"
+Subsystem-Type: osgi.subsystem.feature
+IBM-Feature-Version: 2
diff --git a/dev/com.ibm.ws.config_fat/publish/files/productExtensions/propertiesFiles/testproduct.properties b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/propertiesFiles/testproduct.properties
new file mode 100755
index 00000000000..1b80aa40d23
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/productExtensions/propertiesFiles/testproduct.properties
@@ -0,0 +1,2 @@
+com.ibm.websphere.productId=bigProduct
+com.ibm.websphere.productInstall=wlp/producttest/
diff --git a/dev/com.ibm.ws.config_fat/publish/files/refresh/bad-server.xml b/dev/com.ibm.ws.config_fat/publish/files/refresh/bad-server.xml
new file mode 100755
index 00000000000..4d368c7d5eb
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/refresh/bad-server.xml
@@ -0,0 +1,5 @@
+
+
+ <
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/refresh/server.xml b/dev/com.ibm.ws.config_fat/publish/files/refresh/server.xml
new file mode 100755
index 00000000000..57f7a83ea64
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/refresh/server.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/restart.var/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/files/restart.var/bootstrap.properties
new file mode 100755
index 00000000000..f8560d4219d
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/restart.var/bootstrap.properties
@@ -0,0 +1,3 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
+myHttpPort=5678
diff --git a/dev/com.ibm.ws.config_fat/publish/files/restart/server.xml b/dev/com.ibm.ws.config_fat/publish/files/restart/server.xml
new file mode 100755
index 00000000000..2bdbb516161
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/restart/server.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+ servlet-3.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/validator/.gitignore b/dev/com.ibm.ws.config_fat/publish/files/validator/.gitignore
new file mode 100644
index 00000000000..c50fb0152d1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/validator/.gitignore
@@ -0,0 +1 @@
+/com.ibm.ws.config.ext_1.0.*.jar
diff --git a/dev/com.ibm.ws.config_fat/publish/files/validator/bad-signature.xml b/dev/com.ibm.ws.config_fat/publish/files/validator/bad-signature.xml
new file mode 100755
index 00000000000..28042958e00
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/validator/bad-signature.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+ ${minVersion}
+ ${maxVersion}
+ ${minVersion} - ${maxVersion}
+ ${jdkVersion}
+ ${myMaxVersion}
+
+ v1
+ v2
+ v3,v4
+ v\5
+
+
+
+
+
+
+
+
+
+
+
+
+5FUDKaf7vzcTb2J4Gf//7IzVvaw=Uv6vpn399+UxEt8ORk1EAbEilfULajdkZE8KPxiEvZRalYP2T6heP6pAtZ9edMAF4F3SfggLCSjtG/rsAs0xFfTL/YWjsDND6OSRyw077j7eB9jlvyytRvza1fKUQiHoci8R5bUDlhc73m4JGJVsk7uWnFvlJmff0rdAayqb/pGo6yH55umx1CBVlap3GwP1tNIlB3gBGZ3FPZKY0IRi0Hb3fyemfwlWgNs/2O2G10KtDQiDyGNhdiyq12h4Ms0j6mbVfSVhNYKCp2GCizb7bmv1BGBeCiYTyJvESE4AaODCKmaKdAeiWU2Zdwf+hBqu28195ISZZ7uZc7vQUp0x0w==CN=WebSphere Application Server Liberty Profile,OU=Software Group,O=IBM Corp.,L=Armonk,ST=New York,C=US
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/validator/dropins-enabled.xml b/dev/com.ibm.ws.config_fat/publish/files/validator/dropins-enabled.xml
new file mode 100755
index 00000000000..ff26fbf8176
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/validator/dropins-enabled.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+ ${minVersion}
+ ${maxVersion}
+ ${minVersion} - ${maxVersion}
+ ${jdkVersion}
+ ${myMaxVersion}
+
+ v1
+ v2
+ v3,v4
+ v\5
+
+
+
+
+
+
+
+
+
+
+
+f+lmvF8PXX/4/eNTplGpqNSPaJ4=jnopKWvOoQocYPJYhoYZpjSNeJRH9IQaba2loveEuTJVaHKdY4LQmDfBF8uy+kzNjL84y6VtxrsQAjHRdvzSFckg2FZfA0EbryQNwYgIZlnWrmO/QbXlb+CuMA1ITu3hhjg0toIygphzJZEk3TgxpqzxxFLvYQJ1JSIVS5Jt0eYN6Tfi5MiL5aqG8xOfBUPVSZZoYHczUq+FfMNeoFl6DO8o/0EDnXAEz1r+iQbu+Uufjic3tvVvyQ14Yji4lc/IZdtodjUciCz9DHee8C7xq2kbomWXvXLzFLiWBZT7pdxOFIjaNPxPgnb+7vZc/D7yLnAyh0cSuIY8d/2FAlFCOA==CN=WebSphere Application Server Liberty Profile,OU=Software Group,O=IBM Corp.,L=Armonk,ST=New York,C=USMIIDqDCCApCgAwIBAgIEUMJaljANBgkqhkiG9w0BAQsFADCBlTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMQ8wDQYDVQQHEwZBcm1vbmsxEjAQBgNVBAoTCUlCTSBDb3JwLjEXMBUGA1UECxMOU29mdHdhcmUgR3JvdXAxNTAzBgNVBAMTLFdlYlNwaGVyZSBBcHBsaWNhdGlvbiBTZXJ2ZXIgTGliZXJ0eSBQcm9maWxlMB4XDTEyMTIwNzIxMDczNFoXDTMyMTIwMjIxMDczNFowgZUxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazEPMA0GA1UEBxMGQXJtb25rMRIwEAYDVQQKEwlJQk0gQ29ycC4xFzAVBgNVBAsTDlNvZnR3YXJlIEdyb3VwMTUwMwYDVQQDEyxXZWJTcGhlcmUgQXBwbGljYXRpb24gU2VydmVyIExpYmVydHkgUHJvZmlsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ8l5a67C3jNwuS9g0rYYJ3dDjnykECQGXgQ7sP5i9ixF0Gg6NYesjn6VUBhf8ziC/4R4yrflPID+C1nM9SsUQld5QyAjbboRCXbW6+oIofzQKzWUHQQavXOXkH3i765GlsuME2qHYT+H8SQ0S0Z2ZMQGr8PXA8lzTSvExozx+oXRXaqG97cpfNDjVZVswxR9QL5h5GdZ7INtN6OcNiKalz5cF95G4VvL1sjtRkPaupNV7C09hnw+UzdPjmxmIOkw6BbS/J0gkE+NSDjQCt1O4EalCOy1ERKMZIb3QsKyYQvebaXCm7u3aEy/yszaCwIIldSjYjM15SUQw20L5vbn/UCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAeJICZmkkBYgMqcq17+GRTWaDvKkcmBdBaIi6DDuRM31FNI7AzB2uLX2vJzXrrxPW41YturXKAZf25uKbgZOikO8e3djjCUhiLYhIm4aTJxPlrh+MejaNAwAVeZBunNrZL9VI8jtU/a1Vd9bEdQ305yXWzt5c5mfJB3Yrn0LmwYKiSfG2pERy0TVnCpNLM6iQ7O2lQLVXXwlxNthWyOavEqlK54LR1GoklhC4k1r4d/5Cc2tjsoIi1y9gZj0qZptJCM2o1RtWf/xa+MgIavH+M/FqLzphvGOoxkPOqOfgpLPhM7bpLM6xqhiqexE5Xxq0JiNaxDi5iVUoDDxXG8ZslA==
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-name.xml b/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-name.xml
new file mode 100755
index 00000000000..6f0f5cb813e
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-name.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-name2.xml b/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-name2.xml
new file mode 100755
index 00000000000..8719b472107
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-name2.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-value.xml b/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-value.xml
new file mode 100755
index 00000000000..4bd1cfa4558
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-value.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-value2.xml b/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-value2.xml
new file mode 100755
index 00000000000..dde0025c93f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/variable.error/missing-value2.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/files/varmerge/allInOne.xml b/dev/com.ibm.ws.config_fat/publish/files/varmerge/allInOne.xml
new file mode 100755
index 00000000000..721fa5c2a4f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/varmerge/allInOne.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/varmerge/break.xml b/dev/com.ibm.ws.config_fat/publish/files/varmerge/break.xml
new file mode 100755
index 00000000000..f8e8688d41c
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/varmerge/break.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/varmerge/break2.xml b/dev/com.ibm.ws.config_fat/publish/files/varmerge/break2.xml
new file mode 100755
index 00000000000..3160ed96667
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/varmerge/break2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/varmerge/ignore.xml b/dev/com.ibm.ws.config_fat/publish/files/varmerge/ignore.xml
new file mode 100755
index 00000000000..f6937e46137
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/varmerge/ignore.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/varmerge/merge.xml b/dev/com.ibm.ws.config_fat/publish/files/varmerge/merge.xml
new file mode 100755
index 00000000000..7b5d41c8760
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/varmerge/merge.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/files/varmerge/replace.xml b/dev/com.ibm.ws.config_fat/publish/files/varmerge/replace.xml
new file mode 100755
index 00000000000..62c4f51c15e
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/files/varmerge/replace.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.bad/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.bad/server.xml
new file mode 100755
index 00000000000..ba1cc2db551
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.bad/server.xml
@@ -0,0 +1,18 @@
+
+
+
+
+ servlet-3.0
+ osgiconsole-1.0
+ timedexit-1.0
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.casesensitivity/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.casesensitivity/server.xml
new file mode 100755
index 00000000000..b9e7ee80807
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.casesensitivity/server.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/server.xml
new file mode 100755
index 00000000000..b866f31c32f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.childalias/server.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ childAliasTest-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/server.xml
new file mode 100755
index 00000000000..09a8015de23
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.delayedVar/server.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ configfatlibertyinternals-1.0
+ delayedVariable-1.0
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/server.xml
new file mode 100755
index 00000000000..3a13b483a63
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.dropins/server.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ jdbc-4.0
+
+
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.extensions/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.extensions/bootstrap.properties
new file mode 100755
index 00000000000..4f1ae5a2e10
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.extensions/bootstrap.properties
@@ -0,0 +1 @@
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.features/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.features/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.features/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.features/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.features/server.xml
new file mode 100755
index 00000000000..ae5eafe0b2f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.features/server.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ osgiConsole-1.0
+ servlet-3.0
+ jdbc-4.0
+ localConnector-1.0
+ oauth-2.0
+ ssl-1.0
+ openidConnectServer-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ client01
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/server.xml
new file mode 100755
index 00000000000..331d606b15b
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.helper/server.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+
+
+ mergedConfigTest-1.0
+
+
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/bootstrap.properties
new file mode 100755
index 00000000000..9449ad31bc2
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/bootstrap.properties
@@ -0,0 +1,4 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
+relativeLocation=relative.xml
+onError=FAIL
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/common.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/common.xml
new file mode 100755
index 00000000000..eae2d7b79ce
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/common.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/relative.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/relative.xml
new file mode 100755
index 00000000000..3135a5d29dd
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/relative.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/shared.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/shared.xml
new file mode 100755
index 00000000000..46748c72e4a
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/common/shared.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/server.xml
new file mode 100755
index 00000000000..654abb21f83
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/server.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/shared.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/shared.xml
new file mode 100755
index 00000000000..90be6e11040
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import.error/shared.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/bootstrap.properties
new file mode 100755
index 00000000000..84bdd909d92
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/bootstrap.properties
@@ -0,0 +1,3 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
+relativeLocation=relative.xml
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/common.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/common.xml
new file mode 100755
index 00000000000..eae2d7b79ce
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/common.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/relative.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/relative.xml
new file mode 100755
index 00000000000..3135a5d29dd
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/relative.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/shared.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/shared.xml
new file mode 100755
index 00000000000..46748c72e4a
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/common/shared.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/server.xml
new file mode 100755
index 00000000000..41bee0d180f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/server.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ servlet-3.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/shared.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/shared.xml
new file mode 100755
index 00000000000..90be6e11040
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.import/shared.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidJDBCoption/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidJDBCoption/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidJDBCoption/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidJDBCoption/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidJDBCoption/server.xml
new file mode 100755
index 00000000000..84857d23bf8
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidJDBCoption/server.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+ jdbc-4.0
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidOptionalInclude/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidOptionalInclude/server.xml
new file mode 100755
index 00000000000..bca129e7c18
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.invalidOptionalInclude/server.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+ jdbc-4.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/common.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/common.xml
new file mode 100755
index 00000000000..e3b36e57ce7
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/common.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ mergedConfigTest-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/conflict.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/conflict.xml
new file mode 100755
index 00000000000..938c46720b5
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/conflict.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelB.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelB.xml
new file mode 100755
index 00000000000..34596140a85
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelB.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelB2.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelB2.xml
new file mode 100755
index 00000000000..b031d93067b
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelB2.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelC.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelC.xml
new file mode 100755
index 00000000000..fa48b6a6de1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelC.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelC2.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelC2.xml
new file mode 100755
index 00000000000..df7c921921f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/fourLevelC2.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/intermediateReplace.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/intermediateReplace.xml
new file mode 100755
index 00000000000..af7b9f26f9e
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/intermediateReplace.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/noConflict.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/noConflict.xml
new file mode 100755
index 00000000000..02a08e80505
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/noConflict.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/server.xml
new file mode 100755
index 00000000000..7829758b305
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.merging/server.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/server.xml
new file mode 100755
index 00000000000..2fc260e93b7
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.metatype.provider/server.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ servlet-3.0
+ osgiconsole-1.0
+ httpservice-2.2
+ metatypeProviderTest-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.product.extension/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.product.extension/bootstrap.properties
new file mode 100755
index 00000000000..c554088bab6
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.product.extension/bootstrap.properties
@@ -0,0 +1,2 @@
+osgi.console=localhost:5678
+bootstrap.include=../testports.properties
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.product.extension/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.product.extension/server.xml
new file mode 100755
index 00000000000..15ad3318664
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.product.extension/server.xml
@@ -0,0 +1,9 @@
+
+
+
+
+ osgiconsole-1.0
+ jsp-2.2
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/server.xml
new file mode 100755
index 00000000000..cac904e50da
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh.error/server.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/server.xml
new file mode 100755
index 00000000000..cac904e50da
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.refresh/server.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/bootstrap.properties
new file mode 100755
index 00000000000..6be023c0898
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/bootstrap.properties
@@ -0,0 +1,3 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
+myHttpPort=1234
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/server.xml
new file mode 100755
index 00000000000..99b80c2053e
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart.var/server.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ servlet-3.0
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/server.xml
new file mode 100755
index 00000000000..d73ddfa9a3a
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.restart/server.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ servlet-3.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/.gitignore
new file mode 100644
index 00000000000..5c38c69748d
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/.gitignore
@@ -0,0 +1,2 @@
+/download_target
+/dropins
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/bootstrap.properties
new file mode 100755
index 00000000000..72a1c9ce337
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/bootstrap.properties
@@ -0,0 +1,20 @@
+com.ibm.ws.logging.trace.specification=*=info=enabled:\
+com.ibm.ws.config.schemagen.internal.ServerSchemaGeneratorImpl=all=enabled :\
+com.ibm.ws.jmx.connector.client.*=all=enabled:\
+com.ibm.ws.filetransfer.*=all=enabled:\
+com.ibm.ws.security.*=all=enabled:\
+com.ibm.websphere.security.*=all=enabled:\
+com.ibm.ws.webcontainer.*=all=enabled:\
+com.ibm.ws.webcontainer.security.*=all=enabled:\
+com.ibm.ws.webcontainer.security.internal.*=all=enabled:\
+com.ibm.ws.ssl.*=all=enabled:\
+SSL=all=enabled:\
+jmx.rest.server.connector=all=enabled:\
+FileTransfer=all=enabled:\
+web.*=all=enabled:\
+jmx.rest.server.connector=all=enabled:\
+logservice=all=enabled
+
+com.ibm.ws.logging.max.file.size=0
+
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/server.xml
new file mode 100755
index 00000000000..df41d8e53eb
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.schemaGen.mbean/server.xml
@@ -0,0 +1,17 @@
+
+
+
+ restConnector-1.0
+ servlet-3.0
+
+
+
+
+
+
+
+
+
+ ${server.output.dir}
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.uniquevalueconflict/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.uniquevalueconflict/server.xml
new file mode 100755
index 00000000000..366f01211da
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.uniquevalueconflict/server.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ jsp-2.2
+ jdbc-4.0
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update.mbean/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update.mbean/bootstrap.properties
new file mode 100755
index 00000000000..4f1ae5a2e10
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update.mbean/bootstrap.properties
@@ -0,0 +1 @@
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update.mbean/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update.mbean/server.xml
new file mode 100755
index 00000000000..f58a679c61d
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update.mbean/server.xml
@@ -0,0 +1,9 @@
+
+
+
+ localConnector-1.0
+ servlet-3.0
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update/bootstrap.properties
new file mode 100755
index 00000000000..4f1ae5a2e10
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update/bootstrap.properties
@@ -0,0 +1 @@
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update/server.xml
new file mode 100755
index 00000000000..1ff1cba56a8
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.update/server.xml
@@ -0,0 +1,9 @@
+
+
+
+ localConnector-1.0
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/common/common.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/common/common.xml
new file mode 100755
index 00000000000..e1b01a740cf
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/common/common.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/full.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/full.xml
new file mode 100755
index 00000000000..1bd852b91f9
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/full.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/server.xml
new file mode 100755
index 00000000000..0c4fe350831
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validate/server.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+ metatype-1.0
+ configfatlibertyinternals-1.0
+ servlet-3.0
+ appSecurity-2.0
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validateConfig/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validateConfig/bootstrap.properties
new file mode 100755
index 00000000000..4f1ae5a2e10
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validateConfig/bootstrap.properties
@@ -0,0 +1 @@
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validateConfig/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validateConfig/server.xml
new file mode 100755
index 00000000000..9253415a30a
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validateConfig/server.xml
@@ -0,0 +1,10 @@
+
+
+
+ localConnector-1.0
+ configfatlibertyinternals-1.0
+
+
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validator/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validator/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validator/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validator/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validator/server.xml
new file mode 100755
index 00000000000..0ef4ffe19bd
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.validator/server.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+ ${minVersion}
+ ${maxVersion}
+ ${minVersion} - ${maxVersion}
+ ${jdkVersion}
+ ${myMaxVersion}
+
+ v1
+ v2
+ v3,v4
+ v\5
+
+
+
+
+
+
+
+
+
+
+
+p1oS139FKjDhhBuzB/5HicsDCYc=WQhTMFkWpJcuqaHGLRU4yL4yNm++CxJW4BkTQu71cQgSTSrOsCyYR3lzYqEntqI6vHoaiA1t/6yKzwQ0m9L0WkgkQeWwKjWa6xgQNa2oSar/KkPkXcMVTY3KqlfgL29Vlg0Ac0Ph3F9tRPLOp6SbVrGvvEHAApjMD/5YyDLtVIB127K18yrNTRhvMQ/bzqVLLFKjdiqXF4rMXG1urqD2HWx+CS8G5T1FOoDAP0BhROD4dXbDaiiIOlTAiSwEeddRVdi2HdShi423N3eE8o7iXSBk4yXk5nneYP02mb5vBlxjxHXpdBkcJ0fnR9OdFjpOiX96bOGK+VnVbQadfoYacg==CN=WebSphere Application Server Liberty Profile,OU=Software Group,O=IBM Corp.,L=Armonk,ST=New York,C=USMIIDqDCCApCgAwIBAgIEUMJaljANBgkqhkiG9w0BAQsFADCBlTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMQ8wDQYDVQQHEwZBcm1vbmsxEjAQBgNVBAoTCUlCTSBDb3JwLjEXMBUGA1UECxMOU29mdHdhcmUgR3JvdXAxNTAzBgNVBAMTLFdlYlNwaGVyZSBBcHBsaWNhdGlvbiBTZXJ2ZXIgTGliZXJ0eSBQcm9maWxlMB4XDTEyMTIwNzIxMDczNFoXDTMyMTIwMjIxMDczNFowgZUxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazEPMA0GA1UEBxMGQXJtb25rMRIwEAYDVQQKEwlJQk0gQ29ycC4xFzAVBgNVBAsTDlNvZnR3YXJlIEdyb3VwMTUwMwYDVQQDEyxXZWJTcGhlcmUgQXBwbGljYXRpb24gU2VydmVyIExpYmVydHkgUHJvZmlsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ8l5a67C3jNwuS9g0rYYJ3dDjnykECQGXgQ7sP5i9ixF0Gg6NYesjn6VUBhf8ziC/4R4yrflPID+C1nM9SsUQld5QyAjbboRCXbW6+oIofzQKzWUHQQavXOXkH3i765GlsuME2qHYT+H8SQ0S0Z2ZMQGr8PXA8lzTSvExozx+oXRXaqG97cpfNDjVZVswxR9QL5h5GdZ7INtN6OcNiKalz5cF95G4VvL1sjtRkPaupNV7C09hnw+UzdPjmxmIOkw6BbS/J0gkE+NSDjQCt1O4EalCOy1ERKMZIb3QsKyYQvebaXCm7u3aEy/yszaCwIIldSjYjM15SUQw20L5vbn/UCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAeJICZmkkBYgMqcq17+GRTWaDvKkcmBdBaIi6DDuRM31FNI7AzB2uLX2vJzXrrxPW41YturXKAZf25uKbgZOikO8e3djjCUhiLYhIm4aTJxPlrh+MejaNAwAVeZBunNrZL9VI8jtU/a1Vd9bEdQ305yXWzt5c5mfJB3Yrn0LmwYKiSfG2pERy0TVnCpNLM6iQ7O2lQLVXXwlxNthWyOavEqlK54LR1GoklhC4k1r4d/5Cc2tjsoIi1y9gZj0qZptJCM2o1RtWf/xa+MgIavH+M/FqLzphvGOoxkPOqOfgpLPhM7bpLM6xqhiqexE5Xxq0JiNaxDi5iVUoDDxXG8ZslA==
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/.gitignore b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/.gitignore
new file mode 100644
index 00000000000..2b09f7ba1e1
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/.gitignore
@@ -0,0 +1 @@
+/apps
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/bootstrap.properties b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/bootstrap.properties
new file mode 100755
index 00000000000..95e4f6aa26f
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/bootstrap.properties
@@ -0,0 +1,2 @@
+com.ibm.ws.logging.trace.specification=config=all=enabled:*=info=enabled
+bootstrap.include=../testports.properties
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/common.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/common.xml
new file mode 100755
index 00000000000..1bf222e9900
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/common.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ jsp-2.2
+ osgiconsole-1.0
+ httpservice-2.2
+ configfatlibertyinternals-1.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/conflict.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/conflict.xml
new file mode 100755
index 00000000000..d8293e3f6d6
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/conflict.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/noConflict.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/noConflict.xml
new file mode 100755
index 00000000000..2cb9eb36fbd
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/noConflict.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/server.xml b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/server.xml
new file mode 100755
index 00000000000..7829758b305
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/publish/servers/com.ibm.ws.config.varmerging/server.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/META-INF/MANIFEST.MF b/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..dac908a02fb
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: test
+Import-Packages: java.io, javax.servlet, javax.servlet.http, org.osgi.framework, org.osgi.service.cm
diff --git a/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/META-INF/permissions.xml b/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/META-INF/permissions.xml
new file mode 100755
index 00000000000..5888d2ec00d
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/META-INF/permissions.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+ java.io.FilePermission
+ ALL FILES
+ read,write
+
+
+
+ javax.management.MBeanServerPermission
+ createMBeanServer
+
+
+
+ java.net.SocketPermission
+ *
+ connect,resolve
+
+
+
+ java.util.PropertyPermission
+ *
+ read,write
+
+
+
+ java.lang.RuntimePermission
+ *
+ *
+
+
+
+ org.osgi.service.cm.ConfigurationPermission
+ *
+ configure
+
+
+
+ javax.security.auth.AuthPermission
+ *
+
+
+
+ org.osgi.framework.ServicePermission
+ *
+ register,get
+
+
+
+
+ org.osgi.framework.AdminPermission
+ *
+ *
+
+
+
+ org.osgi.framework.AdaptPermission
+ *
+ adapt
+
+
+
+
\ No newline at end of file
diff --git a/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/WEB-INF/web.xml b/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/WEB-INF/web.xml
new file mode 100755
index 00000000000..95bbc2c1c95
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/test-applications/childalias/resources/WEB-INF/web.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ ChildAliasTestServlet
+ test.server.config.childalias.ChildAliasTestServlet
+
+
+
+
+ ChildAliasTestServlet
+ /child-alias-test
+
+
+
diff --git a/dev/com.ibm.ws.config_fat/test-applications/childalias/src/test/server/config/childalias/ChildAliasTestServlet.java b/dev/com.ibm.ws.config_fat/test-applications/childalias/src/test/server/config/childalias/ChildAliasTestServlet.java
new file mode 100755
index 00000000000..b1a6c01a2be
--- /dev/null
+++ b/dev/com.ibm.ws.config_fat/test-applications/childalias/src/test/server/config/childalias/ChildAliasTestServlet.java
@@ -0,0 +1,443 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * Copyright IBM Corp. 2013
+ *
+ * The source code for this program is not published or otherwise divested
+ * of its trade secrets, irrespective of what has been deposited with the
+ * U.S. Copyright Office.
+ */
+package test.server.config.childalias;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+import com.ibm.ws.config.xml.internal.XMLConfigConstants;
+
+/**
+ *
+ */
+public class ChildAliasTestServlet extends HttpServlet {
+
+ private static final String CHILD_1_PID = "test.config.childalias.child.1";
+ private static final String CHILD_2_PID = "test.config.childalias.child.2";
+ private static final String CHILD_3_PID = "test.config.childalias.child.3";
+ private static final String CHILD_4_PID = "test.config.childalias.child.4";
+ private static final String CHILD_5_PID = "test.config.childalias.child.5";
+ private static final String CHILD_6_PID = "test.config.childalias.child.6";
+ private static final String PARENT_1_PID = "test.config.childalias.parent.1";
+ private static final String PARENT_2_PID = "test.config.childalias.parent.2";
+ private static final String PARENT_3_PID = "test.config.childalias.parent.3";
+ private static final String PARENT_4_PID = "test.config.childalias.parent.4";
+ private static final String PARENT_5_PID = "test.config.childalias.parent.5";
+ private static final String PARENT_6_PID = "test.config.childalias.parent.6";
+ private static final String TOP_LEVEL_PID = "test.config.childalias.toplevel";
+
+ private final ArrayList references = new ArrayList();
+ private BundleContext bundleContext;
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ PrintWriter writer = response.getWriter();
+
+ String testName = request.getParameter("testName");
+ assertNotNull("No testName parameter specified", testName);
+
+ Bundle bundle = FrameworkUtil.getBundle(HttpServlet.class);
+
+ this.bundleContext = bundle.getBundleContext();
+ try {
+ if (testName.equals("dump")) {
+ // Just for debugging
+ dump(writer);
+ } else {
+ log("Begin test: " + testName);
+ invokeTest(testName);
+ writer.println("OK");
+ }
+ } catch (NoSuchMethodException e) {
+ writer.println("FAILED - Invalid test name: " + testName);
+ } catch (InvocationTargetException e) {
+ writer.println("FAILED");
+ e.getTargetException().printStackTrace(writer);
+ } catch (Throwable e) {
+ writer.println("FAILED");
+ e.printStackTrace(writer);
+ } finally {
+ log("End test: " + testName);
+ for (ServiceReference ref : references) {
+ bundleContext.ungetService(ref);
+ }
+ references.clear();
+ }
+
+ writer.flush();
+ writer.close();
+ }
+
+ /**
+ * Just for manual debugging
+ *
+ * @param writer
+ * @throws Exception
+ */
+ private void dump(PrintWriter writer) throws Exception {
+ ConfigurationAdmin ca = getConfigurationAdmin(bundleContext, references);
+ Configuration[] configurations;
+ try {
+ configurations = ca.listConfigurations(null);
+ for (Configuration c : configurations) {
+ writer.print("
");
+ String pid = c.getFactoryPid() == null ? c.getPid() : c.getFactoryPid();
+ if (pid.startsWith("test")) {
+ writer.println(pid);
+ }
+ }
+ } catch (InvalidSyntaxException e1) {
+ throw new IOException(e1);
+ }
+
+ }
+
+ private void invokeTest(String testName) throws Exception {
+ Method method = getClass().getDeclaredMethod(testName);
+ method.invoke(this);
+ }
+
+ private ConfigurationAdmin getConfigurationAdmin(BundleContext ctx, List references) throws Exception {
+ ServiceReference ref = ctx.getServiceReference(ConfigurationAdmin.class);
+ assertNotNull("No ConfigurationAdmin service", ref);
+ references.add(ref);
+ return ctx.getService(ref);
+ }
+
+ private String getFilter(String pid, boolean isFactory) {
+ if (isFactory) {
+ return "(" + ConfigurationAdmin.SERVICE_FACTORYPID + "=" + pid + ")";
+ } else {
+ return "(" + Constants.SERVICE_PID + "=" + pid + ")";
+ }
+ }
+
+ public void testChildAlias1() throws Exception {
+ ConfigurationAdmin ca = getConfigurationAdmin(bundleContext, references);
+ String filter = getFilter(CHILD_1_PID, true);
+ Configuration[] children1 = ca.listConfigurations(filter);
+ assertNotNull("The configuration for " + CHILD_1_PID + " should exist", children1);
+ assertEquals("There should only be one instance of PID " + CHILD_1_PID, 1, children1.length);
+
+ Configuration child1 = children1[0];
+ Dictionary childProperties = child1.getProperties();
+ assertEquals("The attribute value should be the correct metatype translated value",
+ "defaultValue", childProperties.get("defaultAttribute"));
+
+ filter = getFilter(PARENT_1_PID, true);
+ Configuration[] parents = ca.listConfigurations(filter);
+ assertNotNull("The configuration for " + PARENT_1_PID + " should exist", parents);
+ assertEquals("There should be only one instance of PID " + PARENT_1_PID, 1, parents.length);
+ Configuration parent = parents[0];
+ Dictionary parentProperties = parent.getProperties();
+ assertEquals("The child's parent PID should be equal to the parent's service pid",
+ parentProperties.get(XMLConfigConstants.CFG_SERVICE_PID),
+ childProperties.get(XMLConfigConstants.CFG_PARENT_PID));
+ }
+
+ public void testChildAlias2() throws Exception {
+ ConfigurationAdmin ca = getConfigurationAdmin(bundleContext, references);
+ String filter = getFilter(CHILD_2_PID, true);
+ Configuration[] children2 = ca.listConfigurations(filter);
+ assertNotNull("The configuration for " + CHILD_2_PID + " should exist", children2);
+ assertEquals("There should only be one instance of PID " + CHILD_2_PID, 1, children2.length);
+
+ Configuration child2 = children2[0];
+ Dictionary child2Properties = child2.getProperties();
+ assertEquals("The attribute value should be the correct metatype translated value",
+ "square", child2Properties.get("shape"));
+ assertEquals("The attribute value should be the correct value from the config",
+ "orange", child2Properties.get("color"));
+
+ filter = getFilter(PARENT_2_PID, true);
+ Configuration[] parents2 = ca.listConfigurations(filter);
+ assertNotNull("The configuration for " + PARENT_2_PID + " should exist", parents2);
+ assertEquals("There should be only one instance of PID " + PARENT_2_PID, 1, parents2.length);
+ Configuration parent2 = parents2[0];
+ Dictionary parent2Properties = parent2.getProperties();
+ assertEquals("The child's parent PID should be equal to the parent's service pid",
+ parent2Properties.get(XMLConfigConstants.CFG_SERVICE_PID),
+ child2Properties.get(XMLConfigConstants.CFG_PARENT_PID));
+ }
+
+ public void testChildAliasSingleton1() throws Exception {
+ ConfigurationAdmin ca = getConfigurationAdmin(bundleContext, references);
+ String filter = "(" + Constants.SERVICE_PID + "=" + CHILD_3_PID + ")";
+ Configuration[] children3 = ca.listConfigurations(filter);
+ assertNotNull("The configuration for " + CHILD_3_PID + " should exist", children3);
+ assertEquals("There should only be one instance of PID " + CHILD_3_PID, 1, children3.length);
+
+ Configuration child3 = children3[0];
+ Dictionary childProperties = child3.getProperties();
+ assertEquals("The attribute value should be the correct metatype translated value",
+ "coconut", childProperties.get("defaultAttribute"));
+ assertNull("There should be no contamination from other singletons", childProperties.get("state"));
+
+ filter = "(" + Constants.SERVICE_PID + "=" + PARENT_3_PID + ")";
+ Configuration[] parents = ca.listConfigurations(filter);
+ assertNotNull("The configuration for " + PARENT_3_PID + " should exist", parents);
+ assertEquals("There should be only one instance of PID " + PARENT_3_PID, 1, parents.length);
+ Configuration parent = parents[0];
+ Dictionary parentProperties = parent.getProperties();
+ assertEquals("The child's parent PID should be equal to the parent's service pid",
+ parentProperties.get(XMLConfigConstants.CFG_SERVICE_PID),
+ childProperties.get(XMLConfigConstants.CFG_PARENT_PID));
+ }
+
+ public void testChildAliasSingleton2() throws Exception {
+ ConfigurationAdmin ca = getConfigurationAdmin(bundleContext, references);
+ String filter = "(" + Constants.SERVICE_PID + "=" + CHILD_4_PID + ")";
+ Configuration[] children4 = ca.listConfigurations(filter);
+ assertNotNull("The configuration for " + CHILD_4_PID + " should exist", children4);
+ assertEquals("There should only be one instance of PID " + CHILD_4_PID, 1, children4.length);
+
+ Configuration child4 = children4[0];
+ Dictionary