From 503bd4406696f243df87cded879f14f3a340df17 Mon Sep 17 00:00:00 2001 From: Matt Gill Date: Tue, 20 Aug 2019 13:21:06 +0100 Subject: [PATCH 1/5] Remove unused tests The tests in the appserver/tests directory all seemed unused except for quicklook, so were deleted. --- appserver/tests/admingui/README.md | 36 - appserver/tests/admingui/auto-test/pom.xml | 115 - .../admingui/devtests/AdminObjectTest.java | 180 -- .../admingui/devtests/AdminServiceTest.java | 125 - .../devtests/AppScopedResourcesTest.java | 507 ---- .../admingui/devtests/ApplicationTest.java | 181 -- .../devtests/AvailabilityServiceTest.java | 186 -- .../devtests/BaseSeleniumTestClass.java | 404 --- .../admingui/devtests/ClusterTest.java | 500 ---- .../admingui/devtests/ConfigTest.java | 78 - .../devtests/ConnectorServiceTest.java | 78 - .../admingui/devtests/ConnectorsTest.java | 281 -- .../admingui/devtests/EjbContainerTest.java | 243 -- .../devtests/EnterpriseServerTest.java | 169 -- .../glassfish/admingui/devtests/GMSTest.java | 84 - .../admingui/devtests/HttpServiceTest.java | 100 - .../admingui/devtests/IiopListenerTest.java | 118 - .../admingui/devtests/JVMReportTest.java | 74 - .../admingui/devtests/JavaMailTest.java | 184 -- .../devtests/JavaMessageServiceTest.java | 247 -- .../glassfish/admingui/devtests/JdbcTest.java | 315 --- .../admingui/devtests/JmsResourcesTest.java | 263 -- .../glassfish/admingui/devtests/JndiTest.java | 285 -- .../admingui/devtests/JvmSettingsTest.java | 190 -- .../devtests/LifecycleModulesTest.java | 135 - .../admingui/devtests/LogViewerTest.java | 90 - .../admingui/devtests/LoggerSettingsTest.java | 131 - .../admingui/devtests/MonitoringTest.java | 416 --- .../admingui/devtests/MsgSecurityTest.java | 262 -- .../admingui/devtests/NetworkConfigTest.java | 214 -- .../glassfish/admingui/devtests/NodeTest.java | 385 --- .../devtests/ResourceAdapterConfigsTest.java | 85 - .../admingui/devtests/SecurityTest.java | 452 --- .../admingui/devtests/StandaloneTest.java | 241 -- .../admingui/devtests/ThreadPoolsTest.java | 81 - .../devtests/TransactionServiceTest.java | 100 - .../admingui/devtests/VirtualServerTest.java | 87 - .../admingui/devtests/WebContainerTest.java | 285 -- .../devtests/WorkSecurityMapTest.java | 80 - .../src/test/resources/JavaEEApp.ear | Bin 10923 -> 0 bytes .../resources/ejb-ejb30-hello-sessionApp.ear | Bin 30998 -> 0 bytes .../resources/ejb-timer-sessiontimerApp.ear | Bin 38207 -> 0 bytes .../auto-test/src/test/resources/test.war | Bin 1911 -> 0 bytes appserver/tests/admingui/pom.xml | 121 - appserver/tests/admingui/test_results.TXT | 81 - appserver/tests/amx/amx-unit-tests.html | 160 -- appserver/tests/amx/pom.xml | 152 - appserver/tests/amx/resources/amxtest.classes | 156 - .../tests/amx/resources/amxtest.properties | 174 -- appserver/tests/amx/run.sh | 53 - .../glassfish/admin/amxtest/AMXTestBase.java | 689 ----- .../glassfish/admin/amxtest/Capabilities.java | 104 - .../admin/amxtest/ClusterSupportRequired.java | 63 - .../admin/amxtest/CoverageInfoAnalyzer.java | 288 -- .../admin/amxtest/DomainRootTest.java | 111 - .../glassfish/admin/amxtest/JMXTestBase.java | 306 -- .../MultipleServerSupportRequired.java | 63 - .../org/glassfish/admin/amxtest/Observer.java | 120 - .../glassfish/admin/amxtest/PropertyKeys.java | 193 -- .../admin/amxtest/RegistrationListener.java | 166 -- .../admin/amxtest/RunMeFirstTest.java | 133 - .../admin/amxtest/RunMeLastTest.java | 123 - .../TestClientTrustStoreTrustManager.java | 80 - .../org/glassfish/admin/amxtest/TestMain.java | 875 ------ .../glassfish/admin/amxtest/TestRunner.java | 308 -- .../admin/amxtest/TestTemplateTest.java | 74 - .../org/glassfish/admin/amxtest/TestUtil.java | 249 -- .../org/glassfish/admin/amxtest/Tests.java | 181 -- .../admin/amxtest/base/AMXDebugTest.java | 193 -- .../glassfish/admin/amxtest/base/AMXTest.java | 991 ------- .../admin/amxtest/base/BulkAccessTest.java | 229 -- .../admin/amxtest/base/ContainerTest.java | 434 --- .../admin/amxtest/base/GenericTest.java | 661 ----- .../amxtest/base/GetSetAttributeTest.java | 191 -- .../admin/amxtest/base/ListenerTest.java | 100 - .../base/NotificationEmitterServiceTest.java | 165 -- .../base/NotificationPerformanceTest.java | 128 - .../base/NotificationServiceMgrTest.java | 89 - .../amxtest/base/NotificationServiceTest.java | 201 -- .../admin/amxtest/base/QueryMgrTest.java | 355 --- .../amxtest/base/UploadDownloadMgrTest.java | 374 --- .../client/AppserverConnectionSourceTest.java | 145 - .../admin/amxtest/client/MiscTest.java | 154 - .../admin/amxtest/client/PerformanceTest.java | 335 --- .../amxtest/client/ProxyFactoryTest.java | 112 - .../admin/amxtest/client/ProxyTest.java | 309 -- .../config/AdminObjectResourceConfigTest.java | 136 - .../amxtest/config/AuditModuleConfigTest.java | 125 - .../amxtest/config/AuthRealmConfigTest.java | 278 -- .../config/AvailabilityServiceConfigTest.java | 196 -- .../amxtest/config/ClusterConfigTest.java | 131 - .../config/ClusteredServerConfigTest.java | 175 -- .../amxtest/config/ConfigConfigTest.java | 180 -- .../amxtest/config/ConfigMgrTestBase.java | 233 -- .../amxtest/config/ConfigRunMeFirstTest.java | 128 - .../admin/amxtest/config/ConfigSetup.java | 141 - .../ConnectorConnectionPoolConfigTest.java | 128 - .../config/ConnectorResourceConfigTest.java | 166 -- .../config/ConnectorServiceConfigTest.java | 116 - .../amxtest/config/CustomMBeanConfigTest.java | 323 --- .../config/CustomResourceConfigTest.java | 136 - .../amxtest/config/DanglingRefsTest.java | 165 -- .../admin/amxtest/config/DescriptionTest.java | 69 - .../config/DiagnosticServiceConfigTest.java | 104 - .../amxtest/config/DomainConfigTest.java | 186 -- .../admin/amxtest/config/DottedNamesTest.java | 247 -- .../admin/amxtest/config/EnabledTest.java | 68 - .../config/HTTPListenerConfigTest.java | 204 -- .../amxtest/config/HTTPServiceConfigTest.java | 192 -- .../config/IIOPListenerConfigTest.java | 172 -- .../config/JACCProviderConfigTest.java | 116 - .../config/JDBCConnectionPoolConfigTest.java | 128 - .../config/JDBCResourceConfigTest.java | 163 -- .../config/JMXConnectorConfigTest.java | 235 -- .../config/JNDIResourceConfigTest.java | 136 - .../admin/amxtest/config/JavaConfigTest.java | 215 -- .../admin/amxtest/config/LBTest.java | 180 -- .../admin/amxtest/config/LibrariesTest.java | 128 - .../config/MailResourceConfigTest.java | 172 -- .../config/MessageSecurityConfigTest.java | 144 - .../config/ModuleLogLevelsConfigTest.java | 97 - .../ModuleMonitoringLevelsConfigTest.java | 82 - .../amxtest/config/NodeAgentConfigTest.java | 83 - ...tenceManagerFactoryResourceConfigTest.java | 119 - .../amxtest/config/ProfilerConfigTest.java | 130 - .../amxtest/config/PropertiesAccessTest.java | 226 -- .../admin/amxtest/config/ReferencesTest.java | 350 --- .../config/ResourceAdapterConfigTest.java | 140 - .../config/ResourceConfigTestBase.java | 83 - .../admin/amxtest/config/SSLConfigTest.java | 93 - .../amxtest/config/SecurityMapConfigTest.java | 214 -- .../config/SecurityServiceConfigTest.java | 216 -- .../config/StandaloneServerConfigTest.java | 183 -- .../config/SystemPropertiesAccessTest.java | 199 -- .../amxtest/config/ThreadPoolConfigTest.java | 123 - .../config/VirtualServerConfigTest.java | 141 - .../amxtest/doc-files/AddingAMXUnitTests.html | 317 --- .../amxtest/doc-files/RunningUnitTests.html | 1517 ---------- .../ext/logging/LoggingHelperTest.java | 218 -- .../amxtest/ext/logging/LoggingTest.java | 464 --- .../logging/StatefulLoggingHelperTest.java | 125 - .../amxtest/ext/update/UpdateStatusTest.java | 70 - .../ext/wsmgmt/WebServiceConfigCRTest.java | 160 -- .../ext/wsmgmt/WebServiceConfigTest.java | 119 - .../amxtest/ext/wsmgmt/WebServiceMgrTest.java | 185 -- .../ext/wsmgmt/WebServiceMonitorTest.java | 118 - .../ext/wsmgmt/WebServiceRuntimeTest.java | 140 - .../admin/amxtest/helper/RefHelperTest.java | 203 -- .../admin/amxtest/j2ee/J2EETest.java | 388 --- .../admin/amxtest/j2ee/ServletTest.java | 72 - .../admin/amxtest/j2ee/WSMsgTraceTest.java | 100 - .../amxtest/monitor/AMXMonitorTestBase.java | 71 - .../amxtest/monitor/BeanCacheMonitorTest.java | 102 - .../amxtest/monitor/CallFlowMonitorTest.java | 195 -- .../monitor/ConnectionPoolStatsTest.java | 126 - .../ConnectorConnectionPoolStatsTest.java | 78 - .../monitor/JDBCConnectionPoolStatsTest.java | 79 - .../amxtest/monitor/JMXMonitorMgrTest.java | 95 - .../admin/amxtest/monitor/MonitorTest.java | 494 ---- .../admin/amxtest/monitor/StatisticTest.java | 151 - .../WebServiceEndpointMonitorTest.java | 115 - .../admin/amxtest/support/AMXComparator.java | 73 - .../amxtest/support/CoverageInfoTest.java | 278 -- .../amxtest/support/CreateRemoveListener.java | 150 - appserver/tests/cdi/README.txt | 16 - .../cdi/cases/multiBeansXml/ejb1/pom.xml | 73 - .../devtests/multiejb1/InterceptedEjb1.java | 67 - .../devtests/multiejb1/Interceptor1.java | 70 - .../devtests/multiejb1/MultiBeansXmlEjb1.java | 60 - .../multiejb1/RecordingInterceptor.java | 62 - .../src/main/resources/META-INF/beans.xml | 8 - .../cdi/cases/multiBeansXml/ejb2/pom.xml | 73 - .../devtests/multiejb2/InterceptedEjb2.java | 66 - .../devtests/multiejb2/Interceptor2.java | 69 - .../devtests/multiejb2/MultiBeansXmlEjb2.java | 60 - .../multiejb2/RecordingInterceptor.java | 62 - .../src/main/resources/META-INF/beans.xml | 7 - .../cases/multiBeansXml/multiBeansApp/pom.xml | 111 - .../tests/cdi/cases/multiBeansXml/pom.xml | 65 - appserver/tests/cdi/cases/pom.xml | 65 - .../cdi/cases/preDestroyScoping/ear/pom.xml | 111 - .../cdi/cases/preDestroyScoping/lib/pom.xml | 73 - .../devtests/predestroy/lib/EventLog.java | 64 - .../predestroy/lib/PreDestroyConstants.java | 52 - .../devtests/predestroy/lib/RequestBean.java | 52 - .../lib/src/main/resources/META-INF/beans.xml | 5 - .../tests/cdi/cases/preDestroyScoping/pom.xml | 65 - .../cdi/cases/preDestroyScoping/web/pom.xml | 96 - .../predestroy/war/EventLogServlet.java | 67 - .../predestroy/war/LogoutServlet.java | 62 - .../predestroy/war/SessionBeanProducer.java | 87 - .../predestroy/war/SessionBeanServlet.java | 63 - .../web/src/main/webapp/WEB-INF/beans.xml | 5 - .../web/src/main/webapp/WEB-INF/web.xml | 50 - appserver/tests/cdi/cases/runner/pom.xml | 120 - .../oracle/cdi/devtests/runner/main/Main.java | 48 - .../cdi/devtests/cases/runner/CasesTest.java | 193 -- .../cdi/negative/normalScopeWithFinal/pom.xml | 90 - .../IExtendAClassWithFinalMethods.java | 56 - .../normalScoped/IHaveFinalMethods.java | 55 - .../StatelessEjbWithInjectionPoint.java | 64 - .../src/main/resources/META-INF/beans.xml | 4 - appserver/tests/cdi/negative/pom.xml | 64 - appserver/tests/cdi/negative/runner/pom.xml | 98 - .../com/oracle/cdi/devtest/runner/Main.java | 43 - .../cdi/devtest/runner/test/NegativeTest.java | 78 - appserver/tests/cdi/pom.xml | 62 - .../QuickLook_Test_Instructions.html | 216 -- .../community/adminweb/basic/build.properties | 51 - .../tests/community/adminweb/basic/build.xml | 168 -- .../adminweb/basic/src/test/SeleniumTest.java | 117 - .../tests/community/adminweb/basic/testng.xml | 75 - appserver/tests/community/build.properties | 59 - appserver/tests/community/build.xml | 319 --- .../ejb30/session/hello/build.properties | 57 - .../community/ejb30/session/hello/build.xml | 203 -- .../session/hello/metadata/sun-ejb-jar.xml | 56 - .../tests/community/gfproject/.asadminpass | 42 - .../community/gfproject/adminpassword.txt | 2 - .../tests/community/gfproject/build-impl.xml | 326 --- .../tests/community/gfproject/db-targets.xml | 141 - .../community/gfproject/derby.properties | 54 - .../community/gfproject/v2-config.properties | 64 - .../tests/community/gfproject/v2-targets.xml | 188 -- .../community/gfproject/v3-config.properties | 57 - .../tests/community/gfproject/v3-targets.xml | 168 -- .../jdbc/jdbcusertx/build.properties | 51 - .../tests/community/jdbc/jdbcusertx/build.xml | 81 - .../jdbc/jdbcusertx/metadata/sun-web.xml | 54 - .../jdbc/jdbcusertx/metadata/web.xml | 70 - .../jdbc/jdbcusertx/src/java/MyServlet.java | 178 -- .../jdbcusertx/src/java/test/LeakTest.java | 113 - .../jdbcusertx/src/java/test/SimpleTest.java | 58 - .../jdbcusertx/src/java/test/UserTxTest.java | 238 -- .../jdbcusertx/src/java/util/HtmlUtil.java | 63 - .../jdbcusertx/src/java/util/TablesUtil.java | 152 - .../jdbcusertx/src/test/JdbcUserTxTestNG.java | 159 -- .../jdbc/jdbcusertx/web/html/index.html | 53 - .../jdbc/jdbcusertx/web/jsp/index.jsp | 49 - .../servlet-jpa-app/build.properties | 55 - .../persistence/servlet-jpa-app/build.xml | 88 - .../servlet-jpa-app/metadata/persistence.xml | 49 - .../servlet-jpa-app/metadata/sun-web.xml | 56 - .../servlet-jpa-app/metadata/web.xml | 63 - .../servlet-jpa-app/sql/create_derby.sql | 18 - .../servlet-jpa-app/sql/drop_derby.sql | 7 - .../src/java/persistence/WebCustomer.java | 186 -- .../src/java/web/CustomerDetails.java | 162 -- .../src/test/PersistenceTestNG.java | 273 -- .../servlet-jpa-app/web/html/first.html | 58 - .../servlet-jpa-app/web/jsp/index.jsp | 79 - appserver/tests/community/pom.xml | 112 - appserver/tests/community/run.xml | 69 - appserver/tests/community/testng.xml | 87 - .../community/web/helloworld/build.properties | 52 - .../tests/community/web/helloworld/build.xml | 81 - .../web/helloworld/metadata/sun-web.xml | 53 - .../community/web/helloworld/metadata/web.xml | 71 - .../web/helloworld/src/java/HelloServlet.java | 122 - .../helloworld/src/test/HelloJSPTestNG.java | 233 -- .../web/helloworld/web/html/first.html | 58 - .../web/helloworld/web/jsp/hello.jsp | 69 - .../web/helloworld/web/jsp/index.jsp | 69 - .../community/web/jruby/build.properties | 50 - appserver/tests/community/web/jruby/build.xml | 66 - .../tests/community/web/jruby/helloapp/README | 211 -- .../community/web/jruby/helloapp/Rakefile | 50 - .../helloapp/app/controllers/application.rb | 47 - .../controllers/mycontroller_controller.rb | 45 - .../app/helpers/application_helper.rb | 43 - .../app/helpers/mycontroller_helper.rb | 42 - .../app/views/mycontroller/testview.rhtml | 44 - .../web/jruby/helloapp/build.properties | 54 - .../community/web/jruby/helloapp/build.xml | 91 - .../web/jruby/helloapp/config/boot.rb | 79 - .../web/jruby/helloapp/config/database.yml | 76 - .../web/jruby/helloapp/config/environment.rb | 100 - .../config/environments/development.rb | 61 - .../config/environments/production.rb | 58 - .../helloapp/config/environments/test.rb | 59 - .../web/jruby/helloapp/config/routes.rb | 63 - .../web/jruby/helloapp/public/404.html | 72 - .../web/jruby/helloapp/public/500.html | 72 - .../web/jruby/helloapp/public/dispatch.cgi | 49 - .../web/jruby/helloapp/public/dispatch.fcgi | 64 - .../web/jruby/helloapp/public/dispatch.rb | 49 - .../web/jruby/helloapp/public/favicon.ico | 0 .../jruby/helloapp/public/images/rails.png | Bin 1787 -> 0 bytes .../web/jruby/helloapp/public/index.html | 319 --- .../public/javascripts/application.js | 2 - .../helloapp/public/javascripts/controls.js | 833 ------ .../helloapp/public/javascripts/dragdrop.js | 942 ------ .../helloapp/public/javascripts/effects.js | 1088 ------- .../helloapp/public/javascripts/prototype.js | 2515 ----------------- .../web/jruby/helloapp/public/robots.txt | 41 - .../web/jruby/helloapp/test/JRubyTestNG.java | 162 -- .../web/jsfastrologer/build.properties | 47 - .../community/web/jsfastrologer/build.xml | 85 - .../jsfastrologer/metadata/faces-config.xml | 70 - .../web/jsfastrologer/metadata/sun-web.xml | 53 - .../web/jsfastrologer/metadata/web.xml | 79 - .../src/java/web/jsf/bean/UserBean.java | 77 - .../jsfastrologer/src/test/JSFWebTestNG.java | 222 -- .../web/jsfastrologer/web/html/first.html | 58 - .../web/jsfastrologer/web/jsp/greetings.jsp | 79 - .../web/jsfastrologer/web/jsp/index.jsp | 83 - .../web/jsfastrologer/web/jsp/success.jsp | 80 - .../web/jsfastrologer/web/jsp/welcomeJSF.jsp | 62 - .../jsfastrologer/web/jsp/welcomeStruts.jsp | 65 - .../web/jsfinjection/build.properties | 52 - .../community/web/jsfinjection/build.xml | 82 - .../jsfinjection/metadata/faces-config.xml | 55 - .../web/jsfinjection/metadata/web.xml | 87 - .../web/jsfinjection/src/java/FilterTest.java | 94 - .../web/jsfinjection/src/java/TestBean.java | 70 - .../src/test/JSFInjectionTestNG.java | 154 - .../web/jsfinjection/web/jsp/jsfHello.jsp | 63 - .../web/strutsbasic/build.properties | 49 - .../tests/community/web/strutsbasic/build.xml | 82 - .../web/strutsbasic/metadata/context.xml | 44 - .../strutsbasic/metadata/struts-config.xml | 109 - .../web/strutsbasic/metadata/sun-web.xml | 53 - .../web/strutsbasic/metadata/tiles-defs.xml | 83 - .../web/strutsbasic/metadata/validation.xml | 115 - .../strutsbasic/metadata/validator-rules.xml | 355 --- .../web/strutsbasic/metadata/web.xml | 98 - .../src/java/ApplicationResource.properties | 65 - .../strutsbasic/src/test/StrutsWebTestNG.java | 170 -- .../web/strutsbasic/web/html/first.html | 58 - .../web/strutsbasic/web/jsp/hello.jsp | 69 - .../web/strutsbasic/web/jsp/index.jsp | 80 - .../web/strutsbasic/web/jsp/welcomeStruts.jsp | 65 - appserver/tests/embedded/README | 6 - appserver/tests/embedded/basic/README | 15 - .../tests/embedded/basic/lifecycle/README | 11 - .../tests/embedded/basic/lifecycle/pom.xml | 113 - .../basic/lifecycle/LifeCycleTest.java | 118 - appserver/tests/embedded/basic/pom.xml | 53 - appserver/tests/embedded/cdi_basic/pom.xml | 116 - .../cdi_basic/BasicCDITestServlet.java | 79 - .../tests/embedded/cdi_basic/TestBean.java | 46 - .../cdi_basic/TestRequestScopedBean.java | 47 - .../src/main/webapp/WEB-INF/beans.xml | 0 .../src/main/webapp/WEB-INF/sun-web.xml | 46 - .../cdi_basic/src/main/webapp/WEB-INF/web.xml | 45 - .../embedded/cdi_basic/BasicCDITest.java | 139 - appserver/tests/embedded/cdi_ejb_jpa/README | 3 - appserver/tests/embedded/cdi_ejb_jpa/pom.xml | 115 - .../cdi_ejb_jpa/BasicCDITestServlet.java | 102 - .../tests/embedded/cdi_ejb_jpa/Person.java | 108 - .../tests/embedded/cdi_ejb_jpa/TestBean.java | 74 - .../cdi_ejb_jpa/TestRequestScopedBean.java | 47 - .../main/resources/META-INF/persistence.xml | 52 - .../src/main/webapp/WEB-INF/beans.xml | 0 .../src/main/webapp/WEB-INF/sun-web.xml | 46 - .../src/main/webapp/WEB-INF/web.xml | 45 - .../embedded/cdi_ejb_jpa/BasicCDITest.java | 139 - appserver/tests/embedded/ejb/basic/pom.xml | 116 - .../tests/embedded/ejb/basic/SampleEjb.java | 56 - .../tests/embedded/ejb/basic/TimerEjb.java | 79 - .../embedded/ejb/basic/test/EmbeddedTest.java | 106 - appserver/tests/embedded/ejb/ejb-api/pom.xml | 116 - .../tests/embedded/ejb/SampleEjb.java | 54 - .../tests/embedded/ejb/test/EmbeddedTest.java | 104 - appserver/tests/embedded/ejb/ejb-main/pom.xml | 109 - .../embedded/ejb/main/EmbeddedMainTest.java | 72 - appserver/tests/embedded/ejb/pom.xml | 57 - .../tests/embedded/ejb/remoteejb/pom.xml | 128 - .../embedded/ejb/remoteejb/RemoteEJB.java | 57 - .../embedded/ejb/remoteejb/RemoteEJBInf.java | 48 - .../embedded/ejb/remoteejb/SampleEjb.java | 56 - .../embedded/ejb/remoteejb/TimerEjb.java | 79 - .../embedded/ejb/remoteejb/test/EJBTest.java | 125 - .../embedded/glassfish_resources_xml/README | 1 - .../embedded/glassfish_resources_xml/pom.xml | 116 - .../cdi_ejb_jpa/BasicCDITestServlet.java | 91 - .../tests/embedded/cdi_ejb_jpa/Person.java | 108 - .../tests/embedded/cdi_ejb_jpa/TestBean.java | 74 - .../cdi_ejb_jpa/TestRequestScopedBean.java | 47 - .../main/resources/META-INF/persistence.xml | 52 - .../src/main/webapp/WEB-INF/beans.xml | 0 .../webapp/WEB-INF/glassfish-resources.xml | 62 - .../src/main/webapp/WEB-INF/sun-web.xml | 46 - .../src/main/webapp/WEB-INF/web.xml | 45 - .../embedded/cdi_ejb_jpa/BasicCDITest.java | 141 - appserver/tests/embedded/inplanted/pom.xml | 156 - .../inplanted/ExistingConfigurationTest.java | 111 - .../inplanted/ExistingDomainTest.java | 98 - .../embedded/inplanted/InplantedTest.java | 120 - .../tests/embedded/web/HelloWeb.java | 68 - .../applicationDispatcher/pom.xml | 104 - .../src/main/java/test/ServletTest.java | 93 - .../src/main/webapp/WEB-INF/web.xml | 63 - .../src/main/webapp/test.jsp | 43 - .../tests/applicationDispatcher/WebTest.java | 100 - .../embedded/maven-plugin/dirListing/pom.xml | 112 - .../src/main/java/test/ServletTest.java | 86 - .../src/main/webapp/WEB-INF/web.xml | 84 - .../glassfish/tests/dirListing/WebTest.java | 99 - .../maven-plugin/filterURIMapping/pom.xml | 104 - .../src/main/java/test/FilterTest.java | 67 - .../src/main/java/test/ServletTest.java | 83 - .../src/main/webapp/WEB-INF/sun-web.xml | 59 - .../src/main/webapp/WEB-INF/web.xml | 76 - .../tests/filterURIMapping/WebTest.java | 106 - .../maven-plugin/getRequestURI/pom.xml | 103 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../src/main/webapp/WEB-INF/web.xml | 62 - .../getRequestURI/src/main/webapp/first.jsp | 68 - .../getRequestURI/src/main/webapp/main.jsp | 62 - .../getRequestURI/src/main/webapp/second.jsp | 68 - .../tests/embedded/maven-plugin/index/pom.xml | 102 - .../org/glassfish/tests/index/WebTest.java | 92 - .../tests/embedded/maven-plugin/init/pom.xml | 94 - .../maven-plugin/jmxUndeployEvent/pom.xml | 103 - .../src/main/java/test/ServletTest.java | 76 - .../src/main/webapp/WEB-INF/web.xml | 64 - .../tests/jmxUndeployEvent/WebTest.java | 77 - .../embedded/maven-plugin/jsftest/pom.xml | 106 - .../tests/embedded/jsftest/JSFTestBean.java | 87 - .../embedded/jsftest/JSFTestServlet.java | 92 - .../src/main/webapp/WEB-INF/sun-web.xml | 51 - .../jsftest/src/main/webapp/WEB-INF/web.xml | 72 - .../jsftest/src/main/webapp/index.xhtml | 85 - .../tests/embedded/jsftest/JSFTest.java | 138 - .../embedded/maven-plugin/jsptest/pom.xml | 97 - .../embedded/jsptest/JspTestServlet.java | 75 - .../main/resources/LocalStrings.properties | 42 - .../src/main/webapp/WEB-INF/sun-web.xml | 46 - .../jsptest/src/main/webapp/WEB-INF/web.xml | 45 - .../src/main/webapp/images/duke.waving.gif | Bin 1305 -> 0 bytes .../jsptest/src/main/webapp/index.jsp | 66 - .../jsptest/src/main/webapp/response.jsp | 72 - .../tests/embedded/jsptest/JspTest.java | 138 - .../embedded/maven-plugin/localejbs/pom.xml | 107 - .../embedded/localejbs/LocalEjbTest.java | 71 - .../embedded/localejbs/TesterServlet.java | 70 - .../tests/embedded/localejbs/TimerEjb.java | 77 - .../tests/embedded/localejbs/EjbTest.java | 64 - .../tests/embedded/maven-plugin/mdb/pom.xml | 130 - .../embedded/mdb/MessageProcessorBean.java | 78 - .../tests/embedded/mdb/TesterServlet.java | 70 - .../tests/embedded/mdb/UnitTest.java | 113 - .../glassfish/tests/embedded/mdb/MyTest.java | 64 - .../maven-plugin/multipleApps/pom.xml | 154 - .../multipleApps/secondapp/secondapp.war | Bin 4213 -> 0 bytes .../embedded/jsptest/JspTestServlet.java | 75 - .../main/resources/LocalStrings.properties | 42 - .../src/main/webapp/WEB-INF/sun-web.xml | 46 - .../src/main/webapp/WEB-INF/web.xml | 45 - .../src/main/webapp/images/duke.waving.gif | Bin 1305 -> 0 bytes .../multipleApps/src/main/webapp/index.jsp | 66 - .../multipleApps/src/main/webapp/response.jsp | 72 - .../tests/embedded/jsptest/JspTest.java | 142 - appserver/tests/embedded/maven-plugin/pom.xml | 283 -- .../embedded/maven-plugin/queryString/pom.xml | 103 - .../src/main/java/test/ServletTest.java | 91 - .../src/main/webapp/WEB-INF/web.xml | 66 - .../glassfish/tests/queryString/WebTest.java | 123 - .../embedded/maven-plugin/remoteejbs/pom.xml | 107 - .../tests/embedded/remoteejbs/TimerEjb.java | 77 - .../embedded/remoteejbs/TimerRemote.java | 54 - .../tests/embedded/remoteejbs/EjbTest.java | 74 - .../embedded/maven-plugin/scattered/pom.xml | 88 - .../src/main/java/test/FilterTest.java | 67 - .../src/main/java/test/ServletTest.java | 111 - .../src/main/java/test/ServletTest2.java | 88 - .../src/main/java/test/ServletTest3.java | 99 - .../src/main/webapp/WEB-INF/sun-web.xml | 56 - .../scattered/src/main/webapp/WEB-INF/web.xml | 98 - .../scattered/src/main/webapp/index.html | 45 - .../scattered/src/main/webapp/index.jsp | 48 - .../secureWebApp/bootstrap.properties | 41 - .../secureWebApp/glassfish.properties | 41 - .../maven-plugin/secureWebApp/pom.xml | 115 - .../java/test/SecureWebAppTestServlet.java | 92 - .../securewebapp/SecureWebAppTest.java | 137 - .../secureWebApp/system.properties | 41 - .../maven-plugin/sessionDestroyed/pom.xml | 104 - .../src/main/java/test/ServletTest.java | 95 - .../src/main/webapp/WEB-INF/web.xml | 68 - .../tests/sessionDestroyed/WebTest.java | 103 - .../embedded/maven-plugin/simple/hello.war | Bin 4102 -> 0 bytes .../embedded/maven-plugin/simple/pom.xml | 90 - .../maven-plugin/standalonewar/pom.xml | 104 - .../src/main/java/test/FilterTest.java | 67 - .../src/main/java/test/ServletTest.java | 111 - .../src/main/java/test/ServletTest2.java | 88 - .../src/main/java/test/ServletTest3.java | 99 - .../src/main/webapp/WEB-INF/sun-web.xml | 56 - .../src/main/webapp/WEB-INF/web.xml | 98 - .../standalonewar/src/main/webapp/index.html | 45 - .../standalonewar/src/main/webapp/index.jsp | 48 - .../tests/standalonewar/WebTest.java | 103 - .../maven-plugin/static-shell-init/pom.xml | 103 - .../embedded/maven-plugin/webservice/pom.xml | 109 - .../src/main/java/test/SimpleWebService.java | 63 - .../src/main/webapp/WEB-INF/web.xml | 52 - .../tests/standalonewar/WebTest.java | 106 - .../embedded/maven-plugin/websockets/pom.xml | 132 - .../samples/websockets/ChatApplication.java | 104 - .../samples/websockets/ChatWebSocket.java | 133 - .../samples/websockets/WebSocketsServlet.java | 57 - .../src/main/webapp/META-INF/context.xml | 44 - .../src/main/webapp/WEB-INF/sun-web.xml | 48 - .../src/main/webapp/WEB-INF/web.xml | 65 - .../main/webapp/images/body-background.png | Bin 2381 -> 0 bytes .../main/webapp/images/header-background.png | Bin 20847 -> 0 bytes .../main/webapp/images/main-background.png | Bin 8026 -> 0 bytes .../websockets/src/main/webapp/index.html | 86 - .../websockets/src/main/webapp/index.jsp | 48 - .../main/webapp/javascripts/application.js | 145 - .../src/main/webapp/javascripts/behaviour.js | 294 -- .../src/main/webapp/javascripts/moo.fx.js | 172 -- .../main/webapp/javascripts/moo.fx.pack.js | 119 - .../src/main/webapp/javascripts/prototype.js | 1813 ------------ .../src/main/webapp/stylesheets/default.css | 106 - .../websockets/src/main/webapp/test.html | 61 - .../tests/standalonewar/WebTest.java | 102 - appserver/tests/embedded/mysql/pom.xml | 122 - .../tests/embedded/web/MySqlTestServlet.java | 125 - .../glassfish/tests/embedded/web/Person.java | 103 - .../main/resources/META-INF/persistence.xml | 54 - .../tests/embedded/web/MySqlTest.java | 111 - appserver/tests/embedded/pom.xml | 65 - .../tests/embedded/scatteredarchive/pom.xml | 114 - .../src/main/config/application.xml | 62 - .../scatteredarchive/src/main/config/ra.xml | 60 - .../ScatteredArchiveTestRA.java | 84 - .../ScatteredArchiveTestServlet.java | 67 - .../main/resources/LocalStrings.properties | 42 - .../src/main/webapp/WEB-INF/sun-web.xml | 46 - .../src/main/webapp/WEB-INF/web.xml | 45 - .../src/main/webapp/images/duke.waving.gif | Bin 1305 -> 0 bytes .../src/main/webapp/index.jsp | 66 - .../src/main/webapp/response.jsp | 72 - .../ScatteredArchiveTest.java | 170 -- .../embedded/servlet_runs_admin_cmds/pom.xml | 142 - .../RunAdminCommandsServlet.java | 86 - .../src/main/webapp/WEB-INF/sun-web.xml | 46 - .../src/main/webapp/WEB-INF/web.xml | 49 - .../RunAdminCommandsTest.java | 107 - appserver/tests/embedded/static/ejb/pom.xml | 60 - .../tests/embedded/static/ejb/simple/pom.xml | 75 - .../tests/embedded/ejb/SampleEjb.java | 54 - .../tests/embedded/ejb/test/EmbeddedTest.java | 98 - appserver/tests/embedded/static/pom.xml | 61 - appserver/tests/embedded/static/web/pom.xml | 117 - .../cooked/ExistingConfigurationTest.java | 111 - .../embedded/cooked/ExistingDomainTest.java | 143 - .../tests/embedded/cooked/InplantedTest.java | 145 - .../tests/embedded/web/HelloWeb.java | 68 - appserver/tests/embedded/utils/pom.xml | 68 - .../embedded/utils/EmbeddedServerUtils.java | 108 - .../tests/embedded/web/autodelete/pom.xml | 127 - .../autodelete/src/main/java/HelloWorld.java | 62 - .../src/main/webapp/WEB-INF/web.xml | 49 - .../embedded/web/autodelete/ServletMain.java | 138 - appserver/tests/embedded/web/pom.xml | 55 - appserver/tests/embedded/web/servlet/pom.xml | 128 - .../web/servlet/src/main/java/HelloWorld.java | 62 - .../servlet/src/main/webapp/WEB-INF/web.xml | 49 - .../embedded/web/servlet/ServletMain.java | 120 - appserver/tests/embedded/web/web-all/pom.xml | 181 -- .../org/glassfish/tests/weball/WebHello.java | 71 - .../glassfish/tests/weball/WebAllTest.java | 131 - appserver/tests/embedded/web/web-api/pom.xml | 132 - .../org/glassfish/tests/webapi/HelloWeb.java | 67 - .../web-api/src/main/resources/cacerts.jks | Bin 80547 -> 0 bytes .../main/resources/embedded-webapi-tests.war | Bin 79893 -> 0 bytes .../web-api/src/main/resources/keystore.jks | Bin 2865 -> 0 bytes .../web/web-api/src/main/resources/keystore0 | Bin 1382 -> 0 bytes .../web/web-api/src/main/resources/keystore1 | Bin 1377 -> 0 bytes .../org/glassfish/tests/webapi/domain.xml | 184 -- .../glassfish/tests/webapi/my-default-web.xml | 1155 -------- .../web/web-api/src/main/resources/toto.jar | Bin 670 -> 0 bytes .../web-api/src/main/webapp/WEB-INF/web.xml | 36 - .../src/main/webapp/images/duke.waving.gif | Bin 1305 -> 0 bytes .../web/web-api/src/main/webapp/index.jsp | 46 - .../web/web-api/src/main/webapp/response.jsp | 72 - .../embedded/web/EmbeddedAddContextTest.java | 132 - .../web/EmbeddedAddHttpsListenerTest.java | 202 -- .../web/EmbeddedAddListenerDefaultVSTest.java | 130 - ...dedAddServletAndFilterByClassNameTest.java | 140 - ...mbeddedAddServletAndFilterByClassTest.java | 145 - .../web/EmbeddedAddServletDefaultVSTest.java | 129 - .../embedded/web/EmbeddedAddServletTest.java | 144 - .../web/EmbeddedAddWebListenerTest.java | 161 -- .../embedded/web/EmbeddedClassLoaderTest.java | 141 - .../web/EmbeddedCreateContextTest.java | 114 - .../EmbeddedCreateServletAndFilterTest.java | 147 - .../web/EmbeddedCreateVirtualServerTest.java | 154 - .../embedded/web/EmbeddedGetContextsTest.java | 157 - .../tests/embedded/web/EmbeddedJSPTest.java | 131 - .../embedded/web/EmbeddedRedeployTest.java | 138 - .../web/EmbeddedRemoveContextTest.java | 164 -- .../embedded/web/EmbeddedRestartTest.java | 132 - .../web/EmbeddedSetConfigurationTest.java | 121 - .../web/EmbeddedSetDefaultWebXmlTest.java | 125 - .../embedded/web/EmbeddedSetDocRootTest.java | 126 - .../embedded/web/EmbeddedSetSecurityTest.java | 166 -- .../EmbeddedVirtualServerHostNameTest.java | 126 - .../web/EmbeddedWebAPIDefaultStartTest.java | 148 - .../embedded/web/EmbeddedWebAPITest.java | 181 -- .../tests/embedded/web/EmbeddedWebTest.java | 167 -- .../tests/embedded/web/MyServlet.java | 68 - .../web/MyServletContextListener.java | 68 - .../tests/embedded/web/NewFilter.java | 64 - .../tests/embedded/web/NewFilterServlet.java | 62 - .../tests/embedded/web/NewServlet.java | 110 - .../web/NewServletRequestListener.java | 55 - .../tests/embedded/web/WebHello.java | 67 - appserver/tests/embedded/web/web-war/pom.xml | 66 - .../tests/embedded/web/web-war/test/pom.xml | 184 -- .../tests/embedded/webwar/EmbeddedTest.java | 176 -- .../tests/embedded/web/web-war/war/pom.xml | 84 - .../tests/embedded/webwar/TestServlet.java | 56 - .../war/src/main/webapp/WEB-INF/web.xml | 50 - .../web/web-war/web-fragment1/pom.xml | 66 - .../webwar/webfragment1/WFTestFilter.java | 77 - .../web/web-war/web-fragment2/pom.xml | 67 - .../webwar/webfragment2/WFTestFilter2.java | 77 - .../webwar/webfragment2/WFTestFilter2B.java | 77 - .../main/resources/META-INF/web-fragment.xml | 55 - .../web/web-war/web-fragment3/pom.xml | 67 - .../webwar/webfragment3/WFTestFilter3.java | 77 - .../main/resources/META-INF/web-fragment.xml | 46 - appserver/tests/embedded/wrapper/pom.xml | 59 - .../tests/embedded/EmbeddedMain.java | 81 - appserver/tests/hk2/README.txt | 16 - appserver/tests/hk2/cdi/basic/ejb1/pom.xml | 100 - .../oracle/hk2/devtest/cdi/ejb1/BasicEjb.java | 126 - .../ejb1/EjbInjectedWithServiceLocator.java | 187 -- .../ApplicationPopulatorPostProcessor.java | 73 - .../CountingApplicationScopedCDIService.java | 75 - .../devtest/cdi/ejb1/scoped/CustomScope.java | 63 - .../cdi/ejb1/scoped/CustomScopeContext.java | 142 - .../cdi/ejb1/scoped/CustomScopedEjb.java | 78 - .../cdi/ejb1/scoped/HK2NamedService.java | 53 - .../ejb1/scoped/HK2NamedServiceFactory.java | 83 - .../ejb1/scoped/HK2NamedServiceFactory2.java | 80 - ...ookupInjectedWithCDIApplicationScoped.java | 64 - .../devtest/cdi/ejb1/scoped/HK2Service.java | 62 - .../cdi/ejb1/scoped/HK2ServiceFactory.java | 69 - .../cdi/ejb1/scoped/HK2ServiceImpl.java | 67 - .../hk2/devtest/cdi/extension/AnEvent.java | 50 - .../devtest/cdi/extension/CDIExtension.java | 271 -- .../devtest/cdi/extension/EventObserver.java | 55 - .../devtest/cdi/extension/FieldProducer.java | 54 - .../cdi/extension/HK2ExtensionVerifier.java | 145 - .../devtest/cdi/extension/MethodProducer.java | 56 - .../cdi/extension/ProducedServiceA.java | 51 - .../cdi/extension/ProducedServiceB.java | 51 - .../jit/CDIServiceInjectedWithHK2Service.java | 59 - .../hk2/devtest/cdi/jit/HK2Service.java | 54 - .../hk2/devtest/cdi/jit/JITResolver.java | 72 - .../hk2/devtest/cdi/locator/BasicService.java | 69 - .../src/main/resources/META-INF/beans.xml | 4 - .../javax.enterprise.inject.spi.Extension | 1 - ...sfish.hk2.bootstrap.PopulatorPostProcessor | 1 - appserver/tests/hk2/cdi/basic/pom.xml | 62 - appserver/tests/hk2/cdi/basic/runner/pom.xml | 112 - .../java/com/oracle/hk2/devtest/Main.java | 81 - .../hk2/devtest/cdi/runner/BasicCDITest.java | 195 -- appserver/tests/hk2/cdi/ear/app/pom.xml | 144 - appserver/tests/hk2/cdi/ear/ejb1/pom.xml | 109 - .../oracle/hk2/devtest/cdi/ear/ejb1/Ejb1.java | 72 - .../devtest/cdi/ear/ejb1/Ejb1HK2Service.java | 50 - .../cdi/ear/ejb1/Ejb1HK2ServiceFactory.java | 72 - .../hk2/devtest/cdi/ear/ejb1/Ejb1Remote.java | 51 - .../src/main/resources/META-INF/beans.xml | 4 - appserver/tests/hk2/cdi/ear/ejb2/pom.xml | 108 - .../oracle/hk2/devtest/cdi/ear/ejb2/Ejb2.java | 80 - .../devtest/cdi/ear/ejb2/Ejb2HK2Service.java | 53 - .../cdi/ear/ejb2/Ejb2HK2ServiceFactory.java | 77 - .../hk2/devtest/cdi/ear/ejb2/Ejb2Remote.java | 53 - .../src/main/resources/META-INF/beans.xml | 4 - appserver/tests/hk2/cdi/ear/lib1/pom.xml | 90 - .../hk2/devtest/cdi/ear/lib1/HK2Service.java | 58 - .../oracle/hk2/devtest/cdi/ear/lib1/Lib1.java | 48 - .../devtest/cdi/ear/lib1/Lib1HK2Service.java | 51 - .../cdi/ear/lib1/Lib1Hk2ServiceFactory.java | 76 - appserver/tests/hk2/cdi/ear/pom.xml | 67 - appserver/tests/hk2/cdi/ear/runner/pom.xml | 121 - .../java/com/oracle/hk2/devtest/Dummy.java | 43 - .../devtest/cdi/ear/runner/CDIEarTest.java | 180 -- appserver/tests/hk2/cdi/ear/war1/pom.xml | 114 - .../oracle/hk2/devtest/cdi/ear/war1/War1.java | 109 - .../devtest/cdi/ear/war1/War1HK2Service.java | 50 - .../cdi/ear/war1/War1HK2ServiceFactory.java | 72 - .../war1/src/main/webapp/WEB-INF/beans.xml | 4 - .../ear/war1/src/main/webapp/WEB-INF/web.xml | 59 - appserver/tests/hk2/cdi/ear/war2/pom.xml | 120 - .../oracle/hk2/devtest/cdi/ear/war2/War2.java | 117 - .../devtest/cdi/ear/war2/War2HK2Service.java | 50 - .../cdi/ear/war2/War2HK2ServiceFactory.java | 71 - .../war2/src/main/webapp/WEB-INF/beans.xml | 4 - .../ear/war2/src/main/webapp/WEB-INF/web.xml | 59 - appserver/tests/hk2/cdi/jersey/pom.xml | 62 - appserver/tests/hk2/cdi/jersey/runner/pom.xml | 101 - .../java/com/oracle/hk2/devtest/Dummy.java | 43 - .../samples/jersey_cdi/test/JerseyTest.java | 96 - .../tests/hk2/cdi/jersey/war/README.html | 126 - .../hk2/cdi/jersey/war/nb-configuration.xml | 18 - appserver/tests/hk2/cdi/jersey/war/pom.xml | 159 -- .../war/src/main/assembly/glassfish.xml | 64 - .../cdi/jersey/war/src/main/assembly/src.xml | 59 - .../EchoParamConstructorResource.java | 75 - .../resources/EchoParamFieldResource.java | 80 - .../resources/EchoParamResource.java | 63 - .../jersey_cdi/resources/FormBean.java | 70 - .../jersey_cdi/resources/FormResource.java | 69 - .../resources/HelloWorldResource.java | 62 - .../JCDIBeanDependentExceptionMapper.java | 96 - .../JCDIBeanDependentPerRequestResource.java | 109 - .../JCDIBeanDependentSingletonResource.java | 116 - .../resources/JCDIBeanExceptionMapper.java | 90 - .../resources/JCDIBeanPerRequestResource.java | 109 - .../resources/JCDIBeanSingletonResource.java | 114 - .../resources/JDCIBeanDependentException.java | 48 - .../resources/JDCIBeanException.java | 48 - .../jersey_cdi/resources/JerseyResolver.java | 68 - .../jersey_cdi/resources/MyApplication.java | 83 - .../jersey_cdi/resources/MyOtherResource.java | 73 - .../resources/MySimpleResource.java | 68 - .../resources/inherited/BaseResource.java | 72 - .../resources/inherited/ResourceA.java | 52 - .../resources/inherited/ResourceB.java | 53 - .../resources/inherited/ResourceC.java | 53 - .../war/src/main/webapp/WEB-INF/beans.xml | 2 - .../src/main/webapp/WEB-INF/glassfish-web.xml | 52 - .../war/src/main/webapp/WEB-INF/web.xml | 63 - appserver/tests/hk2/cdi/pom.xml | 62 - appserver/tests/hk2/isolation/pom.xml | 64 - appserver/tests/hk2/isolation/runner/pom.xml | 101 - .../devtest/isolation/runner/dummy/Dummy.java | 49 - .../isolation/runner/IsolationTest.java | 159 -- .../tests/hk2/isolation/web/iso1/pom.xml | 83 - .../isolation/web/iso1/Iso1Servlet.java | 120 - .../web/iso1/src/main/webapp/WEB-INF/web.xml | 59 - .../tests/hk2/isolation/web/iso2/pom.xml | 83 - .../isolation/web/iso2/Iso2Servlet.java | 118 - .../web/iso2/src/main/webapp/WEB-INF/web.xml | 59 - appserver/tests/hk2/isolation/web/pom.xml | 64 - appserver/tests/hk2/pom.xml | 62 - appserver/tests/jbi/README | 7 - .../bc_consumer_se_provider/README | 11 - .../bc_consumer_se_provider/build.properties | 51 - .../bc_consumer_se_provider/build.xml | 150 - .../client/SOAPWebConsumer.java | 92 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 57 - .../endpoint/Calculator.java | 65 - .../assembly/META-INF/jbi.xml | 67 - .../su/CalculatorService.wsdl | 85 - .../su/CalculatorService_schema1.xsd | 58 - .../su/META-INF/jbi.xml | 57 - .../soap-binding-su-alaska/su/endpoints.xml | 46 - .../bc_consumer_se_provider/web.xml | 71 - .../tests/jbi/bare_doc_literal/build.xml | 53 - .../se_consumer_se_provider/README | 11 - .../se_consumer_se_provider/build.properties | 54 - .../se_consumer_se_provider/build.xml | 172 -- .../se_consumer_se_provider/client-jbi.xml | 48 - .../client-sun-web.xml | 48 - .../se_consumer_se_provider/client-web.xml | 65 - .../client/TestClient.java | 116 - .../common/IncomeTaxDetails.java | 50 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 48 - .../endpoint/Calculator.java | 71 - .../se_consumer_se_provider/sun-web.xml | 48 - .../se_consumer_se_provider/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../webclient/client/Client.java | 112 - appserver/tests/jbi/build.xml | 86 - appserver/tests/jbi/client/build.xml | 53 - .../tests/jbi/client/web/build.properties | 50 - appserver/tests/jbi/client/web/build.xml | 171 -- appserver/tests/jbi/client/web/client-jbi.xml | 56 - .../tests/jbi/client/web/client-sun-web.xml | 48 - appserver/tests/jbi/client/web/client-web.xml | 65 - .../jbi/client/web/client/TestClient.java | 123 - .../jbi/client/web/endpoint/Calculator.java | 61 - .../assembly/META-INF/jbi.xml | 67 - .../su/CalculatorService.wsdl | 78 - .../su/CalculatorService_schema1.xsd | 63 - .../su/META-INF/jbi.xml | 56 - .../soap-binding-su-alaska/su/endpoints.xml | 46 - .../soap-binding-su/assembly/META-INF/jbi.xml | 67 - .../web/soap-binding-su/su/META-INF/jbi.xml | 55 - .../web/soap-binding-su/su/endpoints.xml | 66 - appserver/tests/jbi/client/web/sun-web.xml | 48 - appserver/tests/jbi/client/web/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../web/webclient/assembly/META-INF/jbi.xml | 66 - .../client/web/webclient/client/Client.java | 87 - appserver/tests/jbi/config/common.properties | 55 - appserver/tests/jbi/config/common.xml | 189 -- .../tests/jbi/config/init-common.properties | 44 - appserver/tests/jbi/config/j2eeReporter.xsl | 404 --- appserver/tests/jbi/config/jaxwstools.xml | 141 - appserver/tests/jbi/config/report.xml | 64 - appserver/tests/jbi/config/resultCount.sh | 73 - appserver/tests/jbi/lib/reporter.jar | Bin 27376 -> 0 bytes .../bundled-wsdl/README | 11 - .../bundled-wsdl/build.properties | 51 - .../bundled-wsdl/build.xml | 161 -- .../bundled-wsdl/client/SOAPWebConsumer.java | 161 -- .../bundled-wsdl/common/IncomeTaxDetails.java | 50 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 57 - .../bundled-wsdl/endpoint/Calculator.java | 108 - .../assembly/META-INF/jbi.xml | 67 - .../su/CalculatorService.wsdl | 163 -- .../su/CalculatorService_schema1.xsd | 104 - .../su/META-INF/jbi.xml | 57 - .../soap-binding-su-alaska/su/endpoints.xml | 46 - .../bundled-wsdl/web.xml | 71 - .../bundled-wsdl/wsdl/CalculatorService.wsdl | 163 -- .../wsdl/CalculatorService_schema1.xsd | 103 - .../wsdl-import/README | 11 - .../wsdl-import/build.properties | 51 - .../wsdl-import/build.xml | 163 -- .../wsdl-import/client/SOAPWebConsumer.java | 161 -- .../wsdl-import/common/IncomeTaxDetails.java | 50 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 57 - .../wsdl-import/endpoint/Calculator.java | 108 - .../assembly/META-INF/jbi.xml | 67 - .../su/CalculatorService.wsdl | 163 -- .../su/CalculatorService_schema1.xsd | 104 - .../sun-http-binding/su/META-INF/jbi.xml | 57 - .../sun-http-binding/su/endpoints.xml | 46 - .../wsdl-import/web.xml | 71 - .../wsdl-import/wsdl/CalculatorService.wsdl | 125 - .../wsdl/CalculatorService_schema1.xsd | 103 - .../wsdl-import/wsdl/MessageTypes.wsdl | 84 - appserver/tests/jbi/rpc_literal/build.xml | 55 - .../bundled_wsdl/README | 11 - .../bundled_wsdl/build.properties | 51 - .../bundled_wsdl/build.xml | 171 -- .../bundled_wsdl/client-jbi.xml | 55 - .../bundled_wsdl/client-sun-web.xml | 48 - .../bundled_wsdl/client-web.xml | 65 - .../bundled_wsdl/client/TestClient.java | 117 - .../bundled_wsdl/common/IncomeTaxDetails.java | 50 - .../bundled_wsdl/endpoint/Calculator.java | 106 - .../assembly/META-INF/jbi.xml | 66 - .../javaee-se-serviceunit/su/META-INF/jbi.xml | 55 - .../bundled_wsdl/sun-web.xml | 49 - .../bundled_wsdl/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../bundled_wsdl/webclient/client/Client.java | 156 - .../bundled_wsdl/wsdl/CalculatorService.wsdl | 163 -- .../wsdl/CalculatorService_schema1.xsd | 103 - .../generated_wsdl/README | 11 - .../generated_wsdl/build.properties | 54 - .../generated_wsdl/build.xml | 172 -- .../generated_wsdl/client-jbi.xml | 48 - .../generated_wsdl/client-sun-web.xml | 48 - .../generated_wsdl/client-web.xml | 65 - .../generated_wsdl/client/TestClient.java | 116 - .../common/IncomeTaxDetails.java | 50 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 48 - .../generated_wsdl/endpoint/Calculator.java | 103 - .../generated_wsdl/sun-web.xml | 48 - .../generated_wsdl/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../webclient/client/Client.java | 156 - appserver/tests/jbi/security/README | 1 - appserver/tests/jbi/security/build.xml | 52 - .../security/jse_only/META-INF/MANIFEST.MF | 4 - .../jbi/security/jse_only/META-INF/jbi.xml | 55 - appserver/tests/jbi/security/jse_only/README | 12 - .../jbi/security/jse_only/build.properties | 54 - .../tests/jbi/security/jse_only/build.xml | 171 -- .../jbi/security/jse_only/client-jbi.xml | 48 - .../jbi/security/jse_only/client-sun-web.xml | 52 - .../jbi/security/jse_only/client-web.xml | 96 - .../security/jse_only/client/TestClient.java | 126 - .../security/jse_only/endpoint/ejb/Hello.java | 49 - .../jse_only/endpoint/ejb/HelloEJB.java | 63 - .../assembly/META-INF/jbi.xml | 66 - .../javaee-se-serviceunit/su/META-INF/jbi.xml | 48 - .../tests/jbi/security/jse_only/sun-web.xml | 48 - appserver/tests/jbi/security/jse_only/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../jse_only/webclient/client/Client.java | 89 - .../tests/jbi/service_unit/add-numbers/README | 28 - .../service_unit/add-numbers/RepRunConf.txt | 42 - .../service_unit/add-numbers/build.properties | 51 - .../jbi/service_unit/add-numbers/build.xml | 178 -- .../add-numbers/client-sun-web.xml | 48 - .../service_unit/add-numbers/client-web.xml | 65 - .../add-numbers/client/TestClient.java | 116 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 55 - .../add-numbers/endpoint/AddNumber.java | 62 - .../assembly/META-INF/jbi.xml | 66 - .../javaee-se-serviceunit/su/META-INF/jbi.xml | 55 - .../jbi/service_unit/add-numbers/sun-web.xml | 48 - .../jbi/service_unit/add-numbers/web.xml | 71 - .../add-numbers/webclient/client/Client.java | 111 - appserver/tests/jbi/service_unit/build.xml | 65 - .../jbi/service_unit/compApp-client/README | 26 - .../compApp-client/build.properties | 48 - .../jbi/service_unit/compApp-client/build.xml | 157 - .../compApp-client/client-sun-web.xml | 48 - .../compApp-client/client-web.xml | 65 - .../compApp-client/client/TestClient.java | 123 - .../compApp-client/endpoint/Calculator.java | 61 - .../jbi/service_unit/compApp-client/jbi.xml | 55 - .../soap-binding-su/assembly/META-INF/jbi.xml | 77 - .../soap-binding-su/su/CalculatorService.wsdl | 78 - .../su/CalculatorService_schema1.xsd | 63 - .../soap-binding-su/su/META-INF/jbi.xml | 56 - .../soap-binding-su/su/endpoints.xml | 46 - .../service_unit/compApp-client/sun-web.xml | 48 - .../jbi/service_unit/compApp-client/web.xml | 71 - .../webclient/client/Client.java | 88 - .../jbi/service_unit/compApp-server/README | 9 - .../compApp-server/build.properties | 53 - .../jbi/service_unit/compApp-server/build.xml | 151 - .../client/SOAPWebConsumer.java | 85 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 57 - .../compApp-server/endpoint/Calculator.java | 61 - .../jbi/service_unit/compApp-server/jbi.xml | 56 - .../assembly/META-INF/MANIFEST.MF | 2 - .../soap-binding-su/assembly/META-INF/jbi.xml | 67 - .../soap-binding-su/su/CalculatorService.wsdl | 80 - .../su/CalculatorService_schema1.xsd | 63 - .../soap-binding-su/su/META-INF/jbi.xml | 57 - .../soap-binding-su/su/endpoints.xml | 46 - .../jbi/service_unit/compApp-server/web.xml | 71 - .../jbi/service_unit/endpoint_mapping/README | 28 - .../endpoint_mapping/RepRunConf.txt | 41 - .../endpoint_mapping/build.properties | 51 - .../service_unit/endpoint_mapping/build.xml | 185 -- .../endpoint_mapping/client-sun-web.xml | 48 - .../endpoint_mapping/client-web.xml | 65 - .../endpoint_mapping/client/TestClient.java | 116 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 53 - .../endpoint/EndpointMapping.java | 62 - .../assembly/META-INF/jbi.xml | 76 - .../javaee-se-serviceunit/su/META-INF/jbi.xml | 54 - .../service_unit/endpoint_mapping/sun-web.xml | 48 - .../jbi/service_unit/endpoint_mapping/web.xml | 71 - .../webclient/client/Client.java | 110 - .../endpoint_mapping_consumer/RepRunConf.txt | 41 - .../build.properties | 48 - .../endpoint_mapping_consumer/build.xml | 158 -- .../client-sun-web.xml | 48 - .../endpoint_mapping_consumer/client-web.xml | 65 - .../client/TestClient.java | 123 - .../endpoint/EndpointMappingConsumer.java | 61 - .../endpoint_mapping_consumer/jbi.xml | 62 - .../assembly/META-INF/jbi.xml | 86 - .../su/EndpointMappingConsumerService.wsdl | 78 - ...EndpointMappingConsumerService_schema1.xsd | 63 - .../sun-http-binding/su/META-INF/jbi.xml | 56 - .../sun-http-binding/su/endpoints.xml | 46 - .../endpoint_mapping_consumer/sun-web.xml | 48 - .../endpoint_mapping_consumer/web.xml | 71 - .../webclient/client/Client.java | 86 - .../wsdl/EndpointMappingConsumerService.wsdl | 78 - ...EndpointMappingConsumerService_schema1.xsd | 63 - .../EnpointMappingConsumerService_schema1.xsd | 63 - appserver/tests/jbi/soapfault/README | 3 - appserver/tests/jbi/soapfault/build.xml | 55 - .../tests/jbi/soapfault/se_consumer/README | 23 - .../soapfault/se_consumer/build.properties | 50 - .../tests/jbi/soapfault/se_consumer/build.xml | 171 -- .../jbi/soapfault/se_consumer/client-jbi.xml | 55 - .../soapfault/se_consumer/client-sun-web.xml | 48 - .../jbi/soapfault/se_consumer/client-web.xml | 65 - .../se_consumer/client/TestClient.java | 117 - .../se_consumer/endpoint/Calculator.java | 62 - .../assembly/META-INF/jbi.xml | 67 - .../su/CalculatorService.wsdl | 85 - .../su/CalculatorService_schema1.xsd | 71 - .../su/META-INF/jbi.xml | 56 - .../soap-binding-su-alaska/su/endpoints.xml | 46 - .../jbi/soapfault/se_consumer/sun-web.xml | 48 - .../tests/jbi/soapfault/se_consumer/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../se_consumer/webclient/client/Client.java | 112 - .../jbi/soapfault/se_consumerNprovider/README | 23 - .../se_consumerNprovider/build.properties | 50 - .../soapfault/se_consumerNprovider/build.xml | 171 -- .../se_consumerNprovider/client-jbi.xml | 55 - .../se_consumerNprovider/client-sun-web.xml | 48 - .../se_consumerNprovider/client-web.xml | 65 - .../client/TestClient.java | 117 - .../endpoint/Calculator.java | 72 - .../assembly/META-INF/jbi.xml | 67 - .../su/CalculatorService.wsdl | 85 - .../su/CalculatorService_schema1.xsd | 71 - .../su/META-INF/jbi.xml | 56 - .../soap-binding-su-alaska/su/endpoints.xml | 46 - .../se_consumerNprovider/sun-web.xml | 48 - .../soapfault/se_consumerNprovider/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../webclient/client/Client.java | 110 - .../tests/jbi/soapfault/se_provider/README | 17 - .../soapfault/se_provider/build.properties | 50 - .../tests/jbi/soapfault/se_provider/build.xml | 150 - .../se_provider/client/SOAPWebConsumer.java | 105 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 57 - .../se_provider/endpoint/Calculator.java | 69 - .../assembly/META-INF/jbi.xml | 67 - .../su/CalculatorService.wsdl | 126 - .../su/CalculatorService_schema1.xsd | 86 - .../su/META-INF/jbi.xml | 57 - .../soap-binding-su-alaska/su/endpoints.xml | 46 - .../tests/jbi/soapfault/se_provider/web.xml | 71 - appserver/tests/jbi/transactions/README | 10 - appserver/tests/jbi/transactions/build.xml | 56 - .../tests/jbi/transactions/jse_only/README | 1 - .../transactions/jse_only/build.properties | 50 - .../tests/jbi/transactions/jse_only/build.xml | 168 -- .../jbi/transactions/jse_only/client-jbi.xml | 56 - .../transactions/jse_only/client-sun-web.xml | 48 - .../jbi/transactions/jse_only/client-web.xml | 65 - .../jse_only/client/TestClient.java | 124 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 56 - .../jse_only/endpoint/Calculator.java | 64 - .../jbi/transactions/jse_only/sun-web.xml | 48 - .../tests/jbi/transactions/jse_only/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../jse_only/webclient/client/Client.java | 99 - .../transactions/jse_only_ejbcommit/README | 12 - .../jse_only_ejbcommit/build.properties | 50 - .../transactions/jse_only_ejbcommit/build.xml | 171 -- .../jse_only_ejbcommit/client-jbi.xml | 48 - .../jse_only_ejbcommit/client-sun-web.xml | 48 - .../jse_only_ejbcommit/client-web.xml | 73 - .../jse_only_ejbcommit/client/TestClient.java | 124 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 55 - .../endpoint/ejb/Hello.java | 50 - .../endpoint/ejb/HelloEJB.java | 98 - .../jse_only_ejbcommit/sun-web.xml | 48 - .../transactions/jse_only_ejbcommit/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../webclient/client/Client.java | 149 - .../transactions/jse_only_ejbcommit1/README | 13 - .../jse_only_ejbcommit1/build.properties | 50 - .../jse_only_ejbcommit1/build.xml | 171 -- .../jse_only_ejbcommit1/client-jbi.xml | 48 - .../jse_only_ejbcommit1/client-sun-web.xml | 48 - .../jse_only_ejbcommit1/client-web.xml | 73 - .../client/TestClient.java | 124 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 55 - .../endpoint/ejb/Hello.java | 50 - .../endpoint/ejb/HelloEJB.java | 101 - .../jse_only_ejbcommit1/sun-web.xml | 48 - .../transactions/jse_only_ejbcommit1/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../webclient/client/Client.java | 162 -- .../transactions/jse_only_ejbrollback/README | 14 - .../jse_only_ejbrollback/build.properties | 50 - .../jse_only_ejbrollback/build.xml | 171 -- .../jse_only_ejbrollback/client-jbi.xml | 48 - .../jse_only_ejbrollback/client-sun-web.xml | 48 - .../jse_only_ejbrollback/client-web.xml | 73 - .../client/TestClient.java | 123 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 55 - .../endpoint/ejb/Hello.java | 50 - .../endpoint/ejb/HelloEJB.java | 98 - .../jse_only_ejbrollback/sun-web.xml | 48 - .../transactions/jse_only_ejbrollback/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../webclient/client/Client.java | 145 - .../transactions/jse_only_ejbrollback1/README | 13 - .../jse_only_ejbrollback1/build.properties | 50 - .../jse_only_ejbrollback1/build.xml | 171 -- .../jse_only_ejbrollback1/client-jbi.xml | 48 - .../jse_only_ejbrollback1/client-sun-web.xml | 48 - .../jse_only_ejbrollback1/client-web.xml | 73 - .../client/TestClient.java | 124 - .../assembly/META-INF/MANIFEST.MF | 6 - .../dummy-client-su/assembly/META-INF/jbi.xml | 66 - .../dummy-client-su/su/META-INF/MANIFEST.MF | 9 - .../dummy-client-su/su/META-INF/jbi.xml | 55 - .../endpoint/ejb/Hello.java | 50 - .../endpoint/ejb/HelloEJB.java | 101 - .../jse_only_ejbrollback1/sun-web.xml | 48 - .../jse_only_ejbrollback1/web.xml | 71 - .../webclient/assembly/META-INF/MANIFEST.MF | 6 - .../webclient/assembly/META-INF/jbi.xml | 66 - .../webclient/client/Client.java | 162 -- appserver/tests/logmonitor/Filter.java | 273 -- appserver/tests/logmonitor/README | 67 - appserver/tests/logmonitor/build.xml | 81 - .../tests/logmonitor/message-key-excl.txt | 88 - .../logmonitor/message-keys-used-checker.rb | 135 - .../tests/logmonitor/missing-msg-id-finder.rb | 144 - appserver/tests/osgi-javaee/osgi-web/README | 11 - appserver/tests/osgi-javaee/osgi-web/TODO | 44 - .../tests/osgi-javaee/osgi-web/build.xml | 92 - .../osgi-web/common/BundleUtil.java | 145 - .../osgi-javaee/osgi-web/common/Reporter.java | 158 -- .../osgi-web/common/TestClient.java | 118 - .../osgi-web/config/bundle_common.xml | 80 - .../osgi-web/config/common.properties | 56 - .../osgi-javaee/osgi-web/config/common.xml | 194 -- .../osgi-web/framework-controller/MANIFEST.MF | 5 - .../osgi-web/framework-controller/README | 1 - .../framework-controller/build.properties | 42 - .../osgi-web/framework-controller/build.xml | 99 - .../src/META-INF/MANIFEST.MF | 4 - .../src/WEB-INF/sun-web.xml | 53 - .../framework-controller/src/WEB-INF/web.xml | 62 - .../framework-controller/src/index.jsp | 80 - .../framework-controller/src/install.jsp | 66 - .../src/main/java/test/BundleController.java | 107 - .../src/main/java/test/BundleInstaller.java | 91 - .../src/main/java/test/BundleUninstaller.java | 99 - .../src/main/java/test/BundleViewer.java | 117 - .../framework-controller/src/uninstall.jsp | 66 - .../osgi-web/hybridapp1/build.properties | 42 - .../osgi-javaee/osgi-web/hybridapp1/build.xml | 94 - .../osgi-javaee/osgi-web/hybridapp1/pom.xml | 131 - .../hybridapp/example1/UserAuthService.java | 50 - .../hybridapp/example1/impl/Activator.java | 128 - .../hybridapp/example1/impl/LoginServlet.java | 85 - .../example1/impl/RegistrationServlet.java | 85 - .../example1/impl/UserAuthServiceEJB.java | 135 - .../src/main/webapp/WEB-INF/web.xml | 49 - .../hybridapp1/src/main/webapp/index.html | 57 - .../hybridapp1/src/main/webapp/login.html | 59 - .../src/main/webapp/registration.html | 59 - .../osgi-javaee/osgi-web/test1/MANIFEST.MF | 5 - .../tests/osgi-javaee/osgi-web/test1/README | 8 - .../osgi-web/test1/build.properties | 42 - .../osgi-javaee/osgi-web/test1/build.xml | 99 - .../osgi-web/test1/src/WEB-INF/sun-web.xml | 53 - .../osgi-web/test1/src/WEB-INF/web.xml | 53 - .../osgi-javaee/osgi-web/test1/src/index.html | 57 - .../osgi-javaee/osgi-web/test2/MANIFEST.MF | 5 - .../tests/osgi-javaee/osgi-web/test2/README | 1 - .../osgi-web/test2/build.properties | 42 - .../osgi-javaee/osgi-web/test2/build.xml | 99 - .../osgi-web/test2/src/META-INF/MANIFEST.MF | 3 - .../osgi-web/test2/src/WEB-INF/web.xml | 68 - .../osgi-javaee/osgi-web/test2/src/login.html | 59 - .../src/main/java/example/LoginServlet.java | 51 - .../java/example/RegistrationServlet.java | 51 - .../osgi-web/test2/src/registration.html | 59 - .../osgi-javaee/osgi-web/test4/MANIFEST.MF | 5 - .../tests/osgi-javaee/osgi-web/test4/README | 2 - .../osgi-web/test4/build.properties | 42 - .../osgi-javaee/osgi-web/test4/build.xml | 99 - .../osgi-web/test4/src/META-INF/MANIFEST.MF | 10 - .../WEB-INF/classes/LocalStrings.properties | 43 - .../osgi-web/test4/src/WEB-INF/sun-web.xml | 47 - .../osgi-web/test4/src/WEB-INF/web.xml | 47 - .../osgi-web/test4/src/images/duke.waving.gif | Bin 1305 -> 0 bytes .../osgi-javaee/osgi-web/test4/src/index.jsp | 68 - .../osgi-web/test4/src/response.jsp | 74 - .../osgi-web/test6/META-INF/MANIFEST.MF | 7 - .../tests/osgi-javaee/osgi-web/test6/README | 1 - .../osgi-web/test6/WEB-INF/web.xml | 65 - .../osgi-web/test6/build.properties | 42 - .../osgi-javaee/osgi-web/test6/build.xml | 96 - .../osgi-javaee/osgi-web/test6/login.html | 59 - .../osgi-web/test6/registration.html | 59 - .../src/main/java/example/LoginServlet.java | 51 - .../java/example/RegistrationServlet.java | 51 - .../osgi-javaee/osgi-web/test7/MANIFEST.MF | 4 - .../tests/osgi-javaee/osgi-web/test7/README | 1 - .../osgi-web/test7/build.properties | 42 - .../osgi-javaee/osgi-web/test7/build.xml | 99 - .../osgi-web/test7/src/META-INF/MANIFEST.MF | 3 - .../osgi-web/test7/src/WEB-INF/web.xml | 52 - .../osgi-javaee/osgi-web/test7/src/index.html | 51 - appserver/tests/paas/README.txt | 85 - .../README.txt | 47 - .../appscoped-db-with-resources-xml/pom.xml | 104 - .../CoffeeServlet.java | 155 - .../webapp/WEB-INF/glassfish-resources.xml | 55 - .../webapp/WEB-INF/glassfish-services.xml | 61 - .../src/main/webapp/WEB-INF/init.sql | 49 - .../src/main/webapp/WEB-INF/sun-web.xml | 45 - .../src/main/webapp/WEB-INF/web.xml | 63 - .../src/main/webapp/images/Coffee.jpg | Bin 46270 -> 0 bytes .../src/main/webapp/index.html | 48 - .../CoffeeTest.java | 191 -- .../.settings/org.eclipse.jdt.core.prefs | 5 - .../Kkey-glassfish.+157+05094.key | 1 - .../Kkey-glassfish.+157+05094.private | 3 - .../tests/paas/basic-bookstore-dns/README.txt | 44 - .../basic-bookstore-dns/basic_paas_sample.war | Bin 11377 -> 0 bytes .../paas/basic-bookstore-dns/bookstore.war | Bin 26391 -> 0 bytes .../tests/paas/basic-bookstore-dns/pom.xml | 109 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/sun-web.xml | 45 - .../src/main/webapp/WEB-INF/web.xml | 59 - .../src/main/webapp/index.html | 48 - .../paas/dns/BasicbookstoreDnsPaasTest.java | 315 --- .../tests/paas/basic-db-initsql/README.txt | 43 - .../tests/paas/basic-db-initsql/initsql.sql | 10 - appserver/tests/paas/basic-db-initsql/pom.xml | 121 - .../basicdbinitsql/BasicDBInitSqlServlet.java | 149 - .../webapp/WEB-INF/glassfish-services.xml | 63 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../src/main/webapp/WEB-INF/web.xml | 67 - .../src/main/webapp/index.html | 48 - .../basicdbinitsql/BasicDBInitSqlTest.java | 393 --- .../paas/basic-db-teardown-sql/README.txt | 47 - .../tests/paas/basic-db-teardown-sql/pom.xml | 104 - .../basicdbteardownsql/CoffeeServlet.java | 155 - .../DbConnectionDetailsServlet.java | 107 - .../webapp/WEB-INF/glassfish-resources.xml | 54 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/init.sql | 49 - .../src/main/webapp/WEB-INF/sun-web.xml | 45 - .../src/main/webapp/WEB-INF/teardown.sql | 40 - .../src/main/webapp/WEB-INF/web.xml | 71 - .../src/main/webapp/images/Coffee.jpg | Bin 46270 -> 0 bytes .../src/main/webapp/index.html | 48 - .../paas/basicdbteardownsql/CoffeeTest.java | 253 -- .../basic-db-with-resources-xml/README.txt | 47 - .../paas/basic-db-with-resources-xml/pom.xml | 104 - .../CoffeeServlet.java | 155 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/init.sql | 49 - .../main/webapp/WEB-INF/payara-resources.xml | 55 - .../src/main/webapp/WEB-INF/sun-web.xml | 45 - .../src/main/webapp/WEB-INF/web.xml | 63 - .../src/main/webapp/images/Coffee.jpg | Bin 46270 -> 0 bytes .../src/main/webapp/index.html | 48 - .../basicdbwithresourcesxml/CoffeeTest.java | 211 -- appserver/tests/paas/basic-db/README.txt | 43 - appserver/tests/paas/basic-db/pom.xml | 104 - .../paas/basicdb/BasicDBPaaSServlet.java | 145 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../basic-db/src/main/webapp/WEB-INF/web.xml | 67 - .../paas/basic-db/src/main/webapp/index.html | 48 - .../tests/paas/basicdb/BasicDBPaaSTest.java | 207 -- appserver/tests/paas/basic-jpa/README.txt | 45 - appserver/tests/paas/basic-jpa/pom.xml | 114 - .../glassfish/tests/paas/basicjpa/Animal.java | 117 - .../paas/basicjpa/BasicJPAPaaSServlet.java | 216 -- .../src/main/webapp/META-INF/MANIFEST.MF | 2 - .../WEB-INF/classes/META-INF/persistence.xml | 10 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/sun-web.xml | 10 - .../basic-jpa/src/main/webapp/WEB-INF/web.xml | 32 - .../paas/basic-jpa/src/main/webapp/index.jsp | 22 - .../paas/basic-jpa/src/main/webapp/newcss.css | 47 - .../tests/paas/basicjpa/BasicJPAPaaSTest.java | 204 -- .../paas/basic-service-discovery/README.txt | 48 - .../paas/basic-service-discovery/pom.xml | 104 - .../paas/basicsd/BasicSDPaaSServlet.java | 145 - .../webapp/WEB-INF/glassfish-services.xml | 62 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../src/main/webapp/WEB-INF/web.xml | 67 - .../src/main/webapp/index.html | 48 - .../BasicServiceDiscoveryPaaSTest.java | 352 --- .../paas/basic-shared-service-test/README.txt | 52 - .../paas/basic-shared-service-test/pom.xml | 114 - .../glassfish/tests/paas/basicjpa/Animal.java | 113 - .../paas/basicjpa/BasicJPAPaaSServlet.java | 192 -- .../src/main/webapp/META-INF/MANIFEST.MF | 2 - .../WEB-INF/classes/META-INF/persistence.xml | 10 - .../webapp/WEB-INF/glassfish-services.xml | 51 - .../src/main/webapp/WEB-INF/sun-web.xml | 10 - .../src/main/webapp/WEB-INF/web.xml | 32 - .../src/main/webapp/index.jsp | 22 - .../src/main/webapp/newcss.css | 47 - .../paas/basicjpa/BasicSharedServiceTest.java | 500 ---- appserver/tests/paas/basic/README.txt | 43 - appserver/tests/paas/basic/native_setup.sh | 47 - appserver/tests/paas/basic/pom.xml | 104 - .../tests/paas/basic/BasicPaaSServlet.java | 144 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../basic/src/main/webapp/WEB-INF/sun-web.xml | 45 - .../basic/src/main/webapp/WEB-INF/web.xml | 59 - .../paas/basic/src/main/webapp/index.html | 48 - .../tests/paas/basic/BasicPaaSTest.java | 213 -- appserver/tests/paas/bookstore/README.txt | 44 - appserver/tests/paas/bookstore/pom.xml | 104 - .../tests/paas/basic/BookStoreServlet.java | 159 -- .../tests/paas/basic/DatabaseOperations.java | 316 --- .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../bookstore/src/main/webapp/WEB-INF/web.xml | 67 - .../src/main/webapp/images/bookstore.gif | Bin 9948 -> 0 bytes .../paas/bookstore/src/main/webapp/index.html | 48 - .../tests/paas/basic/BookStoreTest.java | 208 -- .../tests/paas/deployment-rollback/README.txt | 46 - .../paas/deployment-rollback/initsql.sql | 10 - .../tests/paas/deployment-rollback/pom.xml | 104 - .../rollbacktest/RollbackTestServlet.java | 145 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../src/main/webapp/WEB-INF/web.xml | 67 - .../src/main/webapp/index.html | 48 - .../tests/paas/rollbacktest/RollbackTest.java | 255 -- .../tests/paas/enable-disable-test/README.txt | 43 - .../paas/enable-disable-test/initsql.sql | 10 - .../tests/paas/enable-disable-test/pom.xml | 121 - .../EnableDisableServlet.java | 149 - .../webapp/WEB-INF/glassfish-services.xml | 63 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../src/main/webapp/WEB-INF/web.xml | 63 - .../src/main/webapp/index.html | 48 - .../EnableDisableTest.java | 276 -- .../README.txt | 53 - .../pom.xml | 114 - .../tests/paas/enabledisable/Animal.java | 113 - .../ExtSharedServiceEnableDisableServlet.java | 187 -- .../src/main/webapp/META-INF/MANIFEST.MF | 2 - .../WEB-INF/classes/META-INF/persistence.xml | 10 - .../webapp/WEB-INF/glassfish-services.xml | 59 - .../src/main/webapp/WEB-INF/sun-web.xml | 10 - .../src/main/webapp/WEB-INF/web.xml | 32 - .../src/main/webapp/index.jsp | 22 - .../src/main/webapp/newcss.css | 47 - .../ExtSharedServiceEnableDisableTest.java | 505 ---- .../external-and-shared-service/README.txt | 56 - .../paas/external-and-shared-service/pom.xml | 114 - .../external_and_shared_service/Animal.java | 113 - .../ExternalAndSharedServiceTestServlet.java | 192 -- .../src/main/webapp/META-INF/MANIFEST.MF | 2 - .../WEB-INF/classes/META-INF/persistence.xml | 10 - .../webapp/WEB-INF/glassfish-services.xml | 57 - .../src/main/webapp/WEB-INF/sun-web.xml | 10 - .../src/main/webapp/WEB-INF/web.xml | 32 - .../src/main/webapp/index.jsp | 22 - .../src/main/webapp/newcss.css | 47 - .../SharedAndExternalServiceTest.java | 424 --- .../tests/paas/external-db-service/README.txt | 48 - .../generatederbyvm/osgi.bundle | 44 - .../generatederbyvm/pom.xml | 94 - .../generatederbyvm/CreateDerbyVM.java | 168 -- .../generatederbyvm/DeleteDerbyVM.java | 84 - .../tests/paas/external-db-service/pom.xml | 54 - .../paas/external-db-service/test/pom.xml | 104 - .../externaldbservicetest/CoffeeServlet.java | 155 - .../webapp/WEB-INF/glassfish-resources.xml | 55 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../test/src/main/webapp/WEB-INF/init.sql | 47 - .../test/src/main/webapp/WEB-INF/sun-web.xml | 45 - .../test/src/main/webapp/WEB-INF/web.xml | 63 - .../test/src/main/webapp/images/Coffee.jpg | Bin 46270 -> 0 bytes .../test/src/main/webapp/index.html | 48 - .../externaldbservicetest/CoffeeTest.java | 227 -- appserver/tests/paas/helloworld/README.txt | 52 - appserver/tests/paas/helloworld/pom.xml | 98 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/sun-web.xml | 45 - .../src/main/webapp/WEB-INF/web.xml | 47 - .../paas/helloworld/src/main/webapp/hi.jsp | 54 - .../tests/paas/helloworld/HelloWorldTest.java | 219 -- .../paas/javaee_shared_service/README.txt | 46 - .../tests/paas/javaee_shared_service/pom.xml | 104 - .../BookStoreServlet.java | 158 -- .../DatabaseOperations.java | 316 --- .../webapp/WEB-INF/glassfish-services.xml | 45 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../src/main/webapp/WEB-INF/web.xml | 67 - .../src/main/webapp/images/bookstore.gif | Bin 9948 -> 0 bytes .../src/main/webapp/index.html | 48 - .../javaee_shared_service/BookStoreTest.java | 228 -- appserver/tests/paas/kvm_lb_setup.sh | 66 - appserver/tests/paas/kvm_setup.sh | 66 - .../paas/lazy-shared-service-test/README.txt | 47 - .../paas/lazy-shared-service-test/pom.xml | 114 - .../lazysharedservice/BasicDBPaaSServlet.java | 145 - .../webapp/WEB-INF/glassfish-resources.xml | 54 - .../webapp/WEB-INF/glassfish-services.xml | 49 - .../src/main/webapp/WEB-INF/sun-web.xml | 10 - .../src/main/webapp/WEB-INF/web.xml | 63 - .../src/main/webapp/index.html | 48 - .../src/main/webapp/newcss.css | 47 - .../LazySharedServiceTest.java | 372 --- .../paas/mq-shared-service-test/README.txt | 55 - .../mq-shared-service-test/mq-app/ear/pom.xml | 114 - .../main/application/META-INF/application.xml | 12 - .../META-INF/glassfish-services.xml | 46 - .../mq-shared-service-test/mq-app/ejb/pom.xml | 84 - .../ejb/ejb30/hello/mdb/MessageBean.java | 48 - .../mq-shared-service-test/mq-app/pom.xml | 55 - .../mq-shared-service-test/mq-app/web/pom.xml | 65 - .../ejb/ejb30/hello/mdb/web/TestServlet.java | 162 -- .../web/src/main/webapp/WEB-INF/web.xml | 17 - .../mq-shared-service-test/mq-test/pom.xml | 126 - .../paas/mqtest/MQSharedServiceTest.java | 277 -- .../tests/paas/mq-shared-service-test/pom.xml | 75 - .../advanced/README.txt | 49 - .../advanced/pom.xml | 104 - .../EmployeeServlet.java | 183 -- .../webapp/WEB-INF/glassfish-resources.xml | 59 - .../webapp/WEB-INF/glassfish-services.xml | 64 - .../main/webapp/WEB-INF/init.hr-service.sql | 49 - .../webapp/WEB-INF/init.salary-service.sql | 50 - .../main/webapp/WEB-INF/service.properties | 4 - .../src/main/webapp/WEB-INF/sun-web.xml | 45 - .../advanced/src/main/webapp/WEB-INF/web.xml | 67 - .../src/main/webapp/images/numbers.jpg | Bin 12810 -> 0 bytes .../advanced/src/main/webapp/index.html | 48 - .../EmployeeTest.java | 194 -- .../basic/README.txt | 55 - .../basic/init.hr-service.sql | 49 - .../basic/init.salary-service.sql | 50 - .../basic/pom.xml | 123 - .../EmployeeServlet.java | 183 -- .../webapp/WEB-INF/glassfish-resources.xml | 59 - .../webapp/WEB-INF/glassfish-services.xml | 72 - .../basic/src/main/webapp/WEB-INF/sun-web.xml | 45 - .../basic/src/main/webapp/WEB-INF/web.xml | 67 - .../basic/src/main/webapp/images/numbers.jpg | Bin 12810 -> 0 bytes .../basic/src/main/webapp/index.html | 48 - .../EmployeeTest.java | 194 -- .../multiple-db-app-scoped-services/pom.xml | 54 - .../advanced/README.txt | 49 - .../advanced/pom.xml | 104 - .../EmployeeServlet.java | 183 -- .../webapp/WEB-INF/glassfish-resources.xml | 59 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../main/webapp/WEB-INF/init.hr-service.sql | 49 - .../webapp/WEB-INF/init.salary-service.sql | 50 - .../main/webapp/WEB-INF/service.properties | 4 - .../src/main/webapp/WEB-INF/sun-web.xml | 45 - .../advanced/src/main/webapp/WEB-INF/web.xml | 67 - .../src/main/webapp/images/numbers.jpg | Bin 12810 -> 0 bytes .../advanced/src/main/webapp/index.html | 48 - .../EmployeeTest.java | 225 -- .../basic/README.txt | 47 - .../basic/init.hr-service.sql | 49 - .../basic/init.salary-service.sql | 50 - .../multiple-db-shared-services/basic/pom.xml | 123 - .../EmployeeServlet.java | 183 -- .../webapp/WEB-INF/glassfish-resources.xml | 59 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../main/webapp/WEB-INF/service.properties | 4 - .../basic/src/main/webapp/WEB-INF/sun-web.xml | 45 - .../basic/src/main/webapp/WEB-INF/web.xml | 67 - .../basic/src/main/webapp/images/numbers.jpg | Bin 12810 -> 0 bytes .../basic/src/main/webapp/index.html | 48 - .../EmployeeTest.java | 225 -- .../paas/multiple-db-shared-services/pom.xml | 54 - .../tests/paas/multiple-spe-test/README.txt | 57 - .../multiple-spe-test/mydb-plugin/osgi.bundle | 44 - .../multiple-spe-test/mydb-plugin/pom.xml | 119 - .../glassfish/paas/mydbplugin/MyDBPlugin.java | 204 -- .../tests/paas/multiple-spe-test/pom.xml | 54 - .../paas/multiple-spe-test/spetest/pom.xml | 126 - .../glassfish/tests/paas/spetest/Animal.java | 113 - .../paas/spetest/BasicJPAPaaSServlet.java | 192 -- .../src/main/webapp/META-INF/MANIFEST.MF | 2 - .../WEB-INF/classes/META-INF/persistence.xml | 10 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../src/main/webapp/WEB-INF/sun-web.xml | 10 - .../spetest/src/main/webapp/WEB-INF/web.xml | 32 - .../spetest/src/main/webapp/index.html | 48 - .../spetest/src/main/webapp/index.jsp | 22 - .../spetest/src/main/webapp/newcss.css | 47 - .../tests/paas/spetest/MultipleSPETest.java | 245 -- appserver/tests/paas/native_lb_setup.sh | 47 - appserver/tests/paas/native_setup.sh | 44 - appserver/tests/paas/ovm_setup.sh | 63 - appserver/tests/paas/pom.xml | 221 -- appserver/tests/paas/scale_service/README.txt | 43 - appserver/tests/paas/scale_service/pom.xml | 111 - .../ScaleServicePaaSServlet.java | 106 - .../webapp/WEB-INF/glassfish-services.xml | 53 - .../scale_service/src/main/webapp/index.html | 48 - .../scale_service/ScaleServicePaaSTest.java | 233 -- .../custom_db_name/README.txt | 45 - .../custom_db_name/initsql.sql | 10 - .../service_metadata/custom_db_name/pom.xml | 121 - .../customdbname/CustomDBNameServlet.java | 159 -- .../webapp/WEB-INF/glassfish-services.xml | 64 - .../src/main/webapp/WEB-INF/sun-web.xml | 49 - .../src/main/webapp/WEB-INF/web.xml | 67 - .../custom_db_name/src/main/webapp/index.html | 48 - .../paas/customdbname/CustomDBNameTest.java | 191 -- appserver/tests/paas/service_metadata/pom.xml | 54 - .../README.txt | 41 - .../pom.xml | 104 - .../tests/paas/basic/BasicPaaSServlet.java | 144 - .../webapp/WEB-INF/glassfish-services.xml | 51 - .../src/main/webapp/WEB-INF/sun-web.xml | 45 - .../src/main/webapp/WEB-INF/web.xml | 59 - .../src/main/webapp/index.html | 48 - .../basic/BasicPaaSServiceMetadataTest.java | 204 -- appserver/tests/paas/setup.sh | 330 --- .../formauth/src/test/resources/formauth.war | Bin 0 -> 8054 bytes appserver/tests/sse/basic/pom.xml | 173 -- .../glassfish/sse/basic/ExceptionHandler.java | 73 - .../basic/src/main/webapp/WEB-INF/beans.xml | 46 - .../glassfish/tests/sse/basic/BasicTest.java | 72 - appserver/tests/sse/videoplayer/README.txt | 16 - appserver/tests/sse/videoplayer/pom.xml | 173 -- .../sse/videoplayer/NotificationsHandler.java | 75 - .../sse/videoplayer/PlayerServlet.java | 87 - .../sse/videoplayer/PlayingStatus.java | 61 - .../src/main/webapp/WEB-INF/beans.xml | 46 - .../sse/videoplayer/src/main/webapp/app.js | 108 - .../videoplayer/src/main/webapp/index.html | 57 - .../tests/videoplayer/VideoPlayerTest.java | 70 - 1549 files changed, 147816 deletions(-) delete mode 100644 appserver/tests/admingui/README.md delete mode 100644 appserver/tests/admingui/auto-test/pom.xml delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AdminObjectTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AdminServiceTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AppScopedResourcesTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ApplicationTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AvailabilityServiceTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/BaseSeleniumTestClass.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ClusterTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConfigTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConnectorServiceTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConnectorsTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/EjbContainerTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/EnterpriseServerTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/GMSTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/HttpServiceTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/IiopListenerTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JVMReportTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JavaMailTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JavaMessageServiceTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JdbcTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JmsResourcesTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JndiTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JvmSettingsTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LifecycleModulesTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LogViewerTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LoggerSettingsTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/MonitoringTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/MsgSecurityTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/NetworkConfigTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/NodeTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ResourceAdapterConfigsTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/SecurityTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/StandaloneTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ThreadPoolsTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/TransactionServiceTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/VirtualServerTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/WebContainerTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/WorkSecurityMapTest.java delete mode 100644 appserver/tests/admingui/auto-test/src/test/resources/JavaEEApp.ear delete mode 100644 appserver/tests/admingui/auto-test/src/test/resources/ejb-ejb30-hello-sessionApp.ear delete mode 100644 appserver/tests/admingui/auto-test/src/test/resources/ejb-timer-sessiontimerApp.ear delete mode 100644 appserver/tests/admingui/auto-test/src/test/resources/test.war delete mode 100644 appserver/tests/admingui/pom.xml delete mode 100644 appserver/tests/admingui/test_results.TXT delete mode 100644 appserver/tests/amx/amx-unit-tests.html delete mode 100755 appserver/tests/amx/pom.xml delete mode 100644 appserver/tests/amx/resources/amxtest.classes delete mode 100644 appserver/tests/amx/resources/amxtest.properties delete mode 100755 appserver/tests/amx/run.sh delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/AMXTestBase.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/Capabilities.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ClusterSupportRequired.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/CoverageInfoAnalyzer.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/DomainRootTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/JMXTestBase.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/MultipleServerSupportRequired.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/Observer.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/PropertyKeys.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/RegistrationListener.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/RunMeFirstTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/RunMeLastTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/TestClientTrustStoreTrustManager.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/TestMain.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/TestRunner.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/TestTemplateTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/TestUtil.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/Tests.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/AMXDebugTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/AMXTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/BulkAccessTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/ContainerTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/GenericTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/GetSetAttributeTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/ListenerTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationEmitterServiceTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationPerformanceTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationServiceMgrTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationServiceTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/QueryMgrTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/base/UploadDownloadMgrTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/client/AppserverConnectionSourceTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/client/MiscTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/client/PerformanceTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/client/ProxyFactoryTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/client/ProxyTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AdminObjectResourceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AuditModuleConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AuthRealmConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AvailabilityServiceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ClusterConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ClusteredServerConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigMgrTestBase.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigRunMeFirstTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigSetup.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorConnectionPoolConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorResourceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorServiceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/CustomMBeanConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/CustomResourceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DanglingRefsTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DescriptionTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DiagnosticServiceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DomainConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DottedNamesTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/EnabledTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/HTTPListenerConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/HTTPServiceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/IIOPListenerConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JACCProviderConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JDBCConnectionPoolConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JDBCResourceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JMXConnectorConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JNDIResourceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JavaConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/LBTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/LibrariesTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/MailResourceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/MessageSecurityConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ModuleLogLevelsConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ModuleMonitoringLevelsConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/NodeAgentConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/PersistenceManagerFactoryResourceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ProfilerConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/PropertiesAccessTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ReferencesTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ResourceAdapterConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ResourceConfigTestBase.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SSLConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SecurityMapConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SecurityServiceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/StandaloneServerConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SystemPropertiesAccessTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ThreadPoolConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/config/VirtualServerConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/doc-files/AddingAMXUnitTests.html delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/doc-files/RunningUnitTests.html delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/LoggingHelperTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/LoggingTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/StatefulLoggingHelperTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/update/UpdateStatusTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceConfigCRTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceConfigTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceMgrTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceMonitorTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceRuntimeTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/helper/RefHelperTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/J2EETest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/ServletTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/WSMsgTraceTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/AMXMonitorTestBase.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/BeanCacheMonitorTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/CallFlowMonitorTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/ConnectionPoolStatsTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/ConnectorConnectionPoolStatsTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/JDBCConnectionPoolStatsTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/JMXMonitorMgrTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/MonitorTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/StatisticTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/WebServiceEndpointMonitorTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/support/AMXComparator.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/support/CoverageInfoTest.java delete mode 100644 appserver/tests/amx/src/org/glassfish/admin/amxtest/support/CreateRemoveListener.java delete mode 100644 appserver/tests/cdi/README.txt delete mode 100755 appserver/tests/cdi/cases/multiBeansXml/ejb1/pom.xml delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/InterceptedEjb1.java delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/Interceptor1.java delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/MultiBeansXmlEjb1.java delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/RecordingInterceptor.java delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/resources/META-INF/beans.xml delete mode 100755 appserver/tests/cdi/cases/multiBeansXml/ejb2/pom.xml delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/InterceptedEjb2.java delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/Interceptor2.java delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/MultiBeansXmlEjb2.java delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/RecordingInterceptor.java delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/resources/META-INF/beans.xml delete mode 100644 appserver/tests/cdi/cases/multiBeansXml/multiBeansApp/pom.xml delete mode 100755 appserver/tests/cdi/cases/multiBeansXml/pom.xml delete mode 100755 appserver/tests/cdi/cases/pom.xml delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/ear/pom.xml delete mode 100755 appserver/tests/cdi/cases/preDestroyScoping/lib/pom.xml delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/EventLog.java delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/PreDestroyConstants.java delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/RequestBean.java delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/resources/META-INF/beans.xml delete mode 100755 appserver/tests/cdi/cases/preDestroyScoping/pom.xml delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/web/pom.xml delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/EventLogServlet.java delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/LogoutServlet.java delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/SessionBeanProducer.java delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/SessionBeanServlet.java delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/web/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/cdi/cases/preDestroyScoping/web/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/cdi/cases/runner/pom.xml delete mode 100644 appserver/tests/cdi/cases/runner/src/main/java/com/oracle/cdi/devtests/runner/main/Main.java delete mode 100644 appserver/tests/cdi/cases/runner/src/test/java/com/oracle/cdi/devtests/cases/runner/CasesTest.java delete mode 100755 appserver/tests/cdi/negative/normalScopeWithFinal/pom.xml delete mode 100644 appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/IExtendAClassWithFinalMethods.java delete mode 100644 appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/IHaveFinalMethods.java delete mode 100644 appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/StatelessEjbWithInjectionPoint.java delete mode 100644 appserver/tests/cdi/negative/normalScopeWithFinal/src/main/resources/META-INF/beans.xml delete mode 100755 appserver/tests/cdi/negative/pom.xml delete mode 100644 appserver/tests/cdi/negative/runner/pom.xml delete mode 100644 appserver/tests/cdi/negative/runner/src/main/java/com/oracle/cdi/devtest/runner/Main.java delete mode 100644 appserver/tests/cdi/negative/runner/src/test/java/com/oracle/cdi/devtest/runner/test/NegativeTest.java delete mode 100755 appserver/tests/cdi/pom.xml delete mode 100644 appserver/tests/community/QuickLook_Test_Instructions.html delete mode 100644 appserver/tests/community/adminweb/basic/build.properties delete mode 100644 appserver/tests/community/adminweb/basic/build.xml delete mode 100644 appserver/tests/community/adminweb/basic/src/test/SeleniumTest.java delete mode 100644 appserver/tests/community/adminweb/basic/testng.xml delete mode 100644 appserver/tests/community/build.properties delete mode 100644 appserver/tests/community/build.xml delete mode 100644 appserver/tests/community/ejb30/session/hello/build.properties delete mode 100644 appserver/tests/community/ejb30/session/hello/build.xml delete mode 100644 appserver/tests/community/ejb30/session/hello/metadata/sun-ejb-jar.xml delete mode 100644 appserver/tests/community/gfproject/.asadminpass delete mode 100644 appserver/tests/community/gfproject/adminpassword.txt delete mode 100644 appserver/tests/community/gfproject/build-impl.xml delete mode 100644 appserver/tests/community/gfproject/db-targets.xml delete mode 100644 appserver/tests/community/gfproject/derby.properties delete mode 100644 appserver/tests/community/gfproject/v2-config.properties delete mode 100644 appserver/tests/community/gfproject/v2-targets.xml delete mode 100644 appserver/tests/community/gfproject/v3-config.properties delete mode 100644 appserver/tests/community/gfproject/v3-targets.xml delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/build.properties delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/build.xml delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/metadata/sun-web.xml delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/metadata/web.xml delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/src/java/MyServlet.java delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/src/java/test/LeakTest.java delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/src/java/test/SimpleTest.java delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/src/java/test/UserTxTest.java delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/src/java/util/HtmlUtil.java delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/src/java/util/TablesUtil.java delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/src/test/JdbcUserTxTestNG.java delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/web/html/index.html delete mode 100644 appserver/tests/community/jdbc/jdbcusertx/web/jsp/index.jsp delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/build.properties delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/build.xml delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/metadata/persistence.xml delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/metadata/sun-web.xml delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/metadata/web.xml delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/sql/create_derby.sql delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/sql/drop_derby.sql delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/src/java/persistence/WebCustomer.java delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/src/java/web/CustomerDetails.java delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/src/test/PersistenceTestNG.java delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/web/html/first.html delete mode 100644 appserver/tests/community/persistence/servlet-jpa-app/web/jsp/index.jsp delete mode 100644 appserver/tests/community/pom.xml delete mode 100644 appserver/tests/community/run.xml delete mode 100644 appserver/tests/community/testng.xml delete mode 100644 appserver/tests/community/web/helloworld/build.properties delete mode 100644 appserver/tests/community/web/helloworld/build.xml delete mode 100644 appserver/tests/community/web/helloworld/metadata/sun-web.xml delete mode 100644 appserver/tests/community/web/helloworld/metadata/web.xml delete mode 100644 appserver/tests/community/web/helloworld/src/java/HelloServlet.java delete mode 100644 appserver/tests/community/web/helloworld/src/test/HelloJSPTestNG.java delete mode 100644 appserver/tests/community/web/helloworld/web/html/first.html delete mode 100644 appserver/tests/community/web/helloworld/web/jsp/hello.jsp delete mode 100644 appserver/tests/community/web/helloworld/web/jsp/index.jsp delete mode 100644 appserver/tests/community/web/jruby/build.properties delete mode 100644 appserver/tests/community/web/jruby/build.xml delete mode 100644 appserver/tests/community/web/jruby/helloapp/README delete mode 100644 appserver/tests/community/web/jruby/helloapp/Rakefile delete mode 100644 appserver/tests/community/web/jruby/helloapp/app/controllers/application.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/app/controllers/mycontroller_controller.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/app/helpers/application_helper.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/app/helpers/mycontroller_helper.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/app/views/mycontroller/testview.rhtml delete mode 100644 appserver/tests/community/web/jruby/helloapp/build.properties delete mode 100644 appserver/tests/community/web/jruby/helloapp/build.xml delete mode 100644 appserver/tests/community/web/jruby/helloapp/config/boot.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/config/database.yml delete mode 100644 appserver/tests/community/web/jruby/helloapp/config/environment.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/config/environments/development.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/config/environments/production.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/config/environments/test.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/config/routes.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/404.html delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/500.html delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/dispatch.cgi delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/dispatch.fcgi delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/dispatch.rb delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/favicon.ico delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/images/rails.png delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/index.html delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/javascripts/application.js delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/javascripts/controls.js delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/javascripts/dragdrop.js delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/javascripts/effects.js delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/javascripts/prototype.js delete mode 100644 appserver/tests/community/web/jruby/helloapp/public/robots.txt delete mode 100644 appserver/tests/community/web/jruby/helloapp/test/JRubyTestNG.java delete mode 100644 appserver/tests/community/web/jsfastrologer/build.properties delete mode 100644 appserver/tests/community/web/jsfastrologer/build.xml delete mode 100644 appserver/tests/community/web/jsfastrologer/metadata/faces-config.xml delete mode 100644 appserver/tests/community/web/jsfastrologer/metadata/sun-web.xml delete mode 100644 appserver/tests/community/web/jsfastrologer/metadata/web.xml delete mode 100644 appserver/tests/community/web/jsfastrologer/src/java/web/jsf/bean/UserBean.java delete mode 100644 appserver/tests/community/web/jsfastrologer/src/test/JSFWebTestNG.java delete mode 100644 appserver/tests/community/web/jsfastrologer/web/html/first.html delete mode 100644 appserver/tests/community/web/jsfastrologer/web/jsp/greetings.jsp delete mode 100644 appserver/tests/community/web/jsfastrologer/web/jsp/index.jsp delete mode 100644 appserver/tests/community/web/jsfastrologer/web/jsp/success.jsp delete mode 100644 appserver/tests/community/web/jsfastrologer/web/jsp/welcomeJSF.jsp delete mode 100644 appserver/tests/community/web/jsfastrologer/web/jsp/welcomeStruts.jsp delete mode 100644 appserver/tests/community/web/jsfinjection/build.properties delete mode 100644 appserver/tests/community/web/jsfinjection/build.xml delete mode 100644 appserver/tests/community/web/jsfinjection/metadata/faces-config.xml delete mode 100644 appserver/tests/community/web/jsfinjection/metadata/web.xml delete mode 100644 appserver/tests/community/web/jsfinjection/src/java/FilterTest.java delete mode 100644 appserver/tests/community/web/jsfinjection/src/java/TestBean.java delete mode 100644 appserver/tests/community/web/jsfinjection/src/test/JSFInjectionTestNG.java delete mode 100644 appserver/tests/community/web/jsfinjection/web/jsp/jsfHello.jsp delete mode 100644 appserver/tests/community/web/strutsbasic/build.properties delete mode 100644 appserver/tests/community/web/strutsbasic/build.xml delete mode 100644 appserver/tests/community/web/strutsbasic/metadata/context.xml delete mode 100644 appserver/tests/community/web/strutsbasic/metadata/struts-config.xml delete mode 100644 appserver/tests/community/web/strutsbasic/metadata/sun-web.xml delete mode 100644 appserver/tests/community/web/strutsbasic/metadata/tiles-defs.xml delete mode 100644 appserver/tests/community/web/strutsbasic/metadata/validation.xml delete mode 100644 appserver/tests/community/web/strutsbasic/metadata/validator-rules.xml delete mode 100644 appserver/tests/community/web/strutsbasic/metadata/web.xml delete mode 100644 appserver/tests/community/web/strutsbasic/src/java/ApplicationResource.properties delete mode 100644 appserver/tests/community/web/strutsbasic/src/test/StrutsWebTestNG.java delete mode 100644 appserver/tests/community/web/strutsbasic/web/html/first.html delete mode 100644 appserver/tests/community/web/strutsbasic/web/jsp/hello.jsp delete mode 100644 appserver/tests/community/web/strutsbasic/web/jsp/index.jsp delete mode 100644 appserver/tests/community/web/strutsbasic/web/jsp/welcomeStruts.jsp delete mode 100644 appserver/tests/embedded/README delete mode 100644 appserver/tests/embedded/basic/README delete mode 100644 appserver/tests/embedded/basic/lifecycle/README delete mode 100644 appserver/tests/embedded/basic/lifecycle/pom.xml delete mode 100644 appserver/tests/embedded/basic/lifecycle/src/test/java/org/glassfish/tests/embedded/basic/lifecycle/LifeCycleTest.java delete mode 100755 appserver/tests/embedded/basic/pom.xml delete mode 100644 appserver/tests/embedded/cdi_basic/pom.xml delete mode 100644 appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/BasicCDITestServlet.java delete mode 100644 appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/TestBean.java delete mode 100644 appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/TestRequestScopedBean.java delete mode 100644 appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/cdi_basic/src/test/java/org/glassfish/tests/embedded/cdi_basic/BasicCDITest.java delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/README delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/pom.xml delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITestServlet.java delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/Person.java delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestBean.java delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestRequestScopedBean.java delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/main/resources/META-INF/persistence.xml delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/cdi_ejb_jpa/src/test/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITest.java delete mode 100644 appserver/tests/embedded/ejb/basic/pom.xml delete mode 100644 appserver/tests/embedded/ejb/basic/src/main/java/org/glassfish/tests/embedded/ejb/basic/SampleEjb.java delete mode 100644 appserver/tests/embedded/ejb/basic/src/main/java/org/glassfish/tests/embedded/ejb/basic/TimerEjb.java delete mode 100644 appserver/tests/embedded/ejb/basic/src/test/java/org/glassfish/tests/embedded/ejb/basic/test/EmbeddedTest.java delete mode 100644 appserver/tests/embedded/ejb/ejb-api/pom.xml delete mode 100644 appserver/tests/embedded/ejb/ejb-api/src/main/java/org/glassfish/tests/embedded/ejb/SampleEjb.java delete mode 100644 appserver/tests/embedded/ejb/ejb-api/src/test/java/org/glassfish/tests/embedded/ejb/test/EmbeddedTest.java delete mode 100644 appserver/tests/embedded/ejb/ejb-main/pom.xml delete mode 100644 appserver/tests/embedded/ejb/ejb-main/src/test/java/org/glassfish/tests/embedded/ejb/main/EmbeddedMainTest.java delete mode 100755 appserver/tests/embedded/ejb/pom.xml delete mode 100644 appserver/tests/embedded/ejb/remoteejb/pom.xml delete mode 100644 appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/RemoteEJB.java delete mode 100644 appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/RemoteEJBInf.java delete mode 100644 appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/SampleEjb.java delete mode 100644 appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/TimerEjb.java delete mode 100644 appserver/tests/embedded/ejb/remoteejb/src/test/java/org/glassfish/tests/embedded/ejb/remoteejb/test/EJBTest.java delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/README delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/pom.xml delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITestServlet.java delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/Person.java delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestBean.java delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestRequestScopedBean.java delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/resources/META-INF/persistence.xml delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/glassfish_resources_xml/src/test/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITest.java delete mode 100755 appserver/tests/embedded/inplanted/pom.xml delete mode 100644 appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/ExistingConfigurationTest.java delete mode 100644 appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/ExistingDomainTest.java delete mode 100644 appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/InplantedTest.java delete mode 100644 appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/web/HelloWeb.java delete mode 100644 appserver/tests/embedded/maven-plugin/applicationDispatcher/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/java/test/ServletTest.java delete mode 100755 appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/webapp/test.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/applicationDispatcher/src/test/java/org/glassfish/tests/applicationDispatcher/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/dirListing/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/dirListing/src/main/java/test/ServletTest.java delete mode 100755 appserver/tests/embedded/maven-plugin/dirListing/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/dirListing/src/test/java/org/glassfish/tests/dirListing/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/filterURIMapping/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/java/test/FilterTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/java/test/ServletTest.java delete mode 100755 appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/filterURIMapping/src/test/java/org/glassfish/tests/filterURIMapping/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/getRequestURI/pom.xml delete mode 100755 appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/first.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/main.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/second.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/index/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/index/src/test/java/org/glassfish/tests/index/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/init/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jmxUndeployEvent/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/main/java/test/ServletTest.java delete mode 100755 appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/test/java/org/glassfish/tests/jmxUndeployEvent/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/jsftest/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jsftest/src/main/java/org/glassfish/tests/embedded/jsftest/JSFTestBean.java delete mode 100644 appserver/tests/embedded/maven-plugin/jsftest/src/main/java/org/glassfish/tests/embedded/jsftest/JSFTestServlet.java delete mode 100644 appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/index.xhtml delete mode 100644 appserver/tests/embedded/maven-plugin/jsftest/src/test/java/org/glassfish/tests/embedded/jsftest/JSFTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/src/main/java/org/glassfish/tests/embedded/jsptest/JspTestServlet.java delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/src/main/resources/LocalStrings.properties delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/images/duke.waving.gif delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/index.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/response.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/jsptest/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/localejbs/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/LocalEjbTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/TesterServlet.java delete mode 100644 appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/TimerEjb.java delete mode 100644 appserver/tests/embedded/maven-plugin/localejbs/src/test/java/org/glassfish/tests/embedded/localejbs/EjbTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/mdb/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/MessageProcessorBean.java delete mode 100644 appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/TesterServlet.java delete mode 100644 appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/UnitTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/mdb/src/test/java/org/glassfish/tests/embedded/mdb/MyTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/secondapp/secondapp.war delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/src/main/java/org/glassfish/tests/embedded/jsptest/JspTestServlet.java delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/src/main/resources/LocalStrings.properties delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/images/duke.waving.gif delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/index.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/response.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/multipleApps/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/queryString/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/queryString/src/main/java/test/ServletTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/queryString/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/queryString/src/test/java/org/glassfish/tests/queryString/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/remoteejbs/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/remoteejbs/src/main/java/org/glassfish/tests/embedded/remoteejbs/TimerEjb.java delete mode 100644 appserver/tests/embedded/maven-plugin/remoteejbs/src/main/java/org/glassfish/tests/embedded/remoteejbs/TimerRemote.java delete mode 100644 appserver/tests/embedded/maven-plugin/remoteejbs/src/test/java/org/glassfish/tests/embedded/remoteejbs/EjbTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/scattered/pom.xml delete mode 100755 appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/FilterTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest.java delete mode 100755 appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest2.java delete mode 100644 appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest3.java delete mode 100644 appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/web.xml delete mode 100755 appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.html delete mode 100644 appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/secureWebApp/bootstrap.properties delete mode 100644 appserver/tests/embedded/maven-plugin/secureWebApp/glassfish.properties delete mode 100644 appserver/tests/embedded/maven-plugin/secureWebApp/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/secureWebApp/src/main/java/test/SecureWebAppTestServlet.java delete mode 100644 appserver/tests/embedded/maven-plugin/secureWebApp/src/test/java/org/glassfish/tests/embedded/securewebapp/SecureWebAppTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/secureWebApp/system.properties delete mode 100644 appserver/tests/embedded/maven-plugin/sessionDestroyed/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/sessionDestroyed/src/main/java/test/ServletTest.java delete mode 100755 appserver/tests/embedded/maven-plugin/sessionDestroyed/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/sessionDestroyed/src/test/java/org/glassfish/tests/sessionDestroyed/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/simple/hello.war delete mode 100644 appserver/tests/embedded/maven-plugin/simple/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/standalonewar/pom.xml delete mode 100755 appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/FilterTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest.java delete mode 100755 appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest2.java delete mode 100644 appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest3.java delete mode 100644 appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/WEB-INF/web.xml delete mode 100755 appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/index.html delete mode 100644 appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/index.jsp delete mode 100644 appserver/tests/embedded/maven-plugin/standalonewar/src/test/java/org/glassfish/tests/standalonewar/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/static-shell-init/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/webservice/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/webservice/src/main/java/test/SimpleWebService.java delete mode 100644 appserver/tests/embedded/maven-plugin/webservice/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/webservice/src/test/java/org/glassfish/tests/standalonewar/WebTest.java delete mode 100644 appserver/tests/embedded/maven-plugin/websockets/pom.xml delete mode 100644 appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/ChatApplication.java delete mode 100644 appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/ChatWebSocket.java delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/WebSocketsServlet.java delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/META-INF/context.xml delete mode 100644 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/WEB-INF/web.xml delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/body-background.png delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/header-background.png delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/main-background.png delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/index.html delete mode 100644 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/index.jsp delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/application.js delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/behaviour.js delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/moo.fx.js delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/moo.fx.pack.js delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/prototype.js delete mode 100755 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/stylesheets/default.css delete mode 100644 appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/test.html delete mode 100644 appserver/tests/embedded/maven-plugin/websockets/src/test/java/org/glassfish/tests/standalonewar/WebTest.java delete mode 100644 appserver/tests/embedded/mysql/pom.xml delete mode 100644 appserver/tests/embedded/mysql/src/main/java/org/glassfish/tests/embedded/web/MySqlTestServlet.java delete mode 100644 appserver/tests/embedded/mysql/src/main/java/org/glassfish/tests/embedded/web/Person.java delete mode 100644 appserver/tests/embedded/mysql/src/main/resources/META-INF/persistence.xml delete mode 100644 appserver/tests/embedded/mysql/src/test/java/org/glassfish/tests/embedded/web/MySqlTest.java delete mode 100755 appserver/tests/embedded/pom.xml delete mode 100644 appserver/tests/embedded/scatteredarchive/pom.xml delete mode 100755 appserver/tests/embedded/scatteredarchive/src/main/config/application.xml delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/config/ra.xml delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTestRA.java delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTestServlet.java delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/resources/LocalStrings.properties delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/webapp/images/duke.waving.gif delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/webapp/index.jsp delete mode 100644 appserver/tests/embedded/scatteredarchive/src/main/webapp/response.jsp delete mode 100644 appserver/tests/embedded/scatteredarchive/src/test/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTest.java delete mode 100644 appserver/tests/embedded/servlet_runs_admin_cmds/pom.xml delete mode 100644 appserver/tests/embedded/servlet_runs_admin_cmds/src/main/java/org/glassfish/tests/embedded/servlet_runs_admin_cmds/RunAdminCommandsServlet.java delete mode 100644 appserver/tests/embedded/servlet_runs_admin_cmds/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/embedded/servlet_runs_admin_cmds/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/servlet_runs_admin_cmds/src/test/java/org/glassfish/tests/embedded/servlet_runs_admin_cmds/RunAdminCommandsTest.java delete mode 100755 appserver/tests/embedded/static/ejb/pom.xml delete mode 100644 appserver/tests/embedded/static/ejb/simple/pom.xml delete mode 100644 appserver/tests/embedded/static/ejb/simple/src/main/java/org/glassfish/tests/embedded/ejb/SampleEjb.java delete mode 100644 appserver/tests/embedded/static/ejb/simple/src/test/java/org/glassfish/tests/embedded/ejb/test/EmbeddedTest.java delete mode 100755 appserver/tests/embedded/static/pom.xml delete mode 100755 appserver/tests/embedded/static/web/pom.xml delete mode 100644 appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/ExistingConfigurationTest.java delete mode 100644 appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/ExistingDomainTest.java delete mode 100644 appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/InplantedTest.java delete mode 100644 appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/web/HelloWeb.java delete mode 100644 appserver/tests/embedded/utils/pom.xml delete mode 100644 appserver/tests/embedded/utils/src/main/java/org/glassfish/tests/embedded/utils/EmbeddedServerUtils.java delete mode 100644 appserver/tests/embedded/web/autodelete/pom.xml delete mode 100644 appserver/tests/embedded/web/autodelete/src/main/java/HelloWorld.java delete mode 100644 appserver/tests/embedded/web/autodelete/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/web/autodelete/src/test/java/org/glassfish/tests/embedded/web/autodelete/ServletMain.java delete mode 100755 appserver/tests/embedded/web/pom.xml delete mode 100644 appserver/tests/embedded/web/servlet/pom.xml delete mode 100644 appserver/tests/embedded/web/servlet/src/main/java/HelloWorld.java delete mode 100644 appserver/tests/embedded/web/servlet/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/web/servlet/src/test/java/org/glassfish/tests/embedded/web/servlet/ServletMain.java delete mode 100644 appserver/tests/embedded/web/web-all/pom.xml delete mode 100644 appserver/tests/embedded/web/web-all/src/main/java/org/glassfish/tests/weball/WebHello.java delete mode 100644 appserver/tests/embedded/web/web-all/src/test/java/org/glassfish/tests/weball/WebAllTest.java delete mode 100755 appserver/tests/embedded/web/web-api/pom.xml delete mode 100644 appserver/tests/embedded/web/web-api/src/main/java/org/glassfish/tests/webapi/HelloWeb.java delete mode 100644 appserver/tests/embedded/web/web-api/src/main/resources/cacerts.jks delete mode 100644 appserver/tests/embedded/web/web-api/src/main/resources/embedded-webapi-tests.war delete mode 100644 appserver/tests/embedded/web/web-api/src/main/resources/keystore.jks delete mode 100644 appserver/tests/embedded/web/web-api/src/main/resources/keystore0 delete mode 100644 appserver/tests/embedded/web/web-api/src/main/resources/keystore1 delete mode 100644 appserver/tests/embedded/web/web-api/src/main/resources/org/glassfish/tests/webapi/domain.xml delete mode 100644 appserver/tests/embedded/web/web-api/src/main/resources/org/glassfish/tests/webapi/my-default-web.xml delete mode 100755 appserver/tests/embedded/web/web-api/src/main/resources/toto.jar delete mode 100644 appserver/tests/embedded/web/web-api/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/web/web-api/src/main/webapp/images/duke.waving.gif delete mode 100644 appserver/tests/embedded/web/web-api/src/main/webapp/index.jsp delete mode 100644 appserver/tests/embedded/web/web-api/src/main/webapp/response.jsp delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddContextTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddHttpsListenerTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddListenerDefaultVSTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletAndFilterByClassNameTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletAndFilterByClassTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletDefaultVSTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddWebListenerTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedClassLoaderTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateContextTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateServletAndFilterTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateVirtualServerTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedGetContextsTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedJSPTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRedeployTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRemoveContextTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRestartTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetConfigurationTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetDefaultWebXmlTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetDocRootTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetSecurityTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedVirtualServerHostNameTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebAPIDefaultStartTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebAPITest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebTest.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/MyServlet.java delete mode 100755 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/MyServletContextListener.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewFilter.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewFilterServlet.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewServlet.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewServletRequestListener.java delete mode 100644 appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/WebHello.java delete mode 100644 appserver/tests/embedded/web/web-war/pom.xml delete mode 100644 appserver/tests/embedded/web/web-war/test/pom.xml delete mode 100644 appserver/tests/embedded/web/web-war/test/src/test/java/org/glassfish/tests/embedded/webwar/EmbeddedTest.java delete mode 100644 appserver/tests/embedded/web/web-war/war/pom.xml delete mode 100644 appserver/tests/embedded/web/web-war/war/src/main/java/org/glassfish/tests/embedded/webwar/TestServlet.java delete mode 100644 appserver/tests/embedded/web/web-war/war/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment1/pom.xml delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment1/src/main/java/org/glassfish/tests/embedded/webwar/webfragment1/WFTestFilter.java delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment2/pom.xml delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment2/src/main/java/org/glassfish/tests/embedded/webwar/webfragment2/WFTestFilter2.java delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment2/src/main/java/org/glassfish/tests/embedded/webwar/webfragment2/WFTestFilter2B.java delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment2/src/main/resources/META-INF/web-fragment.xml delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment3/pom.xml delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment3/src/main/java/org/glassfish/tests/embedded/webwar/webfragment3/WFTestFilter3.java delete mode 100644 appserver/tests/embedded/web/web-war/web-fragment3/src/main/resources/META-INF/web-fragment.xml delete mode 100644 appserver/tests/embedded/wrapper/pom.xml delete mode 100644 appserver/tests/embedded/wrapper/src/main/java/org/glassfish/tests/embedded/EmbeddedMain.java delete mode 100644 appserver/tests/hk2/README.txt delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/pom.xml delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/BasicEjb.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/EjbInjectedWithServiceLocator.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/ppp/ApplicationPopulatorPostProcessor.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CountingApplicationScopedCDIService.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScope.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScopeContext.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScopedEjb.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedService.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedServiceFactory.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedServiceFactory2.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2PerLookupInjectedWithCDIApplicationScoped.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2Service.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2ServiceFactory.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2ServiceImpl.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/AnEvent.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/CDIExtension.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/EventObserver.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/FieldProducer.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/HK2ExtensionVerifier.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/MethodProducer.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/ProducedServiceA.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/ProducedServiceB.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/CDIServiceInjectedWithHK2Service.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/HK2Service.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/JITResolver.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/locator/BasicService.java delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/beans.xml delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension delete mode 100644 appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/services/org.glassfish.hk2.bootstrap.PopulatorPostProcessor delete mode 100755 appserver/tests/hk2/cdi/basic/pom.xml delete mode 100644 appserver/tests/hk2/cdi/basic/runner/pom.xml delete mode 100644 appserver/tests/hk2/cdi/basic/runner/src/main/java/com/oracle/hk2/devtest/Main.java delete mode 100644 appserver/tests/hk2/cdi/basic/runner/src/test/java/com/oracle/hk2/devtest/cdi/runner/BasicCDITest.java delete mode 100644 appserver/tests/hk2/cdi/ear/app/pom.xml delete mode 100644 appserver/tests/hk2/cdi/ear/ejb1/pom.xml delete mode 100644 appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1.java delete mode 100644 appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1HK2Service.java delete mode 100644 appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1HK2ServiceFactory.java delete mode 100644 appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1Remote.java delete mode 100644 appserver/tests/hk2/cdi/ear/ejb1/src/main/resources/META-INF/beans.xml delete mode 100644 appserver/tests/hk2/cdi/ear/ejb2/pom.xml delete mode 100644 appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2.java delete mode 100644 appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2HK2Service.java delete mode 100644 appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2HK2ServiceFactory.java delete mode 100644 appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2Remote.java delete mode 100644 appserver/tests/hk2/cdi/ear/ejb2/src/main/resources/META-INF/beans.xml delete mode 100644 appserver/tests/hk2/cdi/ear/lib1/pom.xml delete mode 100644 appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/HK2Service.java delete mode 100644 appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1.java delete mode 100644 appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1HK2Service.java delete mode 100644 appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1Hk2ServiceFactory.java delete mode 100755 appserver/tests/hk2/cdi/ear/pom.xml delete mode 100644 appserver/tests/hk2/cdi/ear/runner/pom.xml delete mode 100644 appserver/tests/hk2/cdi/ear/runner/src/main/java/com/oracle/hk2/devtest/Dummy.java delete mode 100644 appserver/tests/hk2/cdi/ear/runner/src/test/java/com/oracle/hk2/devtest/cdi/ear/runner/CDIEarTest.java delete mode 100644 appserver/tests/hk2/cdi/ear/war1/pom.xml delete mode 100644 appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1.java delete mode 100644 appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1HK2Service.java delete mode 100644 appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1HK2ServiceFactory.java delete mode 100644 appserver/tests/hk2/cdi/ear/war1/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/hk2/cdi/ear/war1/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/hk2/cdi/ear/war2/pom.xml delete mode 100644 appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2.java delete mode 100644 appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2HK2Service.java delete mode 100644 appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2HK2ServiceFactory.java delete mode 100644 appserver/tests/hk2/cdi/ear/war2/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/hk2/cdi/ear/war2/src/main/webapp/WEB-INF/web.xml delete mode 100755 appserver/tests/hk2/cdi/jersey/pom.xml delete mode 100644 appserver/tests/hk2/cdi/jersey/runner/pom.xml delete mode 100644 appserver/tests/hk2/cdi/jersey/runner/src/main/java/com/oracle/hk2/devtest/Dummy.java delete mode 100644 appserver/tests/hk2/cdi/jersey/runner/src/test/java/com/sun/jersey/samples/jersey_cdi/test/JerseyTest.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/README.html delete mode 100644 appserver/tests/hk2/cdi/jersey/war/nb-configuration.xml delete mode 100644 appserver/tests/hk2/cdi/jersey/war/pom.xml delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/assembly/glassfish.xml delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/assembly/src.xml delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamConstructorResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamFieldResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/FormBean.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/FormResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/HelloWorldResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentExceptionMapper.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentPerRequestResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentSingletonResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanExceptionMapper.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanPerRequestResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanSingletonResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JDCIBeanDependentException.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JDCIBeanException.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JerseyResolver.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MyApplication.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MyOtherResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MySimpleResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/BaseResource.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceA.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceB.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceC.java delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/glassfish-web.xml delete mode 100644 appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/web.xml delete mode 100755 appserver/tests/hk2/cdi/pom.xml delete mode 100755 appserver/tests/hk2/isolation/pom.xml delete mode 100755 appserver/tests/hk2/isolation/runner/pom.xml delete mode 100644 appserver/tests/hk2/isolation/runner/src/main/java/com/oracle/hk2/devtest/isolation/runner/dummy/Dummy.java delete mode 100644 appserver/tests/hk2/isolation/runner/src/test/java/com/oracle/hk2/devtest/isolation/runner/IsolationTest.java delete mode 100644 appserver/tests/hk2/isolation/web/iso1/pom.xml delete mode 100644 appserver/tests/hk2/isolation/web/iso1/src/main/java/com/oracle/hk2/devtest/isolation/web/iso1/Iso1Servlet.java delete mode 100644 appserver/tests/hk2/isolation/web/iso1/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/hk2/isolation/web/iso2/pom.xml delete mode 100644 appserver/tests/hk2/isolation/web/iso2/src/main/java/com/oracle/hk2/devtest/isolation/web/iso2/Iso2Servlet.java delete mode 100644 appserver/tests/hk2/isolation/web/iso2/src/main/webapp/WEB-INF/web.xml delete mode 100755 appserver/tests/hk2/isolation/web/pom.xml delete mode 100755 appserver/tests/hk2/pom.xml delete mode 100644 appserver/tests/jbi/README delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/README delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/build.properties delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/build.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/client/SOAPWebConsumer.java delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/endpoints.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/web.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/build.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/README delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/build.properties delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/build.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-jbi.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-sun-web.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-web.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client/TestClient.java delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/common/IncomeTaxDetails.java delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/sun-web.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/web.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/build.xml delete mode 100644 appserver/tests/jbi/client/build.xml delete mode 100644 appserver/tests/jbi/client/web/build.properties delete mode 100644 appserver/tests/jbi/client/web/build.xml delete mode 100644 appserver/tests/jbi/client/web/client-jbi.xml delete mode 100644 appserver/tests/jbi/client/web/client-sun-web.xml delete mode 100644 appserver/tests/jbi/client/web/client-web.xml delete mode 100644 appserver/tests/jbi/client/web/client/TestClient.java delete mode 100644 appserver/tests/jbi/client/web/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/client/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/client/web/soap-binding-su-alaska/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/client/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/client/web/soap-binding-su-alaska/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/client/web/soap-binding-su-alaska/su/endpoints.xml delete mode 100644 appserver/tests/jbi/client/web/soap-binding-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/client/web/soap-binding-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/client/web/soap-binding-su/su/endpoints.xml delete mode 100644 appserver/tests/jbi/client/web/sun-web.xml delete mode 100644 appserver/tests/jbi/client/web/web.xml delete mode 100644 appserver/tests/jbi/client/web/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/client/web/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/client/web/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/config/common.properties delete mode 100644 appserver/tests/jbi/config/common.xml delete mode 100644 appserver/tests/jbi/config/init-common.properties delete mode 100644 appserver/tests/jbi/config/j2eeReporter.xsl delete mode 100644 appserver/tests/jbi/config/jaxwstools.xml delete mode 100644 appserver/tests/jbi/config/report.xml delete mode 100644 appserver/tests/jbi/config/resultCount.sh delete mode 100644 appserver/tests/jbi/lib/reporter.jar delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/README delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/build.properties delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/build.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/client/SOAPWebConsumer.java delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/common/IncomeTaxDetails.java delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/endpoints.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/wsdl/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/wsdl/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/README delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/build.properties delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/build.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/client/SOAPWebConsumer.java delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/common/IncomeTaxDetails.java delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/endpoints.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/MessageTypes.wsdl delete mode 100644 appserver/tests/jbi/rpc_literal/build.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/README delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.properties delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-sun-web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client/TestClient.java delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/common/IncomeTaxDetails.java delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/sun-web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/README delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/build.properties delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/build.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-sun-web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client/TestClient.java delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/common/IncomeTaxDetails.java delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/sun-web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/web.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/security/README delete mode 100644 appserver/tests/jbi/security/build.xml delete mode 100644 appserver/tests/jbi/security/jse_only/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/security/jse_only/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/security/jse_only/README delete mode 100644 appserver/tests/jbi/security/jse_only/build.properties delete mode 100644 appserver/tests/jbi/security/jse_only/build.xml delete mode 100644 appserver/tests/jbi/security/jse_only/client-jbi.xml delete mode 100644 appserver/tests/jbi/security/jse_only/client-sun-web.xml delete mode 100644 appserver/tests/jbi/security/jse_only/client-web.xml delete mode 100644 appserver/tests/jbi/security/jse_only/client/TestClient.java delete mode 100644 appserver/tests/jbi/security/jse_only/endpoint/ejb/Hello.java delete mode 100644 appserver/tests/jbi/security/jse_only/endpoint/ejb/HelloEJB.java delete mode 100644 appserver/tests/jbi/security/jse_only/javaee-se-serviceunit/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/security/jse_only/javaee-se-serviceunit/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/security/jse_only/sun-web.xml delete mode 100644 appserver/tests/jbi/security/jse_only/web.xml delete mode 100644 appserver/tests/jbi/security/jse_only/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/security/jse_only/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/security/jse_only/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/README delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/RepRunConf.txt delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/build.properties delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/build.xml delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/client-sun-web.xml delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/client-web.xml delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/client/TestClient.java delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100755 appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/endpoint/AddNumber.java delete mode 100755 appserver/tests/jbi/service_unit/add-numbers/javaee-se-serviceunit/assembly/META-INF/jbi.xml delete mode 100755 appserver/tests/jbi/service_unit/add-numbers/javaee-se-serviceunit/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/sun-web.xml delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/web.xml delete mode 100644 appserver/tests/jbi/service_unit/add-numbers/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/service_unit/build.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/README delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/build.properties delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/build.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/client-sun-web.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/client-web.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/client/TestClient.java delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/jbi.xml delete mode 100755 appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/CalculatorService_schema1.xsd delete mode 100755 appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/META-INF/jbi.xml delete mode 100755 appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/endpoints.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/sun-web.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/web.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-client/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/README delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/build.properties delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/build.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/client/SOAPWebConsumer.java delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/endpoints.xml delete mode 100644 appserver/tests/jbi/service_unit/compApp-server/web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/README delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/RepRunConf.txt delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/build.properties delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/build.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/client-sun-web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/client-web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/client/TestClient.java delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100755 appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/endpoint/EndpointMapping.java delete mode 100755 appserver/tests/jbi/service_unit/endpoint_mapping/javaee-se-serviceunit/assembly/META-INF/jbi.xml delete mode 100755 appserver/tests/jbi/service_unit/endpoint_mapping/javaee-se-serviceunit/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/sun-web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/RepRunConf.txt delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/build.properties delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/build.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client-sun-web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client-web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client/TestClient.java delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/endpoint/EndpointMappingConsumer.java delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/jbi.xml delete mode 100755 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService.wsdl delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService_schema1.xsd delete mode 100755 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/META-INF/jbi.xml delete mode 100755 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/endpoints.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/web.xml delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService.wsdl delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService_schema1.xsd delete mode 100644 appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EnpointMappingConsumerService_schema1.xsd delete mode 100644 appserver/tests/jbi/soapfault/README delete mode 100644 appserver/tests/jbi/soapfault/build.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/README delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/build.properties delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/build.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/client-jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/client-sun-web.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/client-web.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/client/TestClient.java delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/endpoints.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/sun-web.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/web.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumer/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/README delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/build.properties delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/build.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/client-jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/client-sun-web.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/client-web.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/client/TestClient.java delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/endpoints.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/sun-web.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/web.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/soapfault/se_provider/README delete mode 100644 appserver/tests/jbi/soapfault/se_provider/build.properties delete mode 100644 appserver/tests/jbi/soapfault/se_provider/build.xml delete mode 100644 appserver/tests/jbi/soapfault/se_provider/client/SOAPWebConsumer.java delete mode 100644 appserver/tests/jbi/soapfault/se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/soapfault/se_provider/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_provider/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/soapfault/se_provider/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_provider/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl delete mode 100644 appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd delete mode 100644 appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/endpoints.xml delete mode 100644 appserver/tests/jbi/soapfault/se_provider/web.xml delete mode 100644 appserver/tests/jbi/transactions/README delete mode 100644 appserver/tests/jbi/transactions/build.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/README delete mode 100644 appserver/tests/jbi/transactions/jse_only/build.properties delete mode 100644 appserver/tests/jbi/transactions/jse_only/build.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/client-jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/client-sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/client-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/client/TestClient.java delete mode 100644 appserver/tests/jbi/transactions/jse_only/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/endpoint/Calculator.java delete mode 100644 appserver/tests/jbi/transactions/jse_only/sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/README delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/build.properties delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/build.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/client-jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/client-sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/client-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/client/TestClient.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/endpoint/ejb/Hello.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/endpoint/ejb/HelloEJB.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/README delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/build.properties delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/build.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/client/TestClient.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/endpoint/ejb/Hello.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/endpoint/ejb/HelloEJB.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/README delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/build.properties delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/build.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/client-jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/client-sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/client-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/client/TestClient.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/endpoint/ejb/Hello.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/endpoint/ejb/HelloEJB.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/client/Client.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/README delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/build.properties delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/build.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/client/TestClient.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/su/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/su/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/endpoint/ejb/Hello.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/endpoint/ejb/HelloEJB.java delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/sun-web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/web.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/assembly/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/assembly/META-INF/jbi.xml delete mode 100644 appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/client/Client.java delete mode 100644 appserver/tests/logmonitor/Filter.java delete mode 100644 appserver/tests/logmonitor/README delete mode 100644 appserver/tests/logmonitor/build.xml delete mode 100644 appserver/tests/logmonitor/message-key-excl.txt delete mode 100755 appserver/tests/logmonitor/message-keys-used-checker.rb delete mode 100755 appserver/tests/logmonitor/missing-msg-id-finder.rb delete mode 100644 appserver/tests/osgi-javaee/osgi-web/README delete mode 100644 appserver/tests/osgi-javaee/osgi-web/TODO delete mode 100644 appserver/tests/osgi-javaee/osgi-web/build.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/common/BundleUtil.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/common/Reporter.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/common/TestClient.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/config/bundle_common.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/config/common.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/config/common.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/README delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/build.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/build.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/WEB-INF/web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/index.jsp delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/install.jsp delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleController.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleInstaller.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleUninstaller.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleViewer.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/framework-controller/src/uninstall.jsp delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/build.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/build.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/pom.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/UserAuthService.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/Activator.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/LoginServlet.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/RegistrationServlet.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/UserAuthServiceEJB.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/WEB-INF/web.xml delete mode 100755 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/index.html delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/login.html delete mode 100644 appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/registration.html delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test1/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test1/README delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test1/build.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test1/build.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test1/src/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test1/src/WEB-INF/web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test1/src/index.html delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/README delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/build.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/build.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/src/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/src/WEB-INF/web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/src/login.html delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/src/main/java/example/LoginServlet.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/src/main/java/example/RegistrationServlet.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test2/src/registration.html delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/README delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/build.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/build.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/src/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/classes/LocalStrings.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/src/images/duke.waving.gif delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/src/index.jsp delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test4/src/response.jsp delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/README delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/WEB-INF/web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/build.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/build.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/login.html delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/registration.html delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/src/main/java/example/LoginServlet.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test6/src/main/java/example/RegistrationServlet.java delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test7/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test7/README delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test7/build.properties delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test7/build.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test7/src/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test7/src/WEB-INF/web.xml delete mode 100644 appserver/tests/osgi-javaee/osgi-web/test7/src/index.html delete mode 100644 appserver/tests/paas/README.txt delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/README.txt delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/pom.xml delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/main/java/org/glassfish/tests/paas/appscopeddbwithresourcesxml/CoffeeServlet.java delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/init.sql delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/images/Coffee.jpg delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/appscoped-db-with-resources-xml/src/test/java/org/glassfish/tests/paas/appscopeddbwithresourcesxml/CoffeeTest.java delete mode 100644 appserver/tests/paas/basic-bookstore-dns/.settings/org.eclipse.jdt.core.prefs delete mode 100644 appserver/tests/paas/basic-bookstore-dns/Kkey-glassfish.+157+05094.key delete mode 100644 appserver/tests/paas/basic-bookstore-dns/Kkey-glassfish.+157+05094.private delete mode 100644 appserver/tests/paas/basic-bookstore-dns/README.txt delete mode 100644 appserver/tests/paas/basic-bookstore-dns/basic_paas_sample.war delete mode 100644 appserver/tests/paas/basic-bookstore-dns/bookstore.war delete mode 100644 appserver/tests/paas/basic-bookstore-dns/pom.xml delete mode 100644 appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic-bookstore-dns/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/basic-bookstore-dns/src/test/java/org/glassfish/tests/paas/dns/BasicbookstoreDnsPaasTest.java delete mode 100644 appserver/tests/paas/basic-db-initsql/README.txt delete mode 100644 appserver/tests/paas/basic-db-initsql/initsql.sql delete mode 100644 appserver/tests/paas/basic-db-initsql/pom.xml delete mode 100644 appserver/tests/paas/basic-db-initsql/src/main/java/org/glassfish/tests/paas/basicdbinitsql/BasicDBInitSqlServlet.java delete mode 100644 appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic-db-initsql/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/basic-db-initsql/src/test/java/org/glassfish/tests/paas/basicdbinitsql/BasicDBInitSqlTest.java delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/README.txt delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/pom.xml delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/java/org/glassfish/tests/paas/basicdbteardownsql/CoffeeServlet.java delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/java/org/glassfish/tests/paas/basicdbteardownsql/DbConnectionDetailsServlet.java delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/init.sql delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/teardown.sql delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/images/Coffee.jpg delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/basic-db-teardown-sql/src/test/java/org/glassfish/tests/paas/basicdbteardownsql/CoffeeTest.java delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/README.txt delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/pom.xml delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/main/java/org/glassfish/tests/paas/basicdbwithresourcesxml/CoffeeServlet.java delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/init.sql delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/payara-resources.xml delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/images/Coffee.jpg delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/basic-db-with-resources-xml/src/test/java/org/glassfish/tests/paas/basicdbwithresourcesxml/CoffeeTest.java delete mode 100644 appserver/tests/paas/basic-db/README.txt delete mode 100644 appserver/tests/paas/basic-db/pom.xml delete mode 100644 appserver/tests/paas/basic-db/src/main/java/org/glassfish/tests/paas/basicdb/BasicDBPaaSServlet.java delete mode 100644 appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic-db/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/basic-db/src/test/java/org/glassfish/tests/paas/basicdb/BasicDBPaaSTest.java delete mode 100644 appserver/tests/paas/basic-jpa/README.txt delete mode 100644 appserver/tests/paas/basic-jpa/pom.xml delete mode 100644 appserver/tests/paas/basic-jpa/src/main/java/org/glassfish/tests/paas/basicjpa/Animal.java delete mode 100644 appserver/tests/paas/basic-jpa/src/main/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSServlet.java delete mode 100644 appserver/tests/paas/basic-jpa/src/main/webapp/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml delete mode 100644 appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic-jpa/src/main/webapp/index.jsp delete mode 100644 appserver/tests/paas/basic-jpa/src/main/webapp/newcss.css delete mode 100644 appserver/tests/paas/basic-jpa/src/test/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSTest.java delete mode 100644 appserver/tests/paas/basic-service-discovery/README.txt delete mode 100644 appserver/tests/paas/basic-service-discovery/pom.xml delete mode 100644 appserver/tests/paas/basic-service-discovery/src/main/java/org/glassfish/tests/paas/basicsd/BasicSDPaaSServlet.java delete mode 100644 appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic-service-discovery/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/basic-service-discovery/src/test/java/org/glassfish/tests/paas/basicsd/BasicServiceDiscoveryPaaSTest.java delete mode 100644 appserver/tests/paas/basic-shared-service-test/README.txt delete mode 100644 appserver/tests/paas/basic-shared-service-test/pom.xml delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/java/org/glassfish/tests/paas/basicjpa/Animal.java delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSServlet.java delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/webapp/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/webapp/index.jsp delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/main/webapp/newcss.css delete mode 100644 appserver/tests/paas/basic-shared-service-test/src/test/java/org/glassfish/tests/paas/basicjpa/BasicSharedServiceTest.java delete mode 100644 appserver/tests/paas/basic/README.txt delete mode 100755 appserver/tests/paas/basic/native_setup.sh delete mode 100644 appserver/tests/paas/basic/pom.xml delete mode 100644 appserver/tests/paas/basic/src/main/java/org/glassfish/tests/paas/basic/BasicPaaSServlet.java delete mode 100644 appserver/tests/paas/basic/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/basic/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/basic/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/basic/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/basic/src/test/java/org/glassfish/tests/paas/basic/BasicPaaSTest.java delete mode 100644 appserver/tests/paas/bookstore/README.txt delete mode 100644 appserver/tests/paas/bookstore/pom.xml delete mode 100644 appserver/tests/paas/bookstore/src/main/java/org/glassfish/tests/paas/basic/BookStoreServlet.java delete mode 100644 appserver/tests/paas/bookstore/src/main/java/org/glassfish/tests/paas/basic/DatabaseOperations.java delete mode 100644 appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/bookstore/src/main/webapp/images/bookstore.gif delete mode 100644 appserver/tests/paas/bookstore/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/bookstore/src/test/java/org/glassfish/tests/paas/basic/BookStoreTest.java delete mode 100644 appserver/tests/paas/deployment-rollback/README.txt delete mode 100644 appserver/tests/paas/deployment-rollback/initsql.sql delete mode 100644 appserver/tests/paas/deployment-rollback/pom.xml delete mode 100644 appserver/tests/paas/deployment-rollback/src/main/java/org/glassfish/tests/paas/rollbacktest/RollbackTestServlet.java delete mode 100644 appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/deployment-rollback/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/deployment-rollback/src/test/java/org/glassfish/tests/paas/rollbacktest/RollbackTest.java delete mode 100644 appserver/tests/paas/enable-disable-test/README.txt delete mode 100644 appserver/tests/paas/enable-disable-test/initsql.sql delete mode 100644 appserver/tests/paas/enable-disable-test/pom.xml delete mode 100644 appserver/tests/paas/enable-disable-test/src/main/java/org/glassfish/tests/paas/enable_disable_test/EnableDisableServlet.java delete mode 100644 appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/enable-disable-test/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/enable-disable-test/src/test/java/org/glassfish/tests/paas/enable_disable_test/EnableDisableTest.java delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/README.txt delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/pom.xml delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/java/org/glassfish/tests/paas/enabledisable/Animal.java delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/java/org/glassfish/tests/paas/enabledisable/ExtSharedServiceEnableDisableServlet.java delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/index.jsp delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/newcss.css delete mode 100644 appserver/tests/paas/ext-shared-service-enable-disable-test/src/test/java/org/glassfish/tests/paas/enabledisable/ExtSharedServiceEnableDisableTest.java delete mode 100644 appserver/tests/paas/external-and-shared-service/README.txt delete mode 100644 appserver/tests/paas/external-and-shared-service/pom.xml delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/java/org/glassfish/tests/paas/external_and_shared_service/Animal.java delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/java/org/glassfish/tests/paas/external_and_shared_service/ExternalAndSharedServiceTestServlet.java delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/webapp/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/webapp/index.jsp delete mode 100644 appserver/tests/paas/external-and-shared-service/src/main/webapp/newcss.css delete mode 100644 appserver/tests/paas/external-and-shared-service/src/test/java/org/glassfish/tests/paas/external_and_shared_service/SharedAndExternalServiceTest.java delete mode 100644 appserver/tests/paas/external-db-service/README.txt delete mode 100644 appserver/tests/paas/external-db-service/generatederbyvm/osgi.bundle delete mode 100644 appserver/tests/paas/external-db-service/generatederbyvm/pom.xml delete mode 100644 appserver/tests/paas/external-db-service/generatederbyvm/src/main/java/org/glassfish/tests/paas/externaldbservicetest/generatederbyvm/CreateDerbyVM.java delete mode 100644 appserver/tests/paas/external-db-service/generatederbyvm/src/main/java/org/glassfish/tests/paas/externaldbservicetest/generatederbyvm/DeleteDerbyVM.java delete mode 100644 appserver/tests/paas/external-db-service/pom.xml delete mode 100644 appserver/tests/paas/external-db-service/test/pom.xml delete mode 100644 appserver/tests/paas/external-db-service/test/src/main/java/org/glassfish/tests/paas/externaldbservicetest/CoffeeServlet.java delete mode 100644 appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/init.sql delete mode 100644 appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/external-db-service/test/src/main/webapp/images/Coffee.jpg delete mode 100644 appserver/tests/paas/external-db-service/test/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/external-db-service/test/src/test/java/org/glassfish/tests/paas/externaldbservicetest/CoffeeTest.java delete mode 100644 appserver/tests/paas/helloworld/README.txt delete mode 100644 appserver/tests/paas/helloworld/pom.xml delete mode 100644 appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/helloworld/src/main/webapp/hi.jsp delete mode 100644 appserver/tests/paas/helloworld/src/test/java/org/glassfish/tests/paas/helloworld/HelloWorldTest.java delete mode 100644 appserver/tests/paas/javaee_shared_service/README.txt delete mode 100644 appserver/tests/paas/javaee_shared_service/pom.xml delete mode 100644 appserver/tests/paas/javaee_shared_service/src/main/java/org/glassfish/tests/paas/javaee_shared_service/BookStoreServlet.java delete mode 100644 appserver/tests/paas/javaee_shared_service/src/main/java/org/glassfish/tests/paas/javaee_shared_service/DatabaseOperations.java delete mode 100644 appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/javaee_shared_service/src/main/webapp/images/bookstore.gif delete mode 100644 appserver/tests/paas/javaee_shared_service/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/javaee_shared_service/src/test/java/org/glassfish/tests/paas/javaee_shared_service/BookStoreTest.java delete mode 100755 appserver/tests/paas/kvm_lb_setup.sh delete mode 100755 appserver/tests/paas/kvm_setup.sh delete mode 100644 appserver/tests/paas/lazy-shared-service-test/README.txt delete mode 100644 appserver/tests/paas/lazy-shared-service-test/pom.xml delete mode 100644 appserver/tests/paas/lazy-shared-service-test/src/main/java/org/glassfish/tests/paas/lazysharedservice/BasicDBPaaSServlet.java delete mode 100644 appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/lazy-shared-service-test/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/lazy-shared-service-test/src/main/webapp/newcss.css delete mode 100644 appserver/tests/paas/lazy-shared-service-test/src/test/java/org/glassfish/tests/paas/lazysharedservice/LazySharedServiceTest.java delete mode 100644 appserver/tests/paas/mq-shared-service-test/README.txt delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-app/ear/pom.xml delete mode 100755 appserver/tests/paas/mq-shared-service-test/mq-app/ear/src/main/application/META-INF/application.xml delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-app/ear/src/main/application/META-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-app/ejb/pom.xml delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-app/ejb/src/main/java/com/sun/s1asdev/ejb/ejb30/hello/mdb/MessageBean.java delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-app/pom.xml delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-app/web/pom.xml delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-app/web/src/main/java/com/sun/s1asdev/ejb/ejb30/hello/mdb/web/TestServlet.java delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-app/web/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-test/pom.xml delete mode 100644 appserver/tests/paas/mq-shared-service-test/mq-test/src/test/java/org/glassfish/tests/paas/mqtest/MQSharedServiceTest.java delete mode 100644 appserver/tests/paas/mq-shared-service-test/pom.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/README.txt delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/pom.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeServlet.java delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/init.hr-service.sql delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/init.salary-service.sql delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/service.properties delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/images/numbers.jpg delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/test/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeTest.java delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/README.txt delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/init.hr-service.sql delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/init.salary-service.sql delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/pom.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeServlet.java delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/images/numbers.jpg delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/basic/src/test/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeTest.java delete mode 100644 appserver/tests/paas/multiple-db-app-scoped-services/pom.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/README.txt delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/pom.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeServlet.java delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/init.hr-service.sql delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/init.salary-service.sql delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/service.properties delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/images/numbers.jpg delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/multiple-db-shared-services/advanced/src/test/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeTest.java delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/README.txt delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/init.hr-service.sql delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/init.salary-service.sql delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/pom.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/main/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeServlet.java delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/glassfish-resources.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/service.properties delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/images/numbers.jpg delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/multiple-db-shared-services/basic/src/test/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeTest.java delete mode 100644 appserver/tests/paas/multiple-db-shared-services/pom.xml delete mode 100644 appserver/tests/paas/multiple-spe-test/README.txt delete mode 100644 appserver/tests/paas/multiple-spe-test/mydb-plugin/osgi.bundle delete mode 100644 appserver/tests/paas/multiple-spe-test/mydb-plugin/pom.xml delete mode 100644 appserver/tests/paas/multiple-spe-test/mydb-plugin/src/main/java/org/glassfish/paas/mydbplugin/MyDBPlugin.java delete mode 100644 appserver/tests/paas/multiple-spe-test/pom.xml delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/pom.xml delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/java/org/glassfish/tests/paas/spetest/Animal.java delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/java/org/glassfish/tests/paas/spetest/BasicJPAPaaSServlet.java delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/META-INF/MANIFEST.MF delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/index.jsp delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/newcss.css delete mode 100644 appserver/tests/paas/multiple-spe-test/spetest/src/test/java/org/glassfish/tests/paas/spetest/MultipleSPETest.java delete mode 100755 appserver/tests/paas/native_lb_setup.sh delete mode 100755 appserver/tests/paas/native_setup.sh delete mode 100644 appserver/tests/paas/ovm_setup.sh delete mode 100644 appserver/tests/paas/pom.xml delete mode 100644 appserver/tests/paas/scale_service/README.txt delete mode 100644 appserver/tests/paas/scale_service/pom.xml delete mode 100644 appserver/tests/paas/scale_service/src/main/java/org/glassfish/tests/paas/scale_service/ScaleServicePaaSServlet.java delete mode 100644 appserver/tests/paas/scale_service/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/scale_service/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/scale_service/src/test/java/org/glassfish/tests/paas/scale_service/ScaleServicePaaSTest.java delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/README.txt delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/initsql.sql delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/pom.xml delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/src/main/java/org/glassfish/tests/paas/customdbname/CustomDBNameServlet.java delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/service_metadata/custom_db_name/src/test/java/org/glassfish/tests/paas/customdbname/CustomDBNameTest.java delete mode 100644 appserver/tests/paas/service_metadata/pom.xml delete mode 100644 appserver/tests/paas/service_metadata/provision_using_specified_template/README.txt delete mode 100644 appserver/tests/paas/service_metadata/provision_using_specified_template/pom.xml delete mode 100644 appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/java/org/glassfish/tests/paas/basic/BasicPaaSServlet.java delete mode 100644 appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/webapp/WEB-INF/glassfish-services.xml delete mode 100644 appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/webapp/WEB-INF/sun-web.xml delete mode 100644 appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/webapp/WEB-INF/web.xml delete mode 100644 appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/webapp/index.html delete mode 100644 appserver/tests/paas/service_metadata/provision_using_specified_template/src/test/java/org/glassfish/tests/paas/basic/BasicPaaSServiceMetadataTest.java delete mode 100755 appserver/tests/paas/setup.sh create mode 100644 appserver/tests/payara-samples/samples/formauth/src/test/resources/formauth.war delete mode 100644 appserver/tests/sse/basic/pom.xml delete mode 100644 appserver/tests/sse/basic/src/main/java/org/glassfish/sse/basic/ExceptionHandler.java delete mode 100644 appserver/tests/sse/basic/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/sse/basic/src/test/java/org/glassfish/tests/sse/basic/BasicTest.java delete mode 100644 appserver/tests/sse/videoplayer/README.txt delete mode 100644 appserver/tests/sse/videoplayer/pom.xml delete mode 100644 appserver/tests/sse/videoplayer/src/main/java/org/glassfish/sse/videoplayer/NotificationsHandler.java delete mode 100644 appserver/tests/sse/videoplayer/src/main/java/org/glassfish/sse/videoplayer/PlayerServlet.java delete mode 100644 appserver/tests/sse/videoplayer/src/main/java/org/glassfish/sse/videoplayer/PlayingStatus.java delete mode 100644 appserver/tests/sse/videoplayer/src/main/webapp/WEB-INF/beans.xml delete mode 100644 appserver/tests/sse/videoplayer/src/main/webapp/app.js delete mode 100644 appserver/tests/sse/videoplayer/src/main/webapp/index.html delete mode 100644 appserver/tests/sse/videoplayer/src/test/java/org/glassfish/tests/videoplayer/VideoPlayerTest.java diff --git a/appserver/tests/admingui/README.md b/appserver/tests/admingui/README.md deleted file mode 100644 index 3f345422511..00000000000 --- a/appserver/tests/admingui/README.md +++ /dev/null @@ -1,36 +0,0 @@ -#How to run the dev test cases -================================ -#Annotation: -All of the test cases can't be ran on the windows platform because -the firefox can't support the JSF based on the windows platform very well. -If you want to ran the tests, please check out all of the codes to the linux, ubuntu or -mac platform. - -#Preparation and Steps: -1). Download the firefox and install it, On my platform, I have downloaded and installed -the firefox version 19.0 - -2). Download the selenium IDE plugin and installed, On my platform, I have installed the -selenium IDE 2.4.0 - -3). Checkout the the tests from the github(https://github.com/LvSongping/GLASSFISH_ADMIN_CONSOLE_DEVTESTS/tree/master/auto-test) -to your hard disk. - -4). Before ran the tests, you need to restart the glassfish domain and try to access admin console's page(http://localhost:4848/common/index.jsf) -to make sure the GUI is available - -5). Open a terminal window and access to the root directory of auto-tests, Then execute the command -as "mvn test" to run all of the tests - -6). If some of the test cases are failed, you can also rerun the error or failed test cases -using the command as "mvn test -Dtest=[ClassName]#[MethodName]" to confirm related test -cases.(if the failure test cases passed at the second time, we can regard the failure test -case as a passed case) - -#Note: -The expected test results listed as follows: -test cases number:110 -passed number:110 -failed number:0 -error number:0 - diff --git a/appserver/tests/admingui/auto-test/pom.xml b/appserver/tests/admingui/auto-test/pom.xml deleted file mode 100644 index 74173448518..00000000000 --- a/appserver/tests/admingui/auto-test/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.admingui - admingui - 4.1-SNAPSHOT - ../pom.xml - - console-auto-tests - Admin Console Auto Tests - This module contains the dev tests for the admin console - - - - org.seleniumhq.selenium - selenium-java - - - junit - junit - test - - - - - install - - - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - maven-clean-plugin - - - auto-clean - initialize - - clean - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - package-tests - package - - test-jar - - - - - - - true - - - - - - - - diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AdminObjectTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AdminObjectTest.java deleted file mode 100644 index d56c28e897e..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AdminObjectTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.admingui.devtests; - -import static org.junit.Assert.assertEquals; -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -/** - * It is used test the Connector-->admin object resource page - * @author Jeremy Lv - * - */ -public class AdminObjectTest extends BaseSeleniumTestClass { - - @Test - public void testAdminObjectResources() throws Exception { - final String resName = "adminObject" + generateRandomString(); - final String description = "Admin Object Resource - " + resName; - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - //Go to Admin Object Resources Page. - clickAndWait("treeForm:tree:resources:Connectors:adminObjectResources:adminObjectResources_link"); - - //New Admin Object Resources - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - setFieldValue("form:propertySheet:propertSectionTextField:nameNew:name", resName); - setFieldValue("form:propertySheet:propertSectionTextField:descriptionProp:descAdaptor", description); - - int emptyCount = getTableRowCountByValue("form:basicTable", "", "col3:col1St", false); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addButton"); - - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - count = count - emptyCount; - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resName, "col1"); - assertEquals(resName, getText(prefix + "col1:link")); - assertEquals(description, getText(prefix + "col4:typeDesc")); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //test disable button - isElementPresent("propertyForm:resourcesTable:topActionsGroup1:newButton"); - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button1"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", resName); - } - - @Test - public void testAdminObjectResourcesWithTargets() { - final String resName = "adminObject" + generateRandomString(); - final String description = "Admin Object Resource - " + resName; - final String instanceName = "standalone" + generateRandomString(); - - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(instanceName); - - //Go to Admin Object Resources Page. - clickAndWait("treeForm:tree:resources:Connectors:adminObjectResources:adminObjectResources_link"); - - //New Admin Object Resources - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - setFieldValue("form:propertySheet:propertSectionTextField:nameNew:name", resName); - setFieldValue("form:propertySheet:propertSectionTextField:descriptionProp:descAdaptor", description); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addButton"); - - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - - int emptyCount = getTableRowCountByValue("form:basicTable", "", "col3:col1St", false); - count = count - emptyCount; - - Select select = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select.selectByVisibleText(instanceName); - select.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resName, "col1"); - assertEquals(resName, getText(prefix + "col1:link")); - assertEquals(description, getText(prefix + "col4:typeDesc")); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //test disable button - isElementPresent("propertyForm:resourcesTable:topActionsGroup1:newButton"); - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - //test manage target - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(clickId); - clickAndWait("propertyForm:resEditTabs:targetTab"); - clickAndWait("propertyForm:targetTable:topActionsGroup1:manageTargetButton"); - Select select1 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_selected"))); - select1.selectByVisibleText(instanceName); - select1.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton"); - clickByIdAction("form:propertyContentPage:topButtons:saveButton"); - - // Delete admin object resource - clickAndWait("treeForm:tree:resources:Connectors:adminObjectResources:adminObjectResources_link"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", resName); - - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AdminServiceTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AdminServiceTest.java deleted file mode 100644 index 64c10c885d3..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AdminServiceTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class AdminServiceTest extends BaseSeleniumTestClass { - - @Test - public void testEditJmxConntector() { - gotoDasPage(); - String address = generateRandomNumber(255)+"."+generateRandomNumber(255)+"."+generateRandomNumber(255)+"."+generateRandomNumber(255); - clickAndWait("treeForm:tree:configurations:server-config:adminService:adminService_link"); - if (!driver.findElement(By.id("form1:propertySheet:propertySheetSection:SecurityProp:Security")).isSelected()) - clickByIdAction("form1:propertySheet:propertySheetSection:SecurityProp:Security"); - setFieldValue("form1:propertySheet:propertySheetSection:AddressProp:Address", address); - int count = addTableRow("form1:basicTable","form1:basicTable:topActionsGroup1:addSharedTableButton"); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:adminService:adminService_link"); - assertTrue(driver.findElement(By.id("form1:propertySheet:propertySheetSection:SecurityProp:Security")).isSelected()); - assertEquals(address, getValue("form1:propertySheet:propertySheetSection:AddressProp:Address", "value")); - assertTableRowCount("form1:basicTable", count); - - //delete the property used to test - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:adminService:adminService_link"); - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - - @Test - public void testSsl() { - gotoDasPage(); - final String nickname = "nickname"+generateRandomString(); - final String keystore = "keystore"+generateRandomString()+".jks"; - final String maxCertLength = Integer.toString(generateRandomNumber(10)); - - clickAndWait("treeForm:tree:configurations:server-config:adminService:adminService_link"); - clickAndWait("form1:jmxConnectorTab:jmxSSLEdit"); - - waitForElementPresent("TtlTxt_sun4", "SSL"); - if(driver.findElement(By.id("propertyForm:propertySheet:propertySheetSection:SSL3Prop:SSL3")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:propertySheetSection:SSL3Prop:SSL3"); - } - if(driver.findElement(By.id("propertyForm:propertySheet:propertySheetSection:TLSProp:TLS")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:propertySheetSection:TLSProp:TLS"); - } - if(!driver.findElement(By.id("propertyForm:propertySheet:propertySheetSection:ClientAuthProp:ClientAuth")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:propertySheetSection:ClientAuthProp:ClientAuth"); - } - setFieldValue("propertyForm:propertySheet:propertySheetSection:CertNicknameProp:CertNickname", nickname); - setFieldValue("propertyForm:propertySheet:propertySheetSection:keystore:keystore", keystore); - setFieldValue("propertyForm:propertySheet:propertySheetSection:maxCertLength:maxCertLength", maxCertLength); -// clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:adminService:adminService_link"); - clickAndWait("form1:jmxConnectorTab:jmxSSLEdit"); - - assertEquals(false, driver.findElement(By.id("propertyForm:propertySheet:propertySheetSection:SSL3Prop:SSL3")).isSelected()); - assertEquals(false, driver.findElement(By.id("propertyForm:propertySheet:propertySheetSection:TLSProp:TLS")).isSelected()); - assertEquals(true, driver.findElement(By.id("propertyForm:propertySheet:propertySheetSection:ClientAuthProp:ClientAuth")).isSelected()); - assertEquals(nickname, getValue("propertyForm:propertySheet:propertySheetSection:CertNicknameProp:CertNickname", "value")); - assertEquals(keystore, getValue("propertyForm:propertySheet:propertySheetSection:keystore:keystore", "value")); - assertEquals(maxCertLength, getValue("propertyForm:propertySheet:propertySheetSection:maxCertLength:maxCertLength", "value")); - } - -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AppScopedResourcesTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AppScopedResourcesTest.java deleted file mode 100644 index 40642cb3680..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AppScopedResourcesTest.java +++ /dev/null @@ -1,507 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; - -import java.io.File; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * - * @author jeremy lv - */ -public class AppScopedResourcesTest extends BaseSeleniumTestClass { - - private static final String ELEMENT_EARAPP_NAME = "form:ear:psection:nameProp:appName"; - private static final String ELEMENT_UNDEPLOY_BUTTON = "propertyForm:deployTable:topActionsGroup1:button1"; - private static final String ELEMENT_DEPLOY_TABLE = "propertyForm:deployTable"; - private static final String ELEMENT_UPLOAD_BUTTON = "form:title:topButtons:uploadButton"; - private static final String ELEMENT_FILE_FIELD = "form:sheet1:section1:prop1:fileupload"; - private static final String ELEMENT_APPLICATIONS = "treeForm:tree:applications:applications_link"; - private static final String ELEMENT_APPLICATION_RESOURCES_TAB = "propertyForm:appGeneralTabs:resourcesTab"; - private static final String ELEMENT_APP_RESOURCES_TABLE = "propertyForm:appScopedResources"; - - @Test - public void testAppScopedResApp() { - final String applicationName = generateRandomString(); - deployApp(applicationName); - undeployApp(applicationName); - } - - @Test - public void testJdbcAppScopedresources() { - final String applicationName = generateRandomString(); - try { - deployApp(applicationName); - - testJDBCPool(applicationName, "jdbcPool", "app"); - testJDBCPool(applicationName, "jdbcPool", "module"); - - testJDBCResource(applicationName, "jdbcRes", "app"); - testJDBCResource(applicationName, "jdbcRes", "module"); - - undeployApp(applicationName); - }catch(Exception e) { - undeployApp(applicationName); - } - } - - @Test - public void testConnectorAppScopedresources() { - final String applicationName = generateRandomString(); - try{ - deployApp(applicationName); - - testConnectorPool(applicationName, "connectorPool", "app"); - testConnectorPool(applicationName, "connectorPool", "module"); - - testConnectorResource(applicationName, "connectorRes", "app"); - testConnectorResource(applicationName, "connectorRes", "module"); - - testAdminObjectResource(applicationName, "jms/adminObjectRes", "app"); - testAdminObjectResource(applicationName, "jms/adminObjectRes", "module"); - - testWorkSecurityMap(applicationName, "workSecurityMap", "app"); - testWorkSecurityMap(applicationName, "workSecurityMap", "module"); - - undeployApp(applicationName); - }catch(Exception e) { - undeployApp(applicationName); - } - } - - @Test - public void testJndiAppScopedresources() { - final String applicationName = generateRandomString(); - try{ - deployApp(applicationName); - - testCustomResource(applicationName, "customRes", "app"); - testCustomResource(applicationName, "customRes", "module"); - - testExternalResource(applicationName, "externalRes", "app"); - testExternalResource(applicationName, "externalRes", "module"); - - undeployApp(applicationName); - }catch(Exception e) { - undeployApp(applicationName); - } - } - - @Test - public void testJavaMailAppScopedresources() { - final String applicationName = generateRandomString(); - try{ - deployApp(applicationName); - - testMailResource(applicationName, "mailRes", "app"); - testMailResource(applicationName, "mailRes", "module"); - - undeployApp(applicationName); - }catch(Exception e) { - undeployApp(applicationName); - } - } - - @Test - public void testResourceAdapterConfigAppScopedresources() { - final String applicationName = generateRandomString(); - try{ - deployApp(applicationName); - - testResourceAdapterConfig(applicationName, "jmsra"); - - undeployApp(applicationName); - }catch(Exception e) { - undeployApp(applicationName); - } - } - - @Test - public void testMonitoringAppScopedresources() { - final String applicationName = generateRandomString(); - try{ - deployApp(applicationName); - - monitoringAppScopedResource("connectorPool", "module"); - monitoringAppScopedResource("jdbcPool", "module"); - - undeployApp(applicationName); - }catch(Exception e) { - undeployApp(applicationName); - } - } - - public void deployApp(String applicationName) { - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - clickAndWait("treeForm:tree:applications:applications_link"); - sleep(1000); - int initCount = getTableRowCount(ELEMENT_DEPLOY_TABLE); - if(initCount != 0){ - clickByIdAction("propertyForm:deployTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction(ELEMENT_UNDEPLOY_BUTTON); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - waitforBtnDisable(ELEMENT_UNDEPLOY_BUTTON); - } - sleep(1000); - int preCount = getTableRowCount(ELEMENT_DEPLOY_TABLE); - - //start to deploy applications - driver.get(baseUrl + "common/applications/uploadFrame.jsf"); - driver.findElement(By.id("form:sheet1:section1:prop1:uploadRdBtn:uploadRdBtn_label")); - File war = new File("src/test/resources/JavaEEApp.ear"); - driver.findElement(By.id(ELEMENT_FILE_FIELD)).sendKeys(war.getAbsoluteFile().toString()); - - assertEquals("JavaEEApp", getValue(ELEMENT_EARAPP_NAME, "value")); - - setFieldValue(ELEMENT_EARAPP_NAME, applicationName); - clickAndWait(ELEMENT_UPLOAD_BUTTON); - - //add some sleep time here to wait for the webdriver element located - sleep(10000); - gotoDasPage(); - clickAndWait("treeForm:tree:applications:applications_link"); - sleep(1000); - int postCount = getTableRowCount(ELEMENT_DEPLOY_TABLE); - assertTrue (preCount < postCount); - } - - private void undeployApp(String applicationName) { - // Undeploy application - gotoDasPage(); - clickAndWait("treeForm:tree:applications:applications_link"); - int preCount = getTableRowCount(ELEMENT_DEPLOY_TABLE); - int appCount = getTableRowCountByValue(ELEMENT_DEPLOY_TABLE, applicationName, "col1"); - if (appCount == 0) { - return; - } - String prefix = getTableRowByValue(ELEMENT_DEPLOY_TABLE, applicationName, "col1"); - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait(ELEMENT_UNDEPLOY_BUTTON); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - waitforBtnDisable(ELEMENT_UNDEPLOY_BUTTON); - sleep(1000); - int postUndeployCount = this.getTableRowCount(ELEMENT_DEPLOY_TABLE); - assertTrue (preCount > postUndeployCount); - } - - private void goToApplicationResourcesTab(String appName) { - clickAndWait(ELEMENT_APPLICATIONS); - - String prefix = getTableRowByValue(ELEMENT_DEPLOY_TABLE, appName, "col1"); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit Application"); - clickAndWait(ELEMENT_APPLICATION_RESOURCES_TAB); - waitForElementPresent("TtlTxt_sun4", "Application Scoped Resources"); - } - - public String getResName(String resName, String appScope) { - if(appScope.equals("app")) { - resName = "java:app/" + resName; - } else if(appScope.equals("module")) { - resName = "java:module/" + resName; - } - return resName; - } - - private void testJDBCPool(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //JDBC Pool general page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit JDBC Connection Pool"); - setFieldValue("propertyForm:sheet:generalSheet:descProp:desc", resName+" description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - //JDBC Pool Advanced Page - clickAndWait("propertyForm:jdbcPoolSet:advanceTab"); - waitForElementPresent("TtlTxt_sun4", "Edit JDBC Connection Pool Advanced Attributes"); - setFieldValue("propertyForm:propertySheet:connectionPropertySheet:p1:va", "1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - //JDBC Pool Properties - clickAndWait("propertyForm:jdbcPoolSet:propertyTab"); - waitForElementPresent("TtlTxt_sun4", "Edit JDBC Connection Pool Properties"); - sleep(1000); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - } - - private void testJDBCResource(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //JDBC Resource Edit Page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit JDBC Resource"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:descProp:desc", resName+" description"); - sleep(1000); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - } - - private void testCustomResource(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //Custom Resource Edit Page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit Custom Resource"); - setFieldValue("form1:propertySheet:propertSectionTextField:descProp:desc", resName+" description"); - sleep(5000); - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("form1:basicTable", count); - - clickAndWait("form1:propertyContentPage:topButtons:cancelButton"); - } - - private void testExternalResource(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //JNDI Enternal Resource Edit Page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit External Resource"); - setFieldValue("form:propertySheet:propertSectionTextField:descProp:desc", resName+" description"); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("form:basicTable", count); - - clickAndWait("form:propertyContentPage:topButtons:cancelButton"); - } - - private void testMailResource(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //Mail Resource Edit Page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit JavaMail Session"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:descProp:desc", resName+" description"); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - } - - private void testWorkSecurityMap(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //Work Security Map Edit Page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit Work Security Map"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:descriptionProp:descAdaptor", resName+" description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - } - - private void testConnectorPool(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //Connector Pool general page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit Connector Connection Pool"); - setFieldValue("propertyForm:propertySheet:generalPropertySheet:descProp:desc", resName+" description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - //Connector Pool Advanced Page - clickAndWait("propertyForm:connectorPoolSet:advanceTab"); - waitForElementPresent("TtlTxt_sun4", "Edit Connector Connection Pool Advanced Attributes"); - setFieldValue("propertyForm:connectionPropertySheet:p1:va", "1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - //Connector Pool Properties - clickAndWait("propertyForm:connectorPoolSet:propertyTab"); - waitForElementPresent("TtlTxt_sun4", "Edit Connector Connection Pool Properties"); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - } - - private void testConnectorResource(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //Connector Resource Edit Page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit Connector Resource"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:descProp:desc", resName+" description"); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - } - - private void testResourceAdapterConfig(String appName, String resName) { - goToApplicationResourcesTab(appName); - java.util.List resAdapterConfigIds = getTableRowsByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName"); - //Resource Adapter config Edit Page - for (String resAdapterConfigId : resAdapterConfigIds) { - goToApplicationResourcesTab(appName); - String clickId = resAdapterConfigId + ":resName:resNameCol"; - clickAndWait(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit Resource Adapter Config"); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - } - } - - private void testAdminObjectResource(String appName, String resName, String appScope) { - resName = getResName(resName, appScope); - goToApplicationResourcesTab(appName); - //Admin Object Resource Edit Page - String prefix = getTableRowByValue(ELEMENT_APP_RESOURCES_TABLE, resName, "resName:resNameCol"); - String clickId = prefix + "resName:resNameCol"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4", "Edit Admin Object Resource"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:descriptionProp:descAdaptor", resName+" description"); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - } - - private void monitoringAppScopedResource(String resName, String appScope) { - MonitoringTest monitorTest = new MonitoringTest(); - resName = getResName(resName, appScope); - monitorTest.appScopedResourcesMonitoring("server", "server", resName); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ApplicationTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ApplicationTest.java deleted file mode 100644 index 4906cd3c267..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ApplicationTest.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; - -import java.io.File; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -/** - * - * @author Jeremy Lv - * - */ -public class ApplicationTest extends BaseSeleniumTestClass { - - private static final String ELEMENT_STATUS = "propertyForm:propertySheet:propertSectionTextField:statusProp:status"; - private static final String ELEMENT_APP_NAME = "form:war:psection:nameProp:appName"; - private static final String ELEMENT_CONTEXT_ROOT = "form:war:psection:cxp:ctx"; - private static final String ELEMENT_UNDEPLOY_BUTTON = "propertyForm:deployTable:topActionsGroup1:button1"; - private static final String ELEMENT_DEPLOY_TABLE = "propertyForm:deployTable"; - private static final String ELEMENT_ENABLE_BUTTON = "propertyForm:deployTable:topActionsGroup1:button2"; - private static final String ELEMENT_CANCEL_BUTTON = "propertyForm:propertyContentPage:topButtons:cancelButton"; - private static final String ELEMENT_DISABLE_BUTTON = "propertyForm:deployTable:topActionsGroup1:button3"; - private static final String ELEMENT_UPLOAD_BUTTON = "form:title:topButtons:uploadButton"; - private static final String ELEMENT_FILE_FIELD = "form:sheet1:section1:prop1:fileupload"; - - //The following test will pass ONLY if there is no cluster or standalone instance. This is for "PE" profile - @Test - public void testDeployWar() { - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - final String applicationName = generateRandomString(); - clickAndWait("treeForm:tree:applications:applications_link"); - sleep(1000); - int initCount = getTableRowCount(ELEMENT_DEPLOY_TABLE); - if(initCount != 0){ - clickByIdAction("propertyForm:deployTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction(ELEMENT_UNDEPLOY_BUTTON); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - waitforBtnDisable(ELEMENT_UNDEPLOY_BUTTON); - } - sleep(1000); - int preCount = getTableRowCount(ELEMENT_DEPLOY_TABLE); - - //start to deploy applications - driver.get(baseUrl + "common/applications/uploadFrame.jsf"); - driver.findElement(By.id("form:sheet1:section1:prop1:uploadRdBtn:uploadRdBtn_label")); - File war = new File("src/test/resources/test.war"); - driver.findElement(By.id(ELEMENT_FILE_FIELD)).sendKeys(war.getAbsoluteFile().toString()); - - assertEquals("test", getValue(ELEMENT_CONTEXT_ROOT, "value")); - assertEquals("test", getValue(ELEMENT_APP_NAME, "value")); - - setFieldValue(ELEMENT_CONTEXT_ROOT, applicationName); - setFieldValue(ELEMENT_APP_NAME, applicationName); - clickAndWait(ELEMENT_UPLOAD_BUTTON); - - //add some sleep time here to wait for the webdriver element located - sleep(10000); - gotoDasPage(); - clickAndWait("treeForm:tree:applications:applications_link"); - sleep(1000); - int postCount = getTableRowCount(ELEMENT_DEPLOY_TABLE); - assertTrue (preCount < postCount); - - // Disable application - String prefix = getTableRowByValue(ELEMENT_DEPLOY_TABLE, applicationName, "col1"); - assertEquals(applicationName, getText(prefix + "col1:link")); - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait(ELEMENT_DISABLE_BUTTON); - waitforBtnDisable(ELEMENT_DISABLE_BUTTON); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertFalse(driver.findElement(By.id(ELEMENT_STATUS)).isSelected()); - clickAndWait(ELEMENT_CANCEL_BUTTON); - - // Enable Application - clickByIdAction(selectId); - clickAndWait(ELEMENT_ENABLE_BUTTON); - waitforBtnDisable(ELEMENT_ENABLE_BUTTON); - clickByIdAction(clickId); - assertTrue(driver.findElement(By.id(ELEMENT_STATUS)).isSelected()); - clickAndWait(ELEMENT_CANCEL_BUTTON); - - // Undeploy application - clickByIdAction(selectId); - clickAndWait(ELEMENT_UNDEPLOY_BUTTON); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - waitforBtnDisable(ELEMENT_UNDEPLOY_BUTTON); - sleep(1000); - int postUndeployCount = getTableRowCount(ELEMENT_DEPLOY_TABLE); - assertTrue (preCount == postUndeployCount); - } - - @Test - public void testApplicationConfiguration() { - gotoDasPage(); - final String adminTimeout = Integer.toString(generateRandomNumber(100)); - clickAndWait("treeForm:tree:nodes:nodes_link"); - clickAndWait("propertyForm:domainTabs:appConfig"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:AdminTimeoutProp:AdminTimeout", adminTimeout); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertEquals(adminTimeout, getValue("propertyForm:propertySheet:propertSectionTextField:AdminTimeoutProp:AdminTimeout", "value")); - } - - @Test - public void testDomainAttributes() { - gotoDasPage(); - clickAndWait("treeForm:tree:nodes:nodes_link"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:localeProp:Locale", "en_UK"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertEquals("en_UK", getValue("propertyForm:propertySheet:propertSectionTextField:localeProp:Locale", "value")); - } - - @Test - public void testDomainLogs() { - gotoDasPage(); - clickAndWait("treeForm:tree:nodes:nodes_link"); - clickAndWait("propertyForm:domainTabs:domainLogs"); - // click download, but ignore it (selenium can't interect with Save File dialog - String winHandleBefore = driver.getWindowHandle(); - clickByIdAction("form:propertyContentPage:topButtons:collectLogFiles"); - for(String winHandle : driver.getWindowHandles()){ - driver.switchTo().window(winHandle); - } - driver.close(); - driver.switchTo().window(winHandleBefore); - // if above is broken, assertion will fail - assertEquals("Domain Logs", driver.findElement(By.className("TtlTxt_sun4")).getText()); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AvailabilityServiceTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AvailabilityServiceTest.java deleted file mode 100644 index 38c012c4d12..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/AvailabilityServiceTest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; -/** - * - * @author Jeremy Lv - * - */ -public class AvailabilityServiceTest extends BaseSeleniumTestClass { - public static final String ID_AVAILABILITY_SERVICE_TREE_NODE = "treeForm:tree:configurations:default-config:availabilityService:availabilityService_link"; - private static final String ID_DEFAULT_CONFIG_TURNER = "treeForm:tree:configurations:default-config:default-config_turner:default-config_turner_image"; - - @Test - public void testAvailabilityService() { - // Expand node - gotoDasPage(); - clickAndWait(ID_DEFAULT_CONFIG_TURNER); - clickAndWait(ID_AVAILABILITY_SERVICE_TREE_NODE); - - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", generateRandomString()); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", count); - - //Delete the property used to test after the test finished - gotoDasPage(); - clickAndWait(ID_AVAILABILITY_SERVICE_TREE_NODE); - clickByIdAction("propertyForm:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:basicTable:topActionsGroup1:button1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - -// //TODO:the test need to be finished after the issue of GLASSFISH-20810 had to be resolved! -// @Test -// public void testWebContainerAvailability() { -// gotoDasPage(); -// clickAndWait(ID_DEFAULT_CONFIG_TURNER); -// clickAndWait(ID_AVAILABILITY_SERVICE_TREE_NODE); -// clickAndWait("propertyForm:availabilityTabs:webAvailabilityTab"); -// -// int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); -// sleep(500); -// setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", generateRandomString()); -// sleep(500); -// setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", generateRandomString()); -// sleep(500); -// setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", generateRandomString()); -// clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); -// assertTableRowCount("propertyForm:basicTable", count); -// } -// -// //TODO:the test need to be finished after the issue of GLASSFISH-20810 had to be resolved! -// @Test -// public void testEjbContainerAvailability() { -// gotoDasPage(); -// clickAndWait(ID_DEFAULT_CONFIG_TURNER); -// clickAndWait(ID_AVAILABILITY_SERVICE_TREE_NODE); -// clickAndWait("propertyForm:availabilityTabs:ejbAvailabilityTab"); -// -// int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); -// sleep(500); -// setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", generateRandomString()); -// sleep(500); -// setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", generateRandomString()); -// sleep(500); -// setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", generateRandomString()); -// clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); -// assertTableRowCount("propertyForm:basicTable", count); -// -// } - - @Test - public void testJMSAvailability() { - final String clusterName = "cluster" + generateRandomString(); - final String DB_VENDOR = "mysql"; - final String DB_USER = generateRandomString(); - final String DB_URL = "jdbc:mysql://hostname:portno/dbname?password=" + generateRandomString(); - final String DB_PASSWORD = generateRandomString(); - - ClusterTest ct = new ClusterTest(); - ct.createCluster(clusterName); - - clickAndWait("treeForm:tree:configurations:" + clusterName + "-config:availabilityService:availabilityService_link"); - clickAndWait("propertyForm:availabilityTabs:jmsAvailabilityTab"); - - if (!driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:AvailabilityEnabledProp:avail")).isSelected()) { - clickAndWait("propertyForm:propertySheet:propertSectionTextField:AvailabilityEnabledProp:avail:avail_label"); - } - - isElementPresent("propertyForm:propertySheet:propertSectionTextField:ConfigStoreTypeProp:ConfigStoreType"); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:ConfigStoreTypeProp:ConfigStoreType"))); - select.selectByVisibleText("masterbroker"); - isElementPresent("propertyForm:propertySheet:propertSectionTextField:MessageStoreTypeProp:MessageStoreType"); - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:MessageStoreTypeProp:MessageStoreType"))); - select1.selectByVisibleText("file"); - - setFieldValue("propertyForm:propertySheet:propertSectionTextField:DbVendorProp:DbVendor", DB_VENDOR); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:DbUserNameProp:DbUserName", DB_USER); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:DbPasswordProp:DbPassword", DB_PASSWORD); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:DbUrlProp:DbUrl", DB_URL); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", generateRandomString()); - - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + clusterName + "-config:availabilityService:availabilityService_link"); - clickAndWait("propertyForm:availabilityTabs:jmsAvailabilityTab"); - -// //The availability service in JMS Availability tap can't be enabled, seems this is a bug need to be resolved first! -// assertTrue(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:AvailabilityEnabledProp:avail")).isSelected()); - - assertEquals(DB_VENDOR, getValue("propertyForm:propertySheet:propertSectionTextField:DbVendorProp:DbVendor", "value")); - assertEquals(DB_USER, getValue("propertyForm:propertySheet:propertSectionTextField:DbUserNameProp:DbUserName", "value")); - assertEquals(DB_PASSWORD, getValue("propertyForm:propertySheet:propertSectionTextField:DbPasswordProp:DbPassword", "value")); - assertEquals(DB_URL, getValue("propertyForm:propertySheet:propertSectionTextField:DbUrlProp:DbUrl", "value")); - assertTableRowCount("propertyForm:basicTable", count); - - //Delete the property used to test after the test finished - clickByIdAction("propertyForm:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:basicTable:topActionsGroup1:button1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - ct.deleteAllCluster(); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/BaseSeleniumTestClass.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/BaseSeleniumTestClass.java deleted file mode 100644 index 0e543bf107b..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/BaseSeleniumTestClass.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -package org.glassfish.admingui.devtests; - -import static org.junit.Assert.fail; - -import java.math.BigInteger; -import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.openqa.selenium.Alert; -import org.openqa.selenium.By; -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.firefox.FirefoxDriver; - -import com.thoughtworks.selenium.Selenium; -/** - * - * @author Jeremy Lv - * - */ -public class BaseSeleniumTestClass { - - protected static WebDriver driver; - public String baseUrl = "http://localhost:4848/"; - public StringBuffer verificationErrors = new StringBuffer(); - public boolean acceptNextAlert = true; - protected static Selenium selenium; - protected static final int TIMEOUT = 90; - public static final int TIMEOUT_CALLBACK_LOOP = 1000; - - protected static final Logger logger = Logger.getLogger(BaseSeleniumTestClass.class.getName()); - public static final String TRIGGER_COMMON_TASKS = "Other Tasks"; - - @Before - public void setUp() throws Exception { - driver = new FirefoxDriver(); - driver.manage().timeouts().implicitlyWait(90, TimeUnit.SECONDS); - } - - @After - public void tearDown() throws Exception { - driver.quit(); - String verificationErrorString = verificationErrors.toString(); - if (!"".equals(verificationErrorString)) { - fail(verificationErrorString); - } - } - - // ************************************************************************* - // Wrappers for Selenium API - // ************************************************************************* - - protected String generateRandomString() { - SecureRandom random = new SecureRandom(); - - // prepend a letter to insure valid JSF ID, which is causing failures in some areas - return "a" + new BigInteger(130, random).toString(16); - } - - protected int generateRandomNumber() { - Random r = new Random(); - return Math.abs(r.nextInt()) + 1; - } - - protected String getTableRowByValue(String tableId, String value, String valueColId) { - try { - int row = 0; - while (true) { // iterate over any rows - // Assume one row group for now and hope it doesn't bite us - String text = getText(tableId + ":rowGroup1:" + row + ":" + valueColId); - if (text.equals(value)) { - return tableId + ":rowGroup1:" + row + ":"; - } - row++; - } - } catch (Exception e) { - Assert.fail("The specified row was not found: " + value); - return ""; - } - } - - protected String getTableRowByVal(String tableId, String value, String valueColId) { - try { - int row = 0; - while (true) { // iterate over any rows - // Assume one row group for now and hope it doesn't bite us - String text = getValue(tableId + ":rowGroup1:" + row + ":" + valueColId, "value"); - if (text.equals(value)) { - return tableId + ":rowGroup1:" + row + ":"; - } - row++; - } - } catch (Exception e) { - Assert.fail("The specified row was not found: " + value); - return ""; - } - } - - /** - * Gets the text of an element. - * @param elem - * @return - */ - public String getText(String elem) { - return driver.findElement(By.id(elem)).getText(); - } - - /** - * Gets the value of an element. - * @param elem - * @return - */ - public String getValue(String elem, String attribute) { - return driver.findElement(By.id(elem)).getAttribute(attribute); - } - - public void sleep(int milli){ - try { - Thread.sleep(milli); - } catch (InterruptedException e) { - } - } - - /** - * Types the specified text into the requested element - * @param elem - * @param text - */ - public void setFieldValue(String elem, String text) { - driver.findElement(By.id(elem)).clear(); - driver.findElement(By.id(elem)).sendKeys(text); - } - - public void clickByIdAction(String idName){ - driver.findElement(By.id(idName)).click(); - } - - public void clearByIdAction(String idName){ - driver.findElement(By.id(idName)).clear(); - } - - public void sendKeysByIdAction(String idName, String name){ - driver.findElement(By.id(idName)).sendKeys(name); - } - - protected int addTableRow(String tableId, String buttonId) { - return addTableRow(tableId, buttonId, "Additional Properties"); - } - - protected int addTableRow(String tableId, String buttonId, String countLabel) { - int count = getTableRowCount(tableId); - clickAndWait(buttonId); - return ++count; - } - - protected int getTableRowCount(String id) { - String text = getText(id); - int count = Integer.parseInt(text.substring(text.indexOf("(") + 1, text.indexOf(")"))); - return count; - } - - protected void clickAndWait(String id) { - insureElementIsVisible(id); - clickByIdAction(id); - } - - private void insureElementIsVisible (final String id) { - if (!id.contains("treeForm:tree")) { - return; - } - - try { - WebElement element = (WebElement) driver.findElement(By.id(id)); - //driver.findElement(By.id(id)); - if (element.isDisplayed()) { - return; - } - } catch (StaleElementReferenceException sere) { - } - - final String parentId = id.substring(0, id.lastIndexOf(":")); - final WebElement parentElement = (WebElement) driver.findElement(By.id(parentId)); -// driver.findElement(By.id(parentId)); - if (!parentElement.isDisplayed()) { - insureElementIsVisible(parentId); - String grandParentId = parentId.substring(0, parentId.lastIndexOf(":")); - String nodeId = grandParentId.substring(grandParentId.lastIndexOf(":") + 1); - clickByIdAction(grandParentId + ":" + nodeId + "_turner"); - } - } - - protected void assertTableRowCount(String tableId, int count) { - Assert.assertEquals(count, getTableRowCount(tableId)); - } - - public void waitForAlertProcess(String className){ - try { - while(true){ - if (driver.findElement(By.className(className)).getText().indexOf("A long-running") != -1){ - break; - } - } - while (driver.findElement(By.className(className)).isDisplayed()) { - sleep(1000); - } - } catch (StaleElementReferenceException sere) { - } - } - - public String closeAlertAndGetItsText() { - try { - Alert alert = driver.switchTo().alert(); - String msg = alert.getText(); - if (acceptNextAlert) { - alert.accept(); - } else { - alert.dismiss(); - } - return msg; - } finally { - acceptNextAlert = true; - } - } - - public void isElementPresent(String idName){ - while(!driver.findElement(By.id(idName)).isDisplayed()){ - sleep(500); - } - } - - public void isCheckboxSelected(String checkbox){ - while(driver.findElement(By.id(checkbox)).isSelected()){ - sleep(500); - } - } - - public void isClassPresent(String className){ - while(!driver.findElement(By.className(className)).isDisplayed()){ - sleep(500); - } - } - - public void deleteRow(String delBtn,String tableId, String Name) { - String clickId = getTableRowByValue(tableId, Name, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(delBtn); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - - public void waitforBtnDisable(String btnId){ - while (driver.findElement(By.id(btnId)).isEnabled()){ - sleep(500); - } - } - - public void waitForButtonEnabled(String btnId){ - while (!driver.findElement(By.id(btnId)).isEnabled()){ - sleep(500); - } - } - - public boolean isTextPresent(String prefix, String name, String tableId){ - if (getTableRowCount(tableId) == 0) { - return false; - } - try { - if (!getText(prefix + "col1:link").equals(name)){ - return false; - } else - return true; - } catch (NoSuchElementException e){ - return false; - } - } - - protected int getTableRowCountByValue(String tableId, String value, String valueColId) { - return getTableRowCountByValue(tableId, value, valueColId, true); - } - - protected int getTableRowCountByValue(String tableId, String value, String valueColId, Boolean isLabel) { - int tableCount = getTableRowCount(tableId); - int selectedCount = 0; - try { - for (int i = 0; i < tableCount; i++) { - String text = ""; - if (isLabel) { - text = getText(tableId + ":rowGroup1:" + i + ":" + valueColId); - } else { - text = getValue(tableId + ":rowGroup1:" + i + ":" + valueColId, "value"); - } - if (text.equals(value)) { - selectedCount++; - } - } - } catch (Exception e) { - Assert.fail("The specified row was not found: " + value); - return 0; - } - return selectedCount; - } - - protected int generateRandomNumber(int max) { - Random r = new Random(); - return Math.abs(r.nextInt(max - 1)) + 1; - } - - public void gotoDasPage() { - driver.get(baseUrl + "common/index.jsf"); - } - - public void waitForElementPresent(String className, String value) { - while(!driver.findElement(By.className(className)).getText().equals(value)){ - sleep(500); - } - } - - protected List getTableRowsByValue(String tableId, String value, String valueColId) { - List rows = new ArrayList(); - try { - int row = 0; - while (true) { // iterate over any rows - // Assume one row group for now and hope it doesn't bite us - String text = getText(tableId + ":rowGroup1:" + row + ":" + valueColId); - if (text.contains(value)) { - rows.add(tableId + ":rowGroup1:" + row); - } - row++; - } - } catch (Exception e) { - } - - return rows; - } - - protected void selectTableRowByValue(String tableId, String value, String selectColId, String valueColId) { - List rows = getTableRowsByValue(tableId, value, valueColId); - for (String row : rows) { - // It seems this must be click for the JS to fire in the browser - driver.findElement(By.id(row + ":" + selectColId + ":select")).click(); - if (!driver.findElement(By.id(row + ":" + selectColId + ":select")).isSelected()){ - driver.findElement(By.id(row + ":" + selectColId + ":select")).click(); - } - } - } - - protected boolean isElementSaveSuccessful(String className, String msg){ - isClassPresent(className); - if (driver.findElement(By.className(className)).getText().equals(msg)) - return true; - else - return false; - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ClusterTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ClusterTest.java deleted file mode 100644 index cd02e709768..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ClusterTest.java +++ /dev/null @@ -1,500 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - - - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -/** -*The CLusterTest is used to test the cluster related pages -* @author Jeremy Lv -*/ -public class ClusterTest extends BaseSeleniumTestClass { - - public static final String ID_CLUSTERS_TABLE = "propertyForm:clustersTable"; - public static final String ID_INSTANCES_TABLE = "propertyForm:instancesTable"; - public static final String ID_CLUSTERS_DELETE_BTN = "propertyForm:clustersTable:topActionsGroup1:button1"; - public static final String ID_CLUSTERS_START_BTN = "propertyForm:clustersTable:topActionsGroup1:button2"; - public static final String ID_CLUSTERS_STOP_BTN = "propertyForm:clustersTable:topActionsGroup1:button3"; - public static final String ID_INSTANCES_START_BTN = "propertyForm:instancesTable:topActionsGroup1:button2"; - public static final String ID_INSTANCES_STOP_BTN = "propertyForm:instancesTable:topActionsGroup1:button3"; - - - //Case 1: - @Test - public void testClusterCreationAndDeletion() throws Exception { - String clusterName = "clusterName" + generateRandomString(); - String instanceName = "instanceName" + generateRandomString(); - createCluster(clusterName, instanceName); - try { - assertEquals(clusterName, getText("propertyForm:clustersTable:rowGroup1:0:col1:link")); - assertEquals(instanceName, getText("propertyForm:clustersTable:rowGroup1:0:col3:iLink")); - } catch (Error e) { - verificationErrors.append(e.toString()); - } - - //start to detete the cluster and verify whether the cluster can be delete successfully - String msg = deleteCluster(clusterName); - assertTrue(msg.matches("^Delete the selected clusters and their instances[\\s\\S]$")); - } - - //Case 2 - @Test - public void testStartAndStopClusterWithOneInstance() { - String clusterName = "clusterName" + generateRandomString(); - String instanceName = "instanceName" + generateRandomString(); - createCluster(clusterName, instanceName); - - // Verify cluster information in table - String prefix = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1"); - assertEquals(clusterName, getText(prefix + "col1:link")); - assertEquals(clusterName + "-config", getText(prefix + "col2:configlink")); - assertEquals(instanceName, getText(prefix + "col3:iLink")); - - // Start the cluster and verify - startSpecifiedCluster(ID_CLUSTERS_START_BTN, ID_CLUSTERS_TABLE, clusterName); - assertTrue(getText(prefix + "col3").endsWith("Running")); - - // Stop the cluster and verify - stopSpecifiedCluster(ID_CLUSTERS_START_BTN, ID_CLUSTERS_TABLE, clusterName); - assertTrue(getText(prefix + "col3").endsWith("Stopped")); - - - deleteCluster(clusterName); - } - - //Case 3 - @Test - public void testMigrateEjbTimers() { - String clusterName = "clusterName" + generateRandomString(); - String instanceName1 = "instanceName" + generateRandomString(); - String instanceName2 = "instanceName" + generateRandomString(); - createCluster(clusterName, instanceName1, instanceName2); - - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col1:link"; - clickByIdAction(clickId); - //Start cluster instance - startClusterInstance(instanceName1); - //start to test - startTestMigrateEjbTimers(); - //stop cluster instance - stopClusterInstance(instanceName1); - - deleteCluster(clusterName); - } - - //Case 4 - @Test - public void verifyClusterGeneralInformationPage() { - String clusterName = "clusterName" + generateRandomString(); - String instanceName1 = "instanceName" + generateRandomString(); - String instanceName2 = "instanceName" + generateRandomString(); - createCluster(clusterName, instanceName1, instanceName2); - - startVerifyClusterGeneralInformationPage(clusterName); - - deleteCluster(clusterName); - } - - //Case 5: - @Test - public void testClusterInstancesTab() { - String clusterName = "clusterName" + generateRandomString(); - String instanceName1 = "instanceName" + generateRandomString(); - String instanceName2 = "instanceName" + generateRandomString(); - createCluster(clusterName, instanceName1); - - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col1:link"; - clickByIdAction(clickId); - clickByIdAction("propertyForm:clusterTabs:clusterInst"); - //Check whether the instance is already created - assertEquals(instanceName1, getText(getTableRowByValue(ID_INSTANCES_TABLE, instanceName1, "col1") + "col1:link")); - - clickByIdAction("propertyForm:instancesTable:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:NameTextProp:NameText", instanceName2); - clickByIdAction("propertyForm:propertyContentPage:topButtons:newButton"); - - //Check whether the instance is already created - assertEquals(instanceName2, getText(getTableRowByValue(ID_INSTANCES_TABLE, instanceName2, "col1") + "col1:link")); - - deleteCluster(clusterName); - } - - //Case 6 - @Test - public void testProperties() { - String clusterName = "clusterName" + generateRandomString(); - String instanceName1 = "instanceName" + generateRandomString(); - createCluster(clusterName, instanceName1); - - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col1:link"; - assertEquals(clusterName, getText(clickId)); - - // Go to properties tab - clickByIdAction(clickId); - clickByIdAction("propertyForm:clusterTabs:clusterProps"); - clickByIdAction("propertyForm:clusterSysPropsPage:topButtons:saveButton"); - assertTrue(driver.findElement(By.className("middle_sun4")).getText().equals("New values successfully saved.")); - - //Go to cluster properties - clickByIdAction("propertyForm:clusterTabs:clusterProps:clusterInstanceProps"); - int clusterPropCount = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - - //verify the property had been saved - assertTableRowCount("propertyForm:basicTable", clusterPropCount); - - deleteCluster(clusterName); - } - - //Case 7 - @Test - public void testClusterWithJmsOptions() { - String clusterName = "cluster" + generateRandomString(); - gotoClusterPage(); - clickByIdAction("propertyForm:clustersTable:topActionsGroup1:newButton"); - sendKeysByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText", clusterName); - clickByIdAction("propertyForm:propertySheet:propertySectionTextField:jmsConfigTypeProp:optCustom:optCustom_label"); - sleep(1000); - clickByIdAction("propertyForm:jmsTypePropertySheet:jmsTypeSection:jmsTypeProp:optLocal"); - clickByIdAction("propertyForm:jmsPropertySheet:configureJmsClusterSection:ClusterTypeProp:optConventional"); - - Select select = new Select(driver.findElement(By.id("propertyForm:jmsPropertySheet:configureJmsClusterSection:ConfigStoreTypeProp:configStoreType"))); - select.selectByVisibleText("Master Broker"); - - Select select1 = new Select(driver.findElement(By.id("propertyForm:jmsPropertySheet:configureJmsClusterSection:MessageStoreTypeProp:messageStoreType"))); - select1.selectByVisibleText("File"); - - setFieldValue("propertyForm:jmsPropertySheet:configureJmsClusterSection:PropertiesProp:properties", "prop1=value1:prop2=value2\\:with\\:colons:prop3=value3"); - - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", clusterName + "in1"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sleep(500); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", clusterName + "in2"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:newButton"); - - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col1:link"; - clickByIdAction(clickId); - assertEquals(clusterName, getText("propertyForm:propertySheet:propertSectionTextField:clusterNameProp:clusterName")); - - deleteCluster(clusterName); - } - - //Case 8 - @Test - public void testClusterWithEnhancedJmsOptions() { - String clusterName = "cluster" + generateRandomString(); - gotoClusterPage(); - clickByIdAction("propertyForm:clustersTable:topActionsGroup1:newButton"); - sendKeysByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText", clusterName); - clickByIdAction("propertyForm:propertySheet:propertySectionTextField:jmsConfigTypeProp:optCustom:optCustom_label"); - sleep(1000); - clickByIdAction("propertyForm:jmsTypePropertySheet:jmsTypeSection:jmsTypeProp:optLocal"); - clickByIdAction("propertyForm:jmsPropertySheet:configureJmsClusterSection:ClusterTypeProp:optEnhanced"); - - setFieldValue("propertyForm:jmsPropertySheet:configureJmsClusterSection:DbVendorProp:dbVendor", "mysql"); - setFieldValue("propertyForm:jmsPropertySheet:configureJmsClusterSection:DbUserProp:dbUser", "root"); - setFieldValue("propertyForm:jmsPropertySheet:configureJmsClusterSection:DbUrlProp:dbUrl", "jdbc:mysql://hostname:portno/dbname?password=xxx"); - - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", clusterName + "in1"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sleep(500); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", clusterName + "in2"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:newButton"); - - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col1:link"; - clickByIdAction(clickId); - assertEquals(clusterName, getText("propertyForm:propertySheet:propertSectionTextField:clusterNameProp:clusterName")); - - deleteCluster(clusterName); - } - - //Case 9 - @Test - public void testClusterWithBadJmsOptions() { - String clusterName = "cluster" + generateRandomString(); - gotoClusterPage(); - clickByIdAction("propertyForm:clustersTable:topActionsGroup1:newButton"); - sendKeysByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText", clusterName); - clickByIdAction("propertyForm:propertySheet:propertySectionTextField:jmsConfigTypeProp:optCustom:optCustom_label"); - sleep(1000); - clickByIdAction("propertyForm:jmsTypePropertySheet:jmsTypeSection:jmsTypeProp:optLocal"); - clickByIdAction("propertyForm:jmsPropertySheet:configureJmsClusterSection:ClusterTypeProp:optConventional"); - - Select select = new Select(driver.findElement(By.id("propertyForm:jmsPropertySheet:configureJmsClusterSection:ConfigStoreTypeProp:configStoreType"))); - select.selectByVisibleText("Master Broker"); - - Select select1 = new Select(driver.findElement(By.id("propertyForm:jmsPropertySheet:configureJmsClusterSection:MessageStoreTypeProp:messageStoreType"))); - select1.selectByVisibleText("JDBC"); - - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", clusterName + "in1"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sleep(500); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", clusterName + "in2"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:newButton"); - - assertTrue((driver.findElement(By.className("header_sun4")).getText().indexOf(" An error occurred") != -1)); - } - //case 10 - @Test - public void testClusterResourcesPage() { - final String jndiName = "jdbcResource" + generateRandomString(); - String target = "cluster" + generateRandomString(); - final String description = "devtest test for cluster->resources page- " + jndiName; - final String tableID = "propertyForm:resourcesTable"; - - JdbcTest jdbcTest = new JdbcTest(); - jdbcTest.createJDBCResource(jndiName, description, target, "cluster"); - - clickAndWait("treeForm:tree:clusterTreeNode:clusterTreeNode_link"); - String prefix = getTableRowByValue(ID_CLUSTERS_TABLE, target, "col1"); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - clickAndWait("propertyForm:clusterTabs:clusterResources"); - String resourcePrefix = getTableRowByValue(tableID, jndiName, "col1"); - assertTrue(isTextPresent(resourcePrefix, jndiName, tableID)); - - int jdbcCount = getTableRowCountByValue(tableID, "JDBC Resources", "col3:type"); - int customCount = getTableRowCountByValue(tableID, "Custom Resources", "col3:type"); - - EnterpriseServerTest adminServerTest = new EnterpriseServerTest(); - Select select = new Select(driver.findElement(By.id("propertyForm:resourcesTable:topActionsGroup1:filter_list"))); - select.selectByVisibleText("Custom Resources"); - adminServerTest.waitForTableRowCount(tableID, customCount); - - select = new Select(driver.findElement(By.id("propertyForm:resourcesTable:topActionsGroup1:filter_list"))); - select.selectByVisibleText("JDBC Resources"); - adminServerTest.waitForTableRowCount(tableID, jdbcCount); - - clickId = getTableRowByValue(tableID, jndiName, "col1") + "col1:link"; - clickByIdAction(clickId); - waitForButtonEnabled("propertyForm:propertyContentPage:topButtons:saveButton"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - - jdbcTest.deleteJDBCResource(jndiName, target, "cluster"); - } - - //Case 11 - @Test - public void testMultiDeleteClusters() { - String clusterName = "clusterName" + generateRandomString(); - String clusterName1 = "clusterName" + generateRandomString(); - createCluster(clusterName); - createCluster(clusterName1); - - //start to delete all cluster - deleteAllCluster(); - - try { - assertEquals("No items found.", getText("propertyForm:clustersTable:rowGroup1:_emptyDataColumn:_emptyDataText")); - } catch (Error e) { - verificationErrors.append(e.toString()); - } - } - - /** - * Cluster related methods - */ - private void startSpecifiedCluster(String string, String idClustersTable, - String clusterName) { - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(ID_CLUSTERS_START_BTN); - assertTrue(closeAlertAndGetItsText().matches("^Start the selected clusters[\\s\\S]$")); - waitForAlertProcess("modalBody"); - } - - private void stopSpecifiedCluster(String idClustersStartBtn, - String idClustersTable, String clusterName) { - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(ID_CLUSTERS_STOP_BTN); - assertTrue(closeAlertAndGetItsText().matches("^Stop the selected clusters[\\s\\S]$")); - waitForAlertProcess("modalBody"); - } - - public void createCluster(String clusterName){ - gotoClusterPage(); - clickByIdAction("propertyForm:clustersTable:topActionsGroup1:newButton"); - clearByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText"); - sendKeysByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText", clusterName); - clickByIdAction("propertyForm:propertyContentPage:topButtons:newButton"); - String prefix = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1"); - assertEquals(clusterName, getText(prefix + "col1:link")); - } - - public void createCluster(String clusterName, String instanceName){ - gotoClusterPage(); - clickByIdAction("propertyForm:clustersTable:topActionsGroup1:newButton"); - clearByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText"); - sendKeysByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText", clusterName); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", instanceName); - clickByIdAction("propertyForm:propertyContentPage:topButtons:newButton"); - } - - public void createCluster(String clusterName, String instanceName, String instanceName1){ - gotoClusterPage(); - clickByIdAction("propertyForm:clustersTable:topActionsGroup1:newButton"); - clearByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText"); - sendKeysByIdAction("propertyForm:propertySheet:propertySectionTextField:NameTextProp:NameText", clusterName); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", instanceName); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - clearByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name"); - sleep(500); - sendKeysByIdAction("propertyForm:basicTable:rowGroup1:0:col2:name", instanceName1); - clickByIdAction("propertyForm:propertyContentPage:topButtons:newButton"); - } - - private String deleteCluster(String clusterName) { - gotoClusterPage(); - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(ID_CLUSTERS_DELETE_BTN); - String alertMsg = closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - return alertMsg; - } - - public void deleteAllCluster(){ - gotoClusterPage(); - if (getTableRowCount(ID_CLUSTERS_TABLE) == 0) { - return; - } - clickByIdAction("propertyForm:clustersTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction(ID_CLUSTERS_DELETE_BTN); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - - public void gotoClusterPage(){ - driver.get(baseUrl + "common/index.jsf"); - clickByIdAction("treeForm:tree:clusterTreeNode:clusterTreeNode_link"); - } - - /** - * Instance related methods - */ - private void startClusterInstance(String instanceName) { - clickByIdAction("propertyForm:clusterTabs:clusterInst"); - String clickId = getTableRowByValue(ID_INSTANCES_TABLE, instanceName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(ID_INSTANCES_START_BTN); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - - private void stopClusterInstance(String instanceName1) { - clickByIdAction("propertyForm:clusterTabs:clusterInst"); - String clickId = getTableRowByValue(ID_INSTANCES_TABLE, instanceName1, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(ID_INSTANCES_STOP_BTN); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - /** - * Test related methods - */ - - private void startTestMigrateEjbTimers() { - clickByIdAction("propertyForm:clusterTabs:general"); - isElementPresent("propertyForm:migrateTimesButton"); - clickByIdAction("propertyForm:migrateTimesButton"); - isClassPresent("MnuStdOpt_sun4"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - isClassPresent("header_sun4"); - assertTrue(driver.findElement(By.className("header_sun4")).getText().indexOf("Migrated 0 timers") != -1); - } - - private void startVerifyClusterGeneralInformationPage(String clusterName) { - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, clusterName, "col1")+"col1:link"; - clickByIdAction(clickId); - - assertEquals(clusterName, getText("propertyForm:propertySheet:propertSectionTextField:clusterNameProp:clusterName")); - assertEquals(clusterName + "-config", getText("propertyForm:propertySheet:propertSectionTextField:configNameProp:configlink")); - - - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:configNameProp:configlink"); - clickByIdAction("treeForm:tree:clusterTreeNode:clusterTreeNode_link"); - clickByIdAction(clickId); - - assertEquals("2 instances are stopped", getText("propertyForm:propertySheet:propertSectionTextField:instanceStatusProp:instanceStatusStopped")); - - setFieldValue("propertyForm:propertySheet:propertSectionTextField:gmsMulticastPort:gmsMulticastPort", "12345"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:gmsMulticastAddress:gmsMulticastAddress", "123.234.456.88"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:GmsBindInterfaceAddress:GmsBindInterfaceAddress", "${ABCDE}"); - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:gmsEnabledProp:gmscb"); - - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - - //ensure value is saved correctly - assertEquals("12345", getValue("propertyForm:propertySheet:propertSectionTextField:gmsMulticastPort:gmsMulticastPort","value")); - assertEquals("123.234.456.88", getValue("propertyForm:propertySheet:propertSectionTextField:gmsMulticastAddress:gmsMulticastAddress","value")); - assertEquals("${ABCDE}", getValue("propertyForm:propertySheet:propertSectionTextField:GmsBindInterfaceAddress:GmsBindInterfaceAddress","value")); - assertEquals(false, driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:gmsEnabledProp:gmscb")).isSelected()); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConfigTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConfigTest.java deleted file mode 100644 index 4124908a127..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConfigTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -/** - * - * @author jeremylv - * - */ -public class ConfigTest extends BaseSeleniumTestClass { - - public static final String ID_CLUSTERS_TABLE = "propertyForm:configs"; - - @Test - public void testCreateAndDeleteConfig() { - final String configName= "test-config-"+generateRandomString(); - gotoDasPage(); - clickByIdAction("treeForm:tree:configurations:configurations_link"); - clickByIdAction("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:NameProp:Name", configName); - clickByIdAction("propertyForm:propertyContentPage:topButtons:okButton"); - - String prefix = getTableRowByValue(ID_CLUSTERS_TABLE, configName, "col1"); - try { - assertEquals(configName, getText(prefix + "col1:link")); - } catch (Error e) { - verificationErrors.append(e.toString()); - }; - - String clickId = getTableRowByValue(ID_CLUSTERS_TABLE, configName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction("propertyForm:configs:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConnectorServiceTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConnectorServiceTest.java deleted file mode 100644 index ef29ab41393..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConnectorServiceTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * Author: jeremy_lv - * To change this template use File | Settings | File Templates. - */ -public class ConnectorServiceTest extends BaseSeleniumTestClass { - - @Test - public void testConnectorService() { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:connectorService:connectorService_link"); - - String policy = "derived"; - if (getValue("propertyForm:propertySheet:propertSectionTextField:ClassLoadingPolicy:ClassLoadingPolicy", "value").equals(policy)) { - policy = "global"; - } - final String timeout = Integer.toString(generateRandomNumber(120)); - - setFieldValue("propertyForm:propertySheet:propertSectionTextField:timeout:tiimeout", timeout); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:ClassLoadingPolicy:ClassLoadingPolicy"))); - select.selectByVisibleText(policy); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:connectorService:connectorService_link"); - assertEquals(timeout, getValue("propertyForm:propertySheet:propertSectionTextField:timeout:tiimeout", "value")); - assertEquals(policy, getValue("propertyForm:propertySheet:propertSectionTextField:ClassLoadingPolicy:ClassLoadingPolicy", "value")); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConnectorsTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConnectorsTest.java deleted file mode 100644 index 0f423ad3453..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ConnectorsTest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -/** - * - * @author Jeremy Lv - * - */ -public class ConnectorsTest extends BaseSeleniumTestClass { - - @Test - public void testConnectorResources() { - String testPool = "connectorPool" + generateRandomString(); - String testConnector = "connectorResource" + generateRandomString(); - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - clickAndWait("treeForm:tree:resources:Connectors:connectorConnectionPools:connectorConnectionPools_link"); - - // Create new connection connection pool - clickAndWait("propertyForm:poolTable:topActionsGroup1:newButton"); - - setFieldValue("propertyForm:propertySheet:generalPropertySheet:jndiProp:name", testPool); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db"))); - select.selectByVisibleText("jmsra"); - sleep(1000); - - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:generalPropertySheet:connectionDefProp:db"))); - select1.selectByVisibleText("javax.jms.QueueConnectionFactory"); - waitForButtonEnabled("propertyForm:title:topButtons:nextButton"); - - clickAndWait("propertyForm:title:topButtons:nextButton"); - - Select select2 = new Select(driver.findElement(By.id("propertyForm:propertySheet:poolPropertySheet:transprop:trans"))); - select2.selectByVisibleText("NoTransaction"); - clickAndWait("propertyForm:propertyContentPage:topButtons:finishButton"); - - String prefix = getTableRowByValue("propertyForm:poolTable", testPool, "col1"); - assertEquals(testPool, getText(prefix + "col1:link")); - - // Create new connector resource which uses this new pool - clickAndWait("treeForm:tree:resources:Connectors:connectorResources:connectorResources_link"); - - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - setFieldValue("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext", testConnector); - Select select3 = new Select(driver.findElement(By.id("form:propertySheet:propertSectionTextField:poolNameProp:PoolName"))); - select3.selectByVisibleText(testPool); - - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - - //test disable button - String connectorPrefix = getTableRowByValue("propertyForm:resourcesTable", testConnector, "col1"); - isElementPresent("propertyForm:resourcesTable:topActionsGroup1:newButton"); - String selectId = connectorPrefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - // Delete connector resource - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button1"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", testConnector); - - // Delete connector connection pool - clickAndWait("treeForm:tree:resources:Connectors:connectorConnectionPools:connectorConnectionPools_link"); - - deleteRow("propertyForm:poolTable:topActionsGroup1:button1", "propertyForm:poolTable", testPool); - } - - - @Test - public void testConnectorResourcesWithTargets() { - gotoDasPage(); - String testPool = "connectorPool" + generateRandomString(); - String testConnector = "connectorResource" + generateRandomString(); - final String instanceName = "standalone" + generateRandomString(); - - clickAndWait("treeForm:tree:resources:Connectors:connectorConnectionPools:connectorConnectionPools_link"); - - // Create new connection connection pool - clickAndWait("propertyForm:poolTable:topActionsGroup1:newButton"); - - setFieldValue("propertyForm:propertySheet:generalPropertySheet:jndiProp:name", testPool); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db"))); - select.selectByVisibleText("jmsra"); - sleep(1000); - - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:generalPropertySheet:connectionDefProp:db"))); - select1.selectByVisibleText("javax.jms.QueueConnectionFactory"); - waitForButtonEnabled("propertyForm:title:topButtons:nextButton"); - - clickAndWait("propertyForm:title:topButtons:nextButton"); - - Select select2 = new Select(driver.findElement(By.id("propertyForm:propertySheet:poolPropertySheet:transprop:trans"))); - select2.selectByVisibleText("NoTransaction"); - clickAndWait("propertyForm:propertyContentPage:topButtons:finishButton"); - - String prefix = getTableRowByValue("propertyForm:poolTable", testPool, "col1"); - assertEquals(testPool, getText(prefix + "col1:link")); - - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(instanceName); - - // Create new connector resource which uses this new pool - clickAndWait("treeForm:tree:resources:Connectors:connectorResources:connectorResources_link"); - - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - setFieldValue("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext", testConnector); - Select select3 = new Select(driver.findElement(By.id("form:propertySheet:propertSectionTextField:poolNameProp:PoolName"))); - select3.selectByVisibleText(testPool); - - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - - Select select4 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select4.selectByVisibleText(instanceName); - select4.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String connectorPrefix = getTableRowByValue("propertyForm:resourcesTable", testConnector, "col1"); - assertEquals(testConnector, getText(connectorPrefix + "col1:link")); - - String clickId = connectorPrefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //test disable button - isElementPresent("propertyForm:resourcesTable:topActionsGroup1:newButton"); - String selectId = connectorPrefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - //test manage target - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(clickId); - clickAndWait("propertyForm:resEditTabs:targetTab"); - clickAndWait("propertyForm:targetTable:topActionsGroup1:manageTargetButton"); - Select select5 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_selected"))); - select5.selectByVisibleText(instanceName); - select5.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton"); - clickByIdAction("form:propertyContentPage:topButtons:saveButton"); - - - // Delete connector resource - clickAndWait("treeForm:tree:resources:Connectors:connectorResources:connectorResources_link"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", testConnector); - - // Delete connector connection pool - clickAndWait("treeForm:tree:resources:Connectors:connectorConnectionPools:connectorConnectionPools_link"); - deleteRow("propertyForm:poolTable:topActionsGroup1:button1", "propertyForm:poolTable", testPool); - - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - } - - -// //This tests need to be finished and retested after the GLASSFISH-20812 has been resolved! -// @Test -// public void testConnectorSecurityMaps() { -// gotoDasPage(); -// String testPool = generateRandomString(); -// String testSecurityMap = generateRandomString(); -// String testGroup = generateRandomString(); -// String testPassword = generateRandomString(); -// String testUserName = generateRandomString(); -// -// clickAndWait("treeForm:tree:resources:Connectors:connectorConnectionPools:connectorConnectionPools_link"); -// -// // Create new connection connection pool -// clickAndWait("propertyForm:poolTable:topActionsGroup1:newButton"); -// -// setFieldValue("propertyForm:propertySheet:generalPropertySheet:jndiProp:name", testPool); -// Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db"))); -// select.selectByVisibleText("jmsra"); -// sleep(1000); -// -// Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:generalPropertySheet:connectionDefProp:db"))); -// select1.selectByVisibleText("javax.jms.QueueConnectionFactory"); -// waitForButtonEnabled("propertyForm:title:topButtons:nextButton"); -// -// clickAndWait("propertyForm:title:topButtons:nextButton"); -// -// Select select2 = new Select(driver.findElement(By.id("propertyForm:propertySheet:poolPropertySheet:transprop:trans"))); -// select2.selectByVisibleText("NoTransaction"); -// clickAndWait("propertyForm:propertyContentPage:topButtons:finishButton"); -// -// String prefix = getTableRowByValue("propertyForm:poolTable", testPool, "col1"); -// assertEquals(testPool, getText(prefix + "col1:link")); -// -// //Create Connector Security Map -// String clickId = prefix + "col1:link"; -// clickByIdAction(clickId); -// clickAndWait("propertyForm:connectorPoolSet:securityMapTab"); -// clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); -// -// setFieldValue("propertyForm:propertySheet:propertSectionTextField:mapNameNew:mapName", testSecurityMap); -// setFieldValue("propertyForm:propertySheet:propertSectionTextField:groupProp:group", testGroup); -// setFieldValue("propertyForm:propertySheet:propertSectionTextField2:userNameEdit:userNameEdit", testUserName); -// setFieldValue("propertyForm:propertySheet:propertSectionTextField2:passwordEdit:passwordEdit", testPassword); -// clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); -// -// String securityPrefix = getTableRowByValue("propertyForm:resourcesTable", testSecurityMap, "col1"); -// String clickId1 = securityPrefix + "col1:link"; -// clickByIdAction(clickId1); -// Assert.assertEquals(testGroup, getValue("propertyForm:propertySheet:propertSectionTextField:groupProp:group", "value")); -// clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); -// -// //Delete Connector Security Maps -// deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", testSecurityMap); -// -// // Delete connector connection pool -// clickAndWait("treeForm:tree:resources:Connectors:connectorConnectionPools:connectorConnectionPools_link"); -// deleteRow("propertyForm:poolTable:topActionsGroup1:button1", "propertyForm:poolTable", testPool); -// } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/EjbContainerTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/EjbContainerTest.java deleted file mode 100644 index 00ed8886cf1..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/EjbContainerTest.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class EjbContainerTest extends BaseSeleniumTestClass { - - @Test - public void testEjbSettings() { - gotoDasPage(); - final String minSize = Integer.toString(generateRandomNumber(64)); - final String maxSize = Integer.toString(generateRandomNumber(64)); - final String poolResize = Integer.toString(generateRandomNumber(64)); - final String timeout = Integer.toString(generateRandomNumber(600)); - - clickAndWait("treeForm:tree:configurations:server-config:ejbContainer:ejbContainer_link"); - - setFieldValue("form1:propertySheet:poolSettingSection:MinSizeProp:MinSize", minSize); - setFieldValue("form1:propertySheet:poolSettingSection:MaxSizeProp:MaxSize", maxSize); - setFieldValue("form1:propertySheet:poolSettingSection:PoolResizeProp:PoolResize", poolResize); - setFieldValue("form1:propertySheet:poolSettingSection:TimeoutProp:Timeout", timeout); - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:ejbContainer:ejbContainer_link"); - assertEquals(minSize, getValue("form1:propertySheet:poolSettingSection:MinSizeProp:MinSize", "value")); - assertEquals(maxSize, getValue("form1:propertySheet:poolSettingSection:MaxSizeProp:MaxSize", "value")); - assertEquals(poolResize, getValue("form1:propertySheet:poolSettingSection:PoolResizeProp:PoolResize", "value")); - assertEquals(timeout, getValue("form1:propertySheet:poolSettingSection:TimeoutProp:Timeout", "value")); - assertTableRowCount("form1:basicTable", count); - - //delete the property used to test - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - @Test - public void testMdbSettings() { - gotoDasPage(); - final String minSize = Integer.toString(generateRandomNumber(64)); - final String maxSize = Integer.toString(generateRandomNumber(64)); - final String poolResize = Integer.toString(generateRandomNumber(64)); - final String timeout = Integer.toString(generateRandomNumber(600)); - - clickAndWait("treeForm:tree:configurations:server-config:ejbContainer:ejbContainer_link"); - clickAndWait("form1:ejbContainerTabs:mdbSettingsTab"); - - setFieldValue("form1:propertySheet:propertySectionTextField:MinSizeProp:MinSize", minSize); - setFieldValue("form1:propertySheet:propertySectionTextField:MaxSizeProp:MaxSize", maxSize); - setFieldValue("form1:propertySheet:propertySectionTextField:PoolResizeProp:PoolResize", poolResize); - setFieldValue("form1:propertySheet:propertySectionTextField:TimeoutProp:Timeout", timeout); - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:ejbContainer:ejbContainer_link"); - clickAndWait("form1:ejbContainerTabs:mdbSettingsTab"); - - assertEquals(minSize, getValue("form1:propertySheet:propertySectionTextField:MinSizeProp:MinSize", "value")); - assertEquals(maxSize, getValue("form1:propertySheet:propertySectionTextField:MaxSizeProp:MaxSize", "value")); - assertEquals(poolResize, getValue("form1:propertySheet:propertySectionTextField:PoolResizeProp:PoolResize", "value")); - assertEquals(timeout, getValue("form1:propertySheet:propertySectionTextField:TimeoutProp:Timeout", "value")); - assertTableRowCount("form1:basicTable", count); - - //delete the property used to test - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - @Test - public void testEjbTimerService() { - gotoDasPage(); - final String minDelivery = Integer.toString(generateRandomNumber(5000)); - final String maxRedelivery = Integer.toString(generateRandomNumber(10)); - final String redeliveryInterval = Integer.toString(generateRandomNumber(20000)); - final String timerDatasource = "jndi/" + generateRandomString(); - - clickAndWait("treeForm:tree:configurations:server-config:ejbContainer:ejbContainer_link"); - clickAndWait("form1:ejbContainerTabs:ejbTimerTab"); - - setFieldValue("form1:propertySheet:propertySectionTextField:MinDeliveryProp:MinDelivery", minDelivery); - setFieldValue("form1:propertySheet:propertySectionTextField:MaxRedeliveryProp:MaxRedelivery", maxRedelivery); - setFieldValue("form1:propertySheet:propertySectionTextField:RedeliveryIntrProp:RedeliveryIntr", redeliveryInterval); - setFieldValue("form1:propertySheet:propertySectionTextField:TimerDatasourceProp:TimerDatasource", timerDatasource); - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:ejbContainer:ejbContainer_link"); - clickAndWait("form1:ejbContainerTabs:ejbTimerTab"); - - assertEquals(minDelivery, getValue("form1:propertySheet:propertySectionTextField:MinDeliveryProp:MinDelivery", "value")); - assertEquals(maxRedelivery, getValue("form1:propertySheet:propertySectionTextField:MaxRedeliveryProp:MaxRedelivery", "value")); - assertEquals(redeliveryInterval, getValue("form1:propertySheet:propertySectionTextField:RedeliveryIntrProp:RedeliveryIntr", "value")); - assertEquals(timerDatasource, getValue("form1:propertySheet:propertySectionTextField:TimerDatasourceProp:TimerDatasource", "value")); - assertTableRowCount("form1:basicTable", count); - - // Clean up after ourselves, just because... :) - setFieldValue("form1:propertySheet:propertySectionTextField:MinDeliveryProp:MinDelivery", "1000"); - setFieldValue("form1:propertySheet:propertySectionTextField:MaxRedeliveryProp:MaxRedelivery", "1"); - setFieldValue("form1:propertySheet:propertySectionTextField:RedeliveryIntrProp:RedeliveryIntr", "5000"); - setFieldValue("form1:propertySheet:propertySectionTextField:TimerDatasourceProp:TimerDatasource", ""); - - //delete the property used to test - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - //Test that the default button in EJB Settings will fill in the default value when pressed. - @Test - public void testEjbSettingsDefault() { - gotoDasPage(); - //Go to EJB Settings page, enter some random value - clickAndWait("treeForm:tree:configurations:server-config:ejbContainer:ejbContainer_link"); - clickByIdAction("form1:propertySheet:generalPropertySection:commitOptionProp:optC"); - setFieldValue("form1:propertySheet:poolSettingSection:MinSizeProp:MinSize", "2"); - setFieldValue("form1:propertySheet:poolSettingSection:MaxSizeProp:MaxSize", "34"); - setFieldValue("form1:propertySheet:poolSettingSection:PoolResizeProp:PoolResize", "10"); - setFieldValue("form1:propertySheet:poolSettingSection:TimeoutProp:Timeout", "666"); - setFieldValue("form1:propertySheet:cacheSettingSection:MaxCacheProp:MaxCache", "520"); - setFieldValue("form1:propertySheet:cacheSettingSection:CacheResizeProp:CacheResize", "36"); - setFieldValue("form1:propertySheet:cacheSettingSection:RemTimoutProp:RemTimout", "5454"); - Select select1 = new Select(driver.findElement(By.id("form1:propertySheet:cacheSettingSection:RemPolicyProp:RemPolicy"))); - select1.selectByVisibleText("First In First Out (fifo)"); - setFieldValue("form1:propertySheet:cacheSettingSection:CacheIdleProp:CacheIdle", "666"); - - //Save this, goto another tab and back - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:ejbContainer:ejbContainer_link"); - - //Now, click the default button and ensure all the default values are filled in - //The default value should match whats specified in the config bean. - //Save and come back to the page to assert. - - //Location should not be changed by the default button - String location = getValue("form1:propertySheet:generalPropertySection:SessionStoreProp:SessionStore", "value"); - - //We are testing that default button fills in the correct default value, not testing if the Save button works. - //no need to click Save for this test. - clickAndWait("form1:propertyContentPage:loadDefaultsButton"); - waitForButtonEnabled("form1:propertyContentPage:loadDefaultsButton"); - - assertEquals(location, getValue("form1:propertySheet:generalPropertySection:SessionStoreProp:SessionStore", "value")); - - assertEquals(true, driver.findElement(By.id(("form1:propertySheet:generalPropertySection:commitOptionProp:optB"))).isSelected()); - assertEquals("0", getValue("form1:propertySheet:poolSettingSection:MinSizeProp:MinSize", "value")); - assertEquals("32", getValue("form1:propertySheet:poolSettingSection:MaxSizeProp:MaxSize", "value")); - assertEquals("8", getValue("form1:propertySheet:poolSettingSection:PoolResizeProp:PoolResize", "value")); - assertEquals("600", getValue("form1:propertySheet:poolSettingSection:TimeoutProp:Timeout", "value")); - assertEquals("512", getValue("form1:propertySheet:cacheSettingSection:MaxCacheProp:MaxCache", "value")); - assertEquals("32", getValue("form1:propertySheet:cacheSettingSection:CacheResizeProp:CacheResize", "value")); - assertEquals("5400", getValue("form1:propertySheet:cacheSettingSection:RemTimoutProp:RemTimout", "value")); - assertEquals("nru", getValue("form1:propertySheet:cacheSettingSection:RemPolicyProp:RemPolicy", "value")); - assertEquals("600", getValue("form1:propertySheet:cacheSettingSection:CacheIdleProp:CacheIdle", "value")); - - //will be nice to have the default value back for the server. - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/EnterpriseServerTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/EnterpriseServerTest.java deleted file mode 100644 index d4050fc7c43..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/EnterpriseServerTest.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Assert; -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class EnterpriseServerTest extends BaseSeleniumTestClass { - public static final String TRIGGER_ADVANCED_APPLICATIONS_CONFIGURATION = "i18nc.domain.AppsConfigPageHelp"; - public static final String TRIGGER_GENERAL_INFORMATION = "i18n.instance.GeneralTitle"; - public static final String TRIGGER_ADVANCED_DOMAIN_ATTRIBUTES = "i18nc.domain.DomainAttrsPageTitleHelp"; - public static final String TRIGGER_SYSTEM_PROPERTIES = "i18n.common.AdditionalProperties"; // There is no page help on sysprops pages anymore, it seems - public static final String TRIGGER_RESOURCES = "i18nc.resourcesTarget.pageTitleHelp"; - - - @Test - public void testAdvancedDomainAttributes() { - gotoDasPage(); - clickByIdAction("treeForm:tree:nodes:nodes_link"); - clearByIdAction("propertyForm:propertySheet:propertSectionTextField:localeProp:Locale"); - sendKeysByIdAction("propertyForm:propertySheet:propertSectionTextField:localeProp:Locale", "en"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - assertEquals("New values successfully saved.", driver.findElement(By.cssSelector("span.label_sun4")).getText()); - clickByIdAction("treeForm:tree:nodes:nodes_link"); - try { - assertEquals("en", getValue("propertyForm:propertySheet:propertSectionTextField:localeProp:Locale", "value")); - } catch (Error e) { - verificationErrors.append(e.toString()); - } - setFieldValue("propertyForm:propertySheet:propertSectionTextField:localeProp:Locale", ""); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - } - - @Test - public void testSystemProperties() { - final String property = generateRandomString(); - final String value = property + "value"; - - gotoDasPage(); - clickAndWait("propertyForm:serverInstTabs:serverInstProps"); - - int count = addTableRow("propertyForm:sysPropsTable", "propertyForm:sysPropsTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:sysPropsTable:rowGroup1:0:col2:col1St", property); - sleep(500); - setFieldValue("propertyForm:sysPropsTable:rowGroup1:0:overrideValCol:overrideVal", value); - clickAndWait("propertyForm:SysPropsPage:topButtons:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("propertyForm:serverInstTabs:serverInstProps"); - assertTableRowCount("propertyForm:sysPropsTable", count); - - //delete the property used to test - gotoDasPage(); - clickAndWait("propertyForm:serverInstTabs:serverInstProps"); - String prefix = getTableRowByVal("propertyForm:sysPropsTable", property, "col2:col1St"); - String selectId = prefix + "col1:select"; - clickByIdAction(selectId); - clickByIdAction("propertyForm:sysPropsTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:sysPropsTable:topActionsGroup1:button1"); - clickAndWait("propertyForm:SysPropsPage:topButtons:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - @Test - public void testServerResourcesPage() { - final String jndiName = "jdbcResource"+generateRandomString(); - final String description = "devtest test for server->resources page- " + jndiName; - final String tableID = "propertyForm:resourcesTable"; - - gotoDasPage(); - JdbcTest jdbcTest = new JdbcTest(); - jdbcTest.createJDBCResource(jndiName, description, "server", "server"); - - gotoDasPage(); - clickAndWait("propertyForm:serverInstTabs:resources"); - String prefix = getTableRowByValue(tableID, jndiName, "col1"); - assertTrue(isTextPresent(prefix, jndiName, tableID)); - - int jdbcCount = getTableRowCountByValue(tableID, "JDBC Resources", "col3:type"); - int customCount = getTableRowCountByValue(tableID, "Custom Resources", "col3:type"); - - Select select = new Select(driver.findElement(By.id("propertyForm:resourcesTable:topActionsGroup1:filter_list"))); - select.selectByVisibleText("Custom Resources"); - waitForTableRowCount(tableID, customCount); - - select = new Select(driver.findElement(By.id("propertyForm:resourcesTable:topActionsGroup1:filter_list"))); - select.selectByVisibleText("JDBC Resources"); - waitForTableRowCount(tableID, jdbcCount); - - String clickId = getTableRowByValue(tableID, jndiName, "col1") + "col1:link"; - clickByIdAction(clickId); - waitForButtonEnabled("propertyForm:propertyContentPage:topButtons:saveButton"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - - jdbcTest.deleteJDBCResource(jndiName, "server", "server"); - } - - public void waitForTableRowCount(String tableID, int count) { - for (int i = 0;; i++) { - if (i >= 1000) { - Assert.fail("timeout"); - } - try { - int tableCount = getTableRowCount(tableID); - if (tableCount == count) { - break; - } - } catch (Exception e) { - e.printStackTrace(); - } - sleep(500); - } - } - - public void gotoDasPage() { - driver.get(baseUrl + "/common/index.jsf"); - clickByIdAction("treeForm:tree:applicationServer:applicationServer_link"); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/GMSTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/GMSTest.java deleted file mode 100644 index 86c049ce2a2..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/GMSTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class GMSTest extends BaseSeleniumTestClass { - - @Test - public void testConfig() { - gotoDasPage(); - final String protocolMaxTrial = Integer.toString(generateRandomNumber(100)); - clickAndWait("treeForm:tree:configurations:default-config:default-config_turner:default-config_turner_image"); - clickAndWait("treeForm:tree:configurations:default-config:gms:gms_link"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:fdMax:fdMax", protocolMaxTrial); - - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "a"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "b"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "c"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - assertEquals(protocolMaxTrial, getValue("propertyForm:propertySheet:propertSectionTextField:fdMax:fdMax", "value")); - assertTableRowCount("propertyForm:basicTable", count); - - //delete the property used to test - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:default-config:gms:gms_link"); - clickByIdAction("propertyForm:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:basicTable:topActionsGroup1:button1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/HttpServiceTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/HttpServiceTest.java deleted file mode 100644 index 19b5e857efc..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/HttpServiceTest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class HttpServiceTest extends BaseSeleniumTestClass { - - @Test - public void testHttpService() { - gotoDasPage(); - final String interval = Integer.toString(generateRandomNumber(2880)); - final String maxFiles = Integer.toString(generateRandomNumber(50)); - final String bufferSize = Integer.toString(generateRandomNumber(65536)); - final String logWriteInterval = Integer.toString(generateRandomNumber(600)); - - clickAndWait("treeForm:tree:configurations:server-config:httpService:httpService_link"); - if(!driver.findElement(By.id("form1:propertySheet:http:acLog:ssoEnabled")).isSelected()) - clickByIdAction("form1:propertySheet:http:acLog:ssoEnabled"); - - if(!driver.findElement(By.id("form1:propertySheet:accessLog:acLog:accessLoggingEnabled")).isSelected()) - clickByIdAction("form1:propertySheet:accessLog:acLog:accessLoggingEnabled"); - - setFieldValue("form1:propertySheet:accessLog:intervalProp:Interval", interval); - setFieldValue("form1:propertySheet:accessLog:MaxHistoryFiles:MaxHistoryFiles", maxFiles); - setFieldValue("form1:propertySheet:accessLog:accessLogBufferSize:accessLogBufferSize", bufferSize); - setFieldValue("form1:propertySheet:accessLog:accessLogWriteInterval:accessLogWriteInterval", logWriteInterval); - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:httpService:httpService_link"); - assertEquals(true, driver.findElement(By.id("form1:propertySheet:http:acLog:ssoEnabled")).isSelected()); - assertEquals(interval, getValue("form1:propertySheet:accessLog:intervalProp:Interval", "value")); - assertEquals(maxFiles, getValue("form1:propertySheet:accessLog:MaxHistoryFiles:MaxHistoryFiles", "value")); - assertEquals(bufferSize, getValue("form1:propertySheet:accessLog:accessLogBufferSize:accessLogBufferSize", "value")); - assertEquals(logWriteInterval, getValue("form1:propertySheet:accessLog:accessLogWriteInterval:accessLogWriteInterval", "value")); - assertTableRowCount("form1:basicTable", count); - - //delete the property used to test - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/IiopListenerTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/IiopListenerTest.java deleted file mode 100644 index d9f2efc6cdf..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/IiopListenerTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class IiopListenerTest extends BaseSeleniumTestClass { - - @Test - public void testAddIiopListener() { - gotoDasPage(); - final String iiopName = "testIiopListener" + generateRandomString(); - final String networkAddress = "0.0.0.0"; - final String listenerPort = Integer.toString(generateRandomNumber(32768));; - final String certName = "s1as"; - - clickAndWait("treeForm:tree:configurations:server-config:orb:iiopListeners:iiopListeners_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:generalSettingsSetion:IiopNameTextProp:IiopNameText", iiopName); - setFieldValue("propertyForm:propertySheet:generalSettingsSetion:NetwkAddrProp:NetwkAddr", networkAddress); - setFieldValue("propertyForm:propertySheet:generalSettingsSetion:ListenerPortProp:ListenerPort", listenerPort); - - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "a"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "b"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "c"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", iiopName, "col1"); - assertEquals(iiopName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertEquals(networkAddress, getValue("propertyForm:propertySheet:generalSettingsSetion:NetwkAddrProp:NetwkAddr", "value")); - assertEquals(listenerPort, getValue("propertyForm:propertySheet:generalSettingsSetion:ListenerPortProp:ListenerPort", "value")); - - assertTableRowCount("propertyForm:basicTable", count); - - // access the SSL Page - clickAndWait("propertyForm:iiopTab:sslEdit"); - setFieldValue("propertyForm:propertySheet:propertySheetSection:CertNicknameProp:CertNickname", certName); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - assertEquals(certName, getValue("propertyForm:propertySheet:propertySheetSection:CertNicknameProp:CertNickname", "value")); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", iiopName); - } - - @Test - public void testORB() { - gotoDasPage(); - final String totalConn = "1048"; - final String maxMsgSize = "2048"; - clickAndWait("treeForm:tree:configurations:server-config:orb:orb_link"); - setFieldValue("form1:propertySheet:propertySectionTextField:TotalConnsProp:TotalConns", totalConn); - Select select = new Select(driver.findElement(By.id("form1:propertySheet:propertySectionTextField:MaxMsgSizeProp:MaxMsgSize"))); - select.selectByVisibleText(maxMsgSize); - - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - assertEquals(totalConn, getValue("form1:propertySheet:propertySectionTextField:TotalConnsProp:TotalConns", "value")); - assertEquals(maxMsgSize, getValue("form1:propertySheet:propertySectionTextField:MaxMsgSizeProp:MaxMsgSize", "value")); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JVMReportTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JVMReportTest.java deleted file mode 100644 index 928352f9414..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JVMReportTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; - - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class JVMReportTest extends BaseSeleniumTestClass { - - - @Test - public void testJVMLink() { - gotoDasPage(); - clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); - assertEquals("JVM Report",getText("propertyForm:propertySheet:serverGeneralPropSheet:jvmProp:jvmlink")); - String winHandleBefore = driver.getWindowHandle(); - - clickAndWait("propertyForm:propertySheet:serverGeneralPropSheet:jvmProp:jvmlink"); - for(String winHandle : driver.getWindowHandles()){ - driver.switchTo().window(winHandle); - } - isElementPresent("propertyForm:propertyContentPage:propertySheet:viewPropertySection:ViewProp:View"); - assertTrue(getText("propertyForm:propertyContentPage:propertySheet:reportPropertySection:ReportProp:Report").contains("Operating System Information")); - driver.close(); - - driver.switchTo().window(winHandleBefore); - } -} - diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JavaMailTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JavaMailTest.java deleted file mode 100644 index 1d1f3ba6611..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JavaMailTest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; - -/** - * - * @author Jeremy Lv - * - */ -public class JavaMailTest extends BaseSeleniumTestClass { - - @Test - public void createMailResource() { - gotoDasPage(); - final String resourceName = "javaMail" + generateRandomString(); - final String description = resourceName + " description"; - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - clickAndWait("treeForm:tree:resources:mailResources:mailResources_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - isElementPresent("form:propertySheet:propertSectionTextField:nameNew:name"); - setFieldValue("form:propertySheet:propertSectionTextField:nameNew:name", resourceName); - setFieldValue("form:propertySheet:propertSectionTextField:hostProp:host", "localhost"); - setFieldValue("form:propertySheet:propertSectionTextField:userProp:user", "user"); - setFieldValue("form:propertySheet:propertSectionTextField:fromProp:from", "return@test.com"); - setFieldValue("form:propertySheet:propertSectionTextField:descProp:desc", description); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resourceName, "col1"); - assertEquals(resourceName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("propertyForm:basicTable", count); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //test disable button - isElementPresent("propertyForm:resourcesTable:topActionsGroup1:newButton"); - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", resourceName); - } - - @Test - public void createMailResourceWithTargets() { - final String resourceName = "javaMail" + generateRandomString(); - final String description = resourceName + " description"; - final String instanceName = "standalone" + generateRandomString(); - - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(instanceName); - - clickAndWait("treeForm:tree:resources:mailResources:mailResources_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - isElementPresent("form:propertySheet:propertSectionTextField:nameNew:name"); - setFieldValue("form:propertySheet:propertSectionTextField:nameNew:name", resourceName); - setFieldValue("form:propertySheet:propertSectionTextField:hostProp:host", "localhost"); - setFieldValue("form:propertySheet:propertSectionTextField:userProp:user", "user"); - setFieldValue("form:propertySheet:propertSectionTextField:fromProp:from", "return@test.com"); - setFieldValue("form:propertySheet:propertSectionTextField:descProp:desc", description); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - - - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - - Select select = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select.selectByVisibleText(instanceName); - select.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resourceName, "col1"); - assertEquals(resourceName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTableRowCount("propertyForm:basicTable", count); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //test disable button - isElementPresent("propertyForm:resourcesTable:topActionsGroup1:newButton"); - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - //test manage target - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(clickId); - clickAndWait("propertyForm:resEditTabs:targetTab"); - clickAndWait("propertyForm:targetTable:topActionsGroup1:manageTargetButton"); - Select select5 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_selected"))); - select5.selectByVisibleText(instanceName); - select5.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton"); - clickByIdAction("form:propertyContentPage:topButtons:saveButton"); - - - gotoDasPage(); - clickAndWait("treeForm:tree:resources:mailResources:mailResources_link"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", resourceName); - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JavaMessageServiceTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JavaMessageServiceTest.java deleted file mode 100644 index 8ce6526135e..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JavaMessageServiceTest.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.admingui.devtests; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -public class JavaMessageServiceTest extends BaseSeleniumTestClass { - - public static final String DEFAULT_JMS_HOST = "default_JMS_host"; - - @Test - public void testJmsService() { - gotoDasPage(); - final String timeout = Integer.toString(generateRandomNumber(90)); - final String interval = Integer.toString(generateRandomNumber(10)); - final String attempts = Integer.toString(generateRandomNumber(10)); - - clickAndWait("treeForm:tree:configurations:server-config:jmsConfiguration:jmsConfiguration_link"); - setFieldValue("propertyForm:propertyContentPage:propertySheet:propertSectionTextField:timeoutProp:Timeout", timeout); - setFieldValue("propertyForm:propertyContentPage:propertySheet:propertSectionTextField:intervalProp:Interval", interval); - setFieldValue("propertyForm:propertyContentPage:propertySheet:propertSectionTextField:attemptsProp:Attempts", attempts); - Select select = new Select(driver.findElement(By.id("propertyForm:propertyContentPage:propertySheet:propertSectionTextField:behaviorProp:Behavior"))); - select.selectByVisibleText("priority"); - - int count = addTableRow("propertyForm:propertyContentPage:basicTable", "propertyForm:propertyContentPage:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:propertyContentPage:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - sleep(500); - setFieldValue("propertyForm:propertyContentPage:basicTable:rowGroup1:0:col3:col1St", "value"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:jmsConfiguration:jmsConfiguration_link"); - - assertEquals(timeout, getValue("propertyForm:propertyContentPage:propertySheet:propertSectionTextField:timeoutProp:Timeout", "value")); - assertEquals(interval, getValue("propertyForm:propertyContentPage:propertySheet:propertSectionTextField:intervalProp:Interval", "value")); - assertEquals(attempts, getValue("propertyForm:propertyContentPage:propertySheet:propertSectionTextField:attemptsProp:Attempts", "value")); - assertTableRowCount("propertyForm:propertyContentPage:basicTable", count); - - //delete the property used to test - clickByIdAction("propertyForm:propertyContentPage:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:propertyContentPage:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:propertyContentPage:basicTable:topActionsGroup1:button1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - @Test - public void testJmsHosts() { - gotoDasPage(); - String hostText = "host" + generateRandomString(); - String host = "somemachine" + generateRandomNumber(1000); - String port = Integer.toString(generateRandomNumber(32768)); - - clickAndWait("treeForm:tree:configurations:server-config:jmsConfiguration:jmsHosts:jmsHosts_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:JmsHostTextProp:JmsHostText", hostText); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:HostProp:Host", host); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:PortProp:Port", port); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:AdminUserProp:AdminUser", "admin"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:newPasswordProp:NewPassword", "admin"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:confirmPasswordProp:ConfirmPassword", "admin"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", hostText, "colName"); - assertEquals(hostText, getText(prefix + "colName:link")); - - String clickId = prefix + "colName:link"; - clickByIdAction(clickId); - assertEquals(host, getValue("propertyForm:propertySheet:propertSectionTextField:HostProp:Host", "value")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //delete related jms host - String deleteRow = prefix + "col0:select"; - clickByIdAction(deleteRow); - clickByIdAction("propertyForm:configs:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - - @Test - public void testJmsHostInNonServerConfig() { - String hostText = "host" + generateRandomString(); - String instanceName = "in" + generateRandomString(); - final String LINK_HOSTS = "treeForm:tree:configurations:" + instanceName + "-config:jmsConfiguration:jmsHosts:jmsHosts_link"; - - StandaloneTest sat = new StandaloneTest(); - sat.createStandAloneInstance(instanceName); - sat.startInstance(instanceName); - - // Create new JMS Host for the standalone instance's config - clickAndWait(LINK_HOSTS); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:JmsHostTextProp:JmsHostText", hostText); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:HostProp:Host", "localhost"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - // Delete the default host for the SA instance - gotoDasPage(); - clickAndWait(LINK_HOSTS); - String prefix = getTableRowByValue("propertyForm:configs", DEFAULT_JMS_HOST, "colName"); - String deleteRow = prefix + "col0:select"; - clickByIdAction(deleteRow); - clickByIdAction("propertyForm:configs:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - - // Verify that the DAS still has the default JMS Host - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:jmsConfiguration:jmsHosts:jmsHosts_link"); - assertEquals(DEFAULT_JMS_HOST, getText(prefix + "colName:link")); - - // Delete SA config's new host - gotoDasPage(); - clickAndWait(LINK_HOSTS); - String prefix1 = getTableRowByValue("propertyForm:configs", hostText, "colName"); - String deleteRow1 = prefix1 + "col0:select"; - clickByIdAction(deleteRow1); - clickByIdAction("propertyForm:configs:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - - sat.deleteAllStandaloneInstances(); - } - -// //This tests need to be rewrite and retested after the issue has been resolved -// @Test -// public void testJmsPhysicalDestinations() { -// gotoDasPage(); -// final String name = "dest" + generateRandomString(); -// final String maxUnconsumed = Integer.toString(generateRandomNumber(100)); -// final String maxMessageSize = Integer.toString(generateRandomNumber(100)); -// final String maxTotalMemory = Integer.toString(generateRandomNumber(100)); -// final String maxProducers = Integer.toString(generateRandomNumber(500)); -// final String consumerFlowLimit = Integer.toString(generateRandomNumber(5000)); -// -// clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); -// clickAndWait("propertyForm:serverInstTabs:jmsPhysDest"); -// clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); -// -// setFieldValue("jmsPhysDestForm:propertySheet:propertSectionTextField:NameTextProp:NameText", name); -// setFieldValue("jmsPhysDestForm:propertySheet:propertSectionTextField:maxNumMsgsProp:maxNumMsgs", maxUnconsumed); -// setFieldValue("jmsPhysDestForm:propertySheet:propertSectionTextField:maxBytesPerMsgProp:maxBytesPerMsg", maxMessageSize); -// setFieldValue("jmsPhysDestForm:propertySheet:propertSectionTextField:maxTotalMsgBytesProp:maxTotalMsgBytes", maxTotalMemory); -// Select select = new Select(driver.findElement(By.id("jmsPhysDestForm:propertySheet:propertSectionTextField:typeProp:type"))); -// select.selectByVisibleText("javax.jms.Queue"); -// setFieldValue("jmsPhysDestForm:propertySheet:propertSectionTextField:maxNumProducersProp:maxNumProducers", maxProducers); -// setFieldValue("jmsPhysDestForm:propertySheet:propertSectionTextField:consumerFlowLimitProp:consumerFlowLimit", consumerFlowLimit); -// Select select1 = new Select(driver.findElement(By.id("jmsPhysDestForm:propertySheet:propertSectionTextField:useDmqProp:useDmq"))); -// select1.selectByVisibleText("false"); -// Select select2 = new Select(driver.findElement(By.id("jmsPhysDestForm:propertySheet:propertSectionTextField:validateSchemaProp:validateXMLSchemaEnabled"))); -// select2.selectByVisibleText("true"); -// clickAndWait("jmsPhysDestForm:propertyContentPage:topButtons:newButton"); -// -// String prefix = getTableRowByValue("propertyForm:configs", name, "col1"); -// assertEquals(name, getText(prefix + "col1:nameCol")); -// -// String clickId = prefix + "col1:nameCol"; -// clickByIdAction(clickId); -// -// assertEquals(maxUnconsumed, getValue("jmsPhysDestForm:propertySheet:propertSectionTextField:maxNumMsgsProp:maxNumMsgs", "value")); -// assertEquals(maxMessageSize, getValue("jmsPhysDestForm:propertySheet:propertSectionTextField:maxBytesPerMsgProp:maxBytesPerMsg", "value")); -// assertEquals(maxTotalMemory, getValue("jmsPhysDestForm:propertySheet:propertSectionTextField:maxTotalMsgBytesProp:maxTotalMsgBytes", "value")); -// -// assertEquals(consumerFlowLimit, getValue("jmsPhysDestForm:propertySheet:propertSectionTextField:consumerFlowLimitProp:consumerFlowLimit", "value")); -// assertEquals("true", getValue("jmsPhysDestForm:propertySheet:propertSectionTextField:validateSchemaProp:validateXMLSchemaEnabled", "value")); -// clickAndWait("jmsPhysDestForm:propertyContentPage:topButtons:cancelButton"); -// -// String selectId = prefix + "col0:select"; -// clickByIdAction(selectId);; -// clickAndWait("propertyForm:configs:topActionsGroup1:flushButton"); -// -// gotoDasPage(); -// clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); -// clickAndWait("propertyForm:serverInstTabs:jmsPhysDest"); -// deleteRow("propertyForm:configs:topActionsGroup1:deleteButton", "propertyForm:configs", name); -// } - - @Test - public void testMasterBroker() { - ClusterTest ct = new ClusterTest(); - try { - final String FIELD_MASTER_BROKER = "propertyForm:propertyContentPage:propertySheet:propertSectionTextField:maseterBrokerProp:MasterBroker"; - - String clusterName = "clusterName" + generateRandomString(); - ct.deleteAllCluster(); - final String instance1 = clusterName + generateRandomString(); - final String instance2 = clusterName + generateRandomString(); - ct.createCluster(clusterName, instance1, instance2); - final String ELEMENT_JMS_LINK = "treeForm:tree:configurations:" + clusterName + "-config:jmsConfiguration:jmsConfiguration_link"; - - clickAndWait(ELEMENT_JMS_LINK); - Select select = new Select(driver.findElement(By.id(FIELD_MASTER_BROKER))); - select.selectByVisibleText(instance2); - - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - clickAndWait(ELEMENT_JMS_LINK); - - assertEquals(instance2, getValue(FIELD_MASTER_BROKER, "value")); - } finally { - ct.deleteAllCluster(); - } - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JdbcTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JdbcTest.java deleted file mode 100644 index cb5627f9883..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JdbcTest.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class JdbcTest extends BaseSeleniumTestClass { - - public static final String ID_JDBC_TABLE = "propertyForm:poolTable"; - public static final String ID_RESOURCE_TABLE = "propertyForm:resourcesTable"; - - @Test - public void testPoolPing() { - gotoDasPage(); - clickAndWait("treeForm:tree:resources:JDBC:connectionPoolResources:__TimerPool:link"); - clickAndWait("propertyForm:propertyContentPage:ping"); - assertTrue(driver.findElement(By.className("label_sun4")).getText().equals("Ping Succeeded")); - } - - @Test - public void testCreatingConnectionPool() { - gotoDasPage(); - final String poolName = "jdbcPool" + generateRandomString(); - final String description = "devtest test connection pool - " + poolName; - - clickAndWait("treeForm:tree:resources:JDBC:connectionPoolResources:connectionPoolResources_link"); - clickAndWait("propertyForm:poolTable:topActionsGroup1:newButton"); - - isElementPresent("propertyForm:propertyContentPage:propertySheet:generalPropertySheet:jndiProp:name"); - setFieldValue("propertyForm:propertyContentPage:propertySheet:generalPropertySheet:jndiProp:name", poolName); - Select select = new Select(driver.findElement(By.id("propertyForm:propertyContentPage:propertySheet:generalPropertySheet:resTypeProp:resType"))); - select.selectByVisibleText("javax.sql.DataSource"); - - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertyContentPage:propertySheet:generalPropertySheet:dbProp:db"))); - select1.selectByVisibleText("Derby"); - clickAndWait("propertyForm:propertyContentPage:topButtons:nextButton"); - - setFieldValue("form2:sheet:generalSheet:descProp:desc", description); - clickAndWait("form2:propertyContentPage:topButtons:finishButton"); - - String prefix = getTableRowByValue(ID_JDBC_TABLE, poolName, "col1"); - assertEquals(poolName, getText(prefix + "col1:link")); - assertEquals(description, getText(prefix + "col4:typeDesc")); - - gotoDasPage(); - clickAndWait("treeForm:tree:resources:JDBC:connectionPoolResources:connectionPoolResources_link"); - deleteRow("propertyForm:poolTable:topActionsGroup1:button1", ID_JDBC_TABLE, poolName); - } - - @Test - public void testCreatingJdbcPoolWithoutDatabaseVendor() { - gotoDasPage(); - final String poolName = "jdbcPool" + generateRandomString(); - final String description = "devtest test connection pool - " + poolName; - - clickAndWait("treeForm:tree:resources:JDBC:connectionPoolResources:connectionPoolResources_link"); - clickAndWait("propertyForm:poolTable:topActionsGroup1:newButton"); - - isElementPresent("propertyForm:propertyContentPage:propertySheet:generalPropertySheet:jndiProp:name"); - setFieldValue("propertyForm:propertyContentPage:propertySheet:generalPropertySheet:jndiProp:name", poolName); - Select select = new Select(driver.findElement(By.id("propertyForm:propertyContentPage:propertySheet:generalPropertySheet:resTypeProp:resType"))); - select.selectByVisibleText("javax.sql.ConnectionPoolDataSource"); - clickAndWait("propertyForm:propertyContentPage:topButtons:nextButton"); - - setFieldValue("form2:sheet:generalSheet:descProp:desc", description); - setFieldValue("form2:sheet:generalSheet:dsProp:datasourceField", poolName + "DataSource"); - clickAndWait("form2:propertyContentPage:topButtons:finishButton"); - - String prefix = getTableRowByValue(ID_JDBC_TABLE, poolName, "col1"); - assertEquals(poolName, getText(prefix + "col1:link")); - assertEquals(description, getText(prefix + "col4:typeDesc")); - - deleteRow("propertyForm:poolTable:topActionsGroup1:button1", ID_JDBC_TABLE, poolName); - } - - @Test - public void testJdbcResources() { - gotoDasPage(); - final String jndiName = "jdbcResource" + generateRandomString(); - final String description = "devtest test jdbc resource - " + jndiName; - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - clickAndWait("treeForm:tree:resources:JDBC:jdbcResources:jdbcResources_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - isElementPresent("form:propertySheet:propertSectionTextField:nameNew:name"); - setFieldValue("form:propertySheet:propertSectionTextField:nameNew:name", jndiName); - setFieldValue("form:propertySheet:propertSectionTextField:descProp:desc", description); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue(ID_RESOURCE_TABLE, jndiName, "col1"); - assertEquals(jndiName, getText(prefix + "col1:link")); - assertEquals(description, getText(prefix + "col4:typeDesc")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("propertyForm:basicTable", count); - - //test disable button - testDisableBtn(clickId); - - //test enable button - testEnableBtn(clickId); - - //disable the jdbc resource so that it can be delete successfully - clickByIdAction(clickId); - testDisableBtn(clickId); - - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", ID_RESOURCE_TABLE, jndiName); - } - - @Test - public void testJdbcResourcesWithTargets() { - final String jndiName = "jdbcResource" + generateRandomString(); - final String instanceName = "standalone" + generateRandomString(); - final String description = "devtest test jdbc resource with targets- " + jndiName; - - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(instanceName); - - clickAndWait("treeForm:tree:resources:JDBC:jdbcResources:jdbcResources_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - isElementPresent("form:propertySheet:propertSectionTextField:nameNew:name"); - setFieldValue("form:propertySheet:propertSectionTextField:nameNew:name", jndiName); - setFieldValue("form:propertySheet:propertSectionTextField:descProp:desc", description); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - - Select select = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select.selectByVisibleText(instanceName); - select.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue(ID_RESOURCE_TABLE, jndiName, "col1"); - assertEquals(jndiName, getText(prefix + "col1:link")); - assertEquals(description, getText(prefix + "col4:typeDesc")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //test disable button - isElementPresent("propertyForm:resourcesTable:topActionsGroup1:newButton"); - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - //test manage target - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(clickId); - clickAndWait("propertyForm:resEditTabs:targetTab"); - clickAndWait("propertyForm:targetTable:topActionsGroup1:manageTargetButton"); - Select select1 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_selected"))); - select1.selectByVisibleText(instanceName); - select1.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton"); - clickByIdAction("form:propertyContentPage:topButtons:saveButton"); - - //delete jdbc resource - clickAndWait("treeForm:tree:resources:JDBC:jdbcResources:jdbcResources_link"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", jndiName); - - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - } - - public void createJDBCResource(String jndiName, String description, String target, String targetType) { - if (targetType.equals("standalone")) { - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(target); - } else if (targetType.equals("cluster")) { - ClusterTest clusterTest = new ClusterTest(); - clusterTest.createCluster(target); - } - clickAndWait("treeForm:tree:resources:JDBC:jdbcResources:jdbcResources_link"); - isElementPresent("propertyForm:resourcesTable:topActionsGroup1:newButton"); - clickByIdAction("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - setFieldValue("form:propertySheet:propertSectionTextField:nameNew:name", jndiName); - setFieldValue("form:propertySheet:propertSectionTextField:descProp:desc", description); - - if (targetType.equals("standalone")) { - Select select = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select.selectByVisibleText(target); - select.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - } else if (targetType.equals("cluster")) { - Select select = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select.selectByVisibleText(target); - select.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - } - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue(ID_RESOURCE_TABLE, jndiName, "col1"); - assertEquals(jndiName, getText(prefix + "col1:link")); - assertEquals(description, getText(prefix + "col4:typeDesc")); - - } - - public void deleteJDBCResource(String jndiName, String target, String targetType) { - clickAndWait("treeForm:tree:resources:JDBC:jdbcResources:jdbcResources_link"); - String prefix = getTableRowByValue(ID_RESOURCE_TABLE, jndiName, "col1"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", jndiName); - assertFalse(isTextPresent(prefix, jndiName, ID_RESOURCE_TABLE)); - if (targetType.equals("standalone")) { - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - prefix = getTableRowByValue("propertyForm:instancesTable", target, "col1"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", target); - assertFalse(isTextPresent(prefix, target, "propertyForm:instancesTable")); - } else if (targetType.equals("cluster")) { - clickAndWait("treeForm:tree:clusterTreeNode:clusterTreeNode_link"); - prefix = getTableRowByValue("propertyForm:clustersTable", target, "col1"); - deleteRow("propertyForm:clustersTable:topActionsGroup1:button1", "propertyForm:clustersTable", target); - assertFalse(isTextPresent(prefix, target, "propertyForm:clustersTable")); - } - } - - - - private void testDisableBtn(String clickId) { - isElementPresent("propertyForm:propertyContentPage:topButtons:saveButton"); - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:statusProp:enabled"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(!driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:statusProp:enabled")).isSelected()); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - isElementPresent(clickId); - } - - private void testEnableBtn(String clickId) { - clickByIdAction(clickId); - isElementPresent("propertyForm:propertyContentPage:topButtons:saveButton"); - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:statusProp:enabled"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:statusProp:enabled")).isSelected()); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - isElementPresent(clickId); - } - -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JmsResourcesTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JmsResourcesTest.java deleted file mode 100644 index 24cd965f564..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JmsResourcesTest.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import static org.junit.Assert.assertEquals; -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -/** - * - * @author Jeremy Lv - * - */ -public class JmsResourcesTest extends BaseSeleniumTestClass { - - @Test - public void testAddingConnectionFactories() throws Exception { - final String poolName = "JMSConnFactory" + generateRandomString(); - final String description = "Test Pool - " + poolName; - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - clickAndWait("treeForm:tree:resources:jmsResources:jmsConnectionFactories:jmsConnectionFactories_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - setFieldValue("form:propertySheet:generalPropertySheet:jndiProp:jndiProp", poolName); - Select select = new Select(driver.findElement(By.id("form:propertySheet:generalPropertySheet:resTyped:resType"))); - select.selectByVisibleText("javax.jms.TopicConnectionFactory"); - setFieldValue("form:propertySheet:generalPropertySheet:descProp:descProp", description); - Select select1 = new Select(driver.findElement(By.id("form:propertySheet:poolPropertySheet:transprop:trans"))); - select1.selectByVisibleText("LocalTransaction"); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", poolName, "colName"); - assertEquals(poolName, getText(prefix + "colName:link")); - - //test disable button - String selectId = prefix + "colSelect:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:disableButton"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:deleteConnButton"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:deleteConnButton"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - - @Test - public void testAddingConnectionFactoriesWithTargets() throws Exception { - final String poolName = "JMSConnFactory" + generateRandomString(); - final String description = "Test Pool - " + poolName; - final String instanceName = "standalone" + generateRandomString(); - - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(instanceName); - - clickAndWait("treeForm:tree:resources:jmsResources:jmsConnectionFactories:jmsConnectionFactories_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - setFieldValue("form:propertySheet:generalPropertySheet:jndiProp:jndiProp", poolName); - Select select = new Select(driver.findElement(By.id("form:propertySheet:generalPropertySheet:resTyped:resType"))); - select.selectByVisibleText("javax.jms.TopicConnectionFactory"); - setFieldValue("form:propertySheet:generalPropertySheet:descProp:descProp", description); - Select select1 = new Select(driver.findElement(By.id("form:propertySheet:poolPropertySheet:transprop:trans"))); - select1.selectByVisibleText("LocalTransaction"); - - - Select select2 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select2.selectByVisibleText(instanceName); - select2.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", poolName, "colName"); - assertEquals(poolName, getText(prefix + "colName:link")); - - //test disable button - String selectId = prefix + "colSelect:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:disableButton"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - String clickId = prefix + "colName:link"; - clickByIdAction(clickId); - clickAndWait("propertyForm:resEditTabs:targetTab"); - clickAndWait("propertyForm:targetTable:topActionsGroup1:manageTargetButton"); - Select select5 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_selected"))); - select5.selectByVisibleText(instanceName); - select5.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton"); - clickByIdAction("form:propertyContentPage:topButtons:saveButton"); - - - gotoDasPage(); - clickAndWait("treeForm:tree:resources:jmsResources:jmsConnectionFactories:jmsConnectionFactories_link"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:deleteConnButton"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - } - - @Test - public void testAddingDestinationResources() throws Exception { - final String resourceName = "JMSDestination" + generateRandomString(); - final String description = "Test Destination - " + resourceName; - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - clickAndWait("treeForm:tree:resources:jmsResources:jmsDestinationResources:jmsDestinationResources_link"); - sleep(1000); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - setFieldValue("form:propertyContentPage:propertySheet:propertSectionTextField:jndiProp:jndi", resourceName); - setFieldValue("form:propertyContentPage:propertySheet:propertSectionTextField:nameProp:name", "somePhysicalDestination"); - setFieldValue("form:propertyContentPage:propertySheet:propertSectionTextField:descProp:desc", description); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resourceName, "colName"); - assertEquals(resourceName, getText(prefix + "colName:link")); - - - //test disable button - String selectId = prefix + "colSelect:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:disableButton"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:deleteDestButton"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:deleteDestButton"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - - @Test - public void testAddingDestinationResourcesWithTargets() throws Exception { - final String resourceName = "JMSDestination" + generateRandomString(); - final String instanceName = "standalone" + generateRandomString(); - final String description = "Test Destination - " + resourceName; - - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(instanceName); - - clickAndWait("treeForm:tree:resources:jmsResources:jmsDestinationResources:jmsDestinationResources_link"); - sleep(1000); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - setFieldValue("form:propertyContentPage:propertySheet:propertSectionTextField:jndiProp:jndi", resourceName); - setFieldValue("form:propertyContentPage:propertySheet:propertSectionTextField:nameProp:name", "somePhysicalDestination"); - setFieldValue("form:propertyContentPage:propertySheet:propertSectionTextField:descProp:desc", description); - - Select select = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select.selectByVisibleText(instanceName); - select.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resourceName, "colName"); - assertEquals(resourceName, getText(prefix + "colName:link")); - - //test disable button - String selectId = prefix + "colSelect:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:disableButton"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:enableButton"); - String clickId = prefix + "colName:link"; - clickByIdAction(clickId); - clickAndWait("propertyForm:resEditTabs:targetTab"); - clickAndWait("propertyForm:targetTable:topActionsGroup1:manageTargetButton"); - Select select5 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_selected"))); - select5.selectByVisibleText(instanceName); - select5.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton"); - clickByIdAction("form:propertyContentPage:topButtons:saveButton"); - - gotoDasPage(); - clickAndWait("treeForm:tree:resources:jmsResources:jmsDestinationResources:jmsDestinationResources_link"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:deleteDestButton"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - } - -/* - @Test - public void testAddingTransport() { - - } -*/ -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JndiTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JndiTest.java deleted file mode 100644 index fa4ef2c90ca..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JndiTest.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -/** - * - * @author Jeremy Lv - * - */ -public class JndiTest extends BaseSeleniumTestClass { - - @Test - public void testCustomResources() { - final String resourceName = "customResource" + generateRandomString(); - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - clickAndWait("treeForm:tree:resources:jndi:customResources:customResources_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - isElementPresent("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext"); - setFieldValue("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext", resourceName); - Select select = new Select(driver.findElement(By.id("form:propertySheet:propertSectionTextField:cp:Classname"))); - select.selectByVisibleText("java.lang.Double"); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resourceName, "col1"); - assertEquals(resourceName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("form1:basicTable", count); - clickAndWait("form1:propertyContentPage:topButtons:cancelButton"); - - //test disable button - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button1"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", resourceName); - } - - @Test - public void testCustomResourcesWithTargets() { - final String resourceName = "customResource" + generateRandomString(); - final String instanceName = "standalone" + generateRandomString(); - - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(instanceName); - - clickAndWait("treeForm:tree:resources:jndi:customResources:customResources_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - isElementPresent("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext"); - setFieldValue("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext", resourceName); - Select select = new Select(driver.findElement(By.id("form:propertySheet:propertSectionTextField:cp:Classname"))); - select.selectByVisibleText("java.lang.Double"); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - - Select select2 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select2.selectByVisibleText(instanceName); - select2.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resourceName, "col1"); - assertEquals(resourceName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("form1:basicTable", count); - clickAndWait("form1:propertyContentPage:topButtons:cancelButton"); - - - //test disable button - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(clickId); - clickAndWait("form1:resEditTabs:targetTab"); - clickAndWait("propertyForm:targetTable:topActionsGroup1:manageTargetButton"); - Select select5 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_selected"))); - select5.selectByVisibleText(instanceName); - select5.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton"); - clickByIdAction("form:propertyContentPage:topButtons:saveButton"); - - gotoDasPage(); - clickAndWait("treeForm:tree:resources:jndi:customResources:customResources_link"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", resourceName); - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - } - - @Test - public void testExternalResources() { - final String resourceName = "externalResource" + generateRandomString(); - final String description = resourceName + " - description"; - - StandaloneTest standaloneTest = new StandaloneTest(); - ClusterTest clusterTest = new ClusterTest(); - standaloneTest.deleteAllStandaloneInstances(); - clusterTest.deleteAllCluster(); - - clickAndWait("treeForm:tree:resources:jndi:externalResources:externalResources_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - isElementPresent("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext"); - setFieldValue("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext", resourceName); - Select select = new Select(driver.findElement(By.id("form:propertySheet:propertSectionTextField:cp:Classname"))); - select.selectByVisibleText("java.lang.Double"); - setFieldValue("form:propertySheet:propertSectionTextField:jndiLookupProp:jndiLookup", resourceName); - setFieldValue("form:propertySheet:propertSectionTextField:descProp:desc", description); - addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resourceName, "col1"); - assertEquals(resourceName, getText(prefix + "col1:link")); - - //test disable button - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button1"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", resourceName); - } - - @Test - public void testExternalResourcesWithTargets() { - final String resourceName = "externalResource" + generateRandomString(); - final String description = resourceName + " - description"; - final String instanceName = "standalone" + generateRandomString(); - - StandaloneTest instanceTest = new StandaloneTest(); - instanceTest.createStandAloneInstance(instanceName); - - clickAndWait("treeForm:tree:resources:jndi:externalResources:externalResources_link"); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - isElementPresent("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext"); - setFieldValue("form:propertySheet:propertSectionTextField:jndiTextProp:jnditext", resourceName); - Select select = new Select(driver.findElement(By.id("form:propertySheet:propertSectionTextField:cp:Classname"))); - select.selectByVisibleText("java.lang.Double"); - setFieldValue("form:propertySheet:propertSectionTextField:jndiLookupProp:jndiLookup", resourceName); - setFieldValue("form:propertySheet:propertSectionTextField:descProp:desc", description); - int count = addTableRow("form:basicTable", "form:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form:basicTable:rowGroup1:0:col4:col1St", "description"); - - Select select2 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available"))); - select2.selectByVisibleText(instanceName); - select2.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_addButton"); - clickAndWait("form:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", resourceName, "col1"); - assertEquals(resourceName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTableRowCount("form:basicTable", count); - clickAndWait("form:propertyContentPage:topButtons:cancelButton"); - - //test disable button - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button3"); - - //test enable button - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(selectId); - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:button2"); - - waitforBtnDisable("propertyForm:resourcesTable:topActionsGroup1:button2"); - clickByIdAction(clickId); - clickAndWait("form:resEditTabs:targetTab"); - clickAndWait("propertyForm:targetTable:topActionsGroup1:manageTargetButton"); - Select select5 = new Select(driver.findElement(By.id("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_selected"))); - select5.selectByVisibleText(instanceName); - select5.selectByVisibleText("server"); - clickByIdAction("form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton"); - clickByIdAction("form:propertyContentPage:topButtons:saveButton"); - - //Delete the External resource - gotoDasPage(); - clickAndWait("treeForm:tree:resources:jndi:externalResources:externalResources_link"); - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", resourceName); - //Delete the instance - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JvmSettingsTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JvmSettingsTest.java deleted file mode 100644 index 4a598519b00..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/JvmSettingsTest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.NoSuchElementException; - -import static org.junit.Assert.*; -/** - * - * @author Jeremy Lv - * - */ -public class JvmSettingsTest extends BaseSeleniumTestClass { - - public static final String ID_JVM_OPTIONS_TABLE = "propertyForm:basicTable"; - - @Test - public void testJvmGeneralSettings() { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:jvmSettings:jvmSettings_link"); - if (!driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:debugEnabledProp:debug")).isSelected()) - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:debugEnabledProp:debug"); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "a"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "b"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "c"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:jvmSettings:jvmSettings_link"); - assertTableRowCount("propertyForm:basicTable", count); - assertTrue(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:debugEnabledProp:debug")).isSelected()); - - //delete the property used to test - clickByIdAction("propertyForm:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:basicTable:topActionsGroup1:button1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - @Test - public void testJvmSettings() { - gotoDasPage(); - String jvmOptionName = "-Dfoo"+generateRandomString(); - clickAndWait("treeForm:tree:configurations:server-config:jvmSettings:jvmSettings_link"); - clickAndWait("propertyForm:javaConfigTab:jvmOptions"); - - sleep(5000); - int count = addTableRow(ID_JVM_OPTIONS_TABLE, "propertyForm:basicTable:topActionsGroup1:addSharedTableButton", "Options"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", jvmOptionName); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:jvmSettings:jvmSettings_link"); - clickAndWait("propertyForm:javaConfigTab:jvmOptions"); - sleep(5000); - assertTableRowCount(ID_JVM_OPTIONS_TABLE, count); - - //delete the property used to test - String prefix = getTableRowByVal("propertyForm:basicTable", jvmOptionName, "col3:col1St"); - String selectId = prefix + "col1:select"; - clickByIdAction(selectId); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:basicTable:topActionsGroup1:button1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - @Test - public void testJvmProfilerForDas() { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:jvmSettings:jvmSettings_link"); - clickAndWait("propertyForm:javaConfigTab:profiler"); - try { - if (driver.findElement(By.id(("propertyForm:propertyContentPage:topButtons:deleteButton"))).isEnabled()) { - clickAndWait("propertyForm:propertyContentPage:topButtons:deleteButton"); - if (driver.findElement(By.className("label_sun4")).isDisplayed()) { - assertEquals("Profiler successfully deleted.", driver.findElement(By.className("label_sun4")).getText());; - } - } - } catch(NoSuchElementException e){ - setFieldValue("propertyForm:propertySheet:propertSectionTextField:profilerNameProp:ProfilerName", "profiler" + generateRandomString()); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton", "Options"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "-Dfoo=" + generateRandomString()); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - assertTableRowCount("propertyForm:basicTable", count); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:jvmSettings:jvmSettings_link"); - clickAndWait("propertyForm:javaConfigTab:profiler"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:deleteButton"); - assertTrue(closeAlertAndGetItsText().matches("^Profiler will be deleted\\. Continue[\\s\\S]$")); - } - } - - @Test - public void testJvmProfilerForRunningInstance() { - testProfilerForInstance (true); - } - - @Test - public void testJvmProfilerForStoppedInstance() { - testProfilerForInstance (false); - } - - - private void testProfilerForInstance(boolean start){ - String instanceName = generateRandomString(); - String configName = instanceName+"-config"; - StandaloneTest st = new StandaloneTest(); - st.createStandAloneInstance(instanceName); - if (start){ - st.startInstance(instanceName); - } - - isElementPresent("treeForm:tree:configurations:"+ configName +":"+ configName +"_turner:"+ configName +"_turner_image"); - clickByIdAction("treeForm:tree:configurations:"+ configName +":"+ configName +"_turner:"+ configName +"_turner_image"); - isElementPresent("treeForm:tree:configurations:"+ configName +":jvmSettings:jvmSettings_link"); - clickAndWait("treeForm:tree:configurations:"+ configName +":jvmSettings:jvmSettings_link"); - clickAndWait("propertyForm:javaConfigTab:profiler" ); - - setFieldValue("propertyForm:propertySheet:propertSectionTextField:profilerNameProp:ProfilerName", "profiler" + generateRandomString()); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton", "Options"); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "-Dfoo=" + generateRandomString()); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - assertTableRowCount("propertyForm:basicTable", count); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:"+ configName +":jvmSettings:jvmSettings_link"); - clickAndWait("propertyForm:javaConfigTab:profiler"); - clickAndWait("propertyForm:propertyContentPage:topButtons:deleteButton"); - assertTrue(closeAlertAndGetItsText().matches("^Profiler will be deleted\\. Continue[\\s\\S]$")); - assertTrue(driver.findElement(By.id("propertyForm:propertyContentPage:topButtons:newButton")).isDisplayed()); - - if (start){ - st.gotoStandaloneInstancesPage(); - st.stopInstance(instanceName); - } - st.deleteStandAloneInstance(instanceName); - } - -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LifecycleModulesTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LifecycleModulesTest.java deleted file mode 100644 index 1571e28977f..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LifecycleModulesTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * - * @author jeremylv - * - */ -public class LifecycleModulesTest extends BaseSeleniumTestClass { - - public static final String ID_LIFECYCLE_TABLE = "propertyForm:deployTable"; - - @Test - public void testLifecycleModules() { - final String lifecycleName = "TestLifecycle"+generateRandomString(); - final String lifecycleClassname = "org.foo.nonexistent.Lifecyclemodule"; - - gotoDasPage(); - clickByIdAction("treeForm:tree:lifecycles:lifecycles_link"); - clickByIdAction("propertyForm:deployTable:topActionsGroup1:newButton"); - setFieldValue("form:propertySheet:propertSectionTextField:IdTextProp:IdText", lifecycleName); - setFieldValue("form:propertySheet:propertSectionTextField:classNameProp:classname", lifecycleClassname); - clickByIdAction("form:propertyContentPage:topButtons:newButton"); - String prefix = getTableRowByValue(ID_LIFECYCLE_TABLE, lifecycleName, "col1"); - try { - assertEquals(lifecycleName, getText(prefix + "col1:link")); - } catch (Error e) { - verificationErrors.append(e.toString()); - }; - - //test Disable button and add some property - String clickId = getTableRowByValue(ID_LIFECYCLE_TABLE, lifecycleName, "col1")+"col0:select"; - testDisableButton(clickId, prefix); - - //test Enable button and delete some property - testEnableButton(clickId, prefix); - - //delete the lifecycle - testDeleteButton(clickId); - } - - private void testDeleteButton(String clickId) { - gotoDasPage(); - clickByIdAction("treeForm:tree:lifecycles:lifecycles_link"); - clickByIdAction(clickId); - clickByIdAction("propertyForm:deployTable:topActionsGroup1:button1"); - String msg = closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - try { - assertTrue(msg.indexOf("Selected Lifecycle Module(s) will be deleted.") != -1); - } catch (Error e) { - verificationErrors.append(e.toString()); - } - } - - private void testEnableButton(String clickId, String prefix) { - gotoDasPage(); - clickByIdAction("treeForm:tree:lifecycles:lifecycles_link"); - clickByIdAction(clickId); - clickByIdAction("propertyForm:deployTable:topActionsGroup1:button2"); - isCheckboxSelected(clickId); - clickByIdAction(prefix + "col1:link"); - - //delete property - isElementPresent("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - clickByIdAction("propertyForm:basicTable:rowGroup1:0:col1:select"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - assertEquals(true, driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:statusEdit:status")).isSelected()); - } - - private void testDisableButton(String clickId, String prefix) { - clickByIdAction(clickId); - isElementPresent("propertyForm:deployTable:topActionsGroup1:button3"); - clickByIdAction("propertyForm:deployTable:topActionsGroup1:button3"); - isCheckboxSelected(clickId); - clickByIdAction(prefix + "col1:link"); - - //add property and verify - isElementPresent("propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - int lifecyclePropCount = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St","test"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St","value"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("propertyForm:basicTable", lifecyclePropCount); - assertEquals(false, driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:statusEdit:status")).isSelected()); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LogViewerTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LogViewerTest.java deleted file mode 100644 index 70e8281e331..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LogViewerTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import static org.junit.Assert.*; - -import org.junit.Test; -import org.openqa.selenium.By; - -/** - * - * @author Jeremy Lv - * - */ -public class LogViewerTest extends BaseSeleniumTestClass { - - // basic sanity test for log viewer - @Test - public void testLogViewer() { - gotoDasPage(); - clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); - String winHandleBefore = driver.getWindowHandle(); - clickByIdAction("propertyForm:propertyContentPage:logViewer"); - for(String winHandle : driver.getWindowHandles()){ - driver.switchTo().window(winHandle); - } - - assertTrue(driver.findElement(By.className("TtlTxt_sun4")).getText().equals("Log Viewer")); - driver.close(); - - driver.switchTo().window(winHandleBefore); - } - - // basic sanity test for raw log viewer - @Test - public void testRawLogViewer() { - gotoDasPage(); - clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); - String winHandleBefore = driver.getWindowHandle(); - clickByIdAction("propertyForm:propertyContentPage:logViewerRaw"); - for(String winHandle : driver.getWindowHandles()){ - driver.switchTo().window(winHandle); - } - - assertTrue(driver.findElement(By.className("TtlTxt_sun4")).getText().equals("Raw Log Viewer")); - driver.close(); - - driver.switchTo().window(winHandleBefore); - - } -} - diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LoggerSettingsTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LoggerSettingsTest.java deleted file mode 100644 index e366c3648c1..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/LoggerSettingsTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class LoggerSettingsTest extends BaseSeleniumTestClass { - - @Test - public void testLoggerSettings() { - gotoDasPage(); - final String rotationLimit = Integer.toString(generateRandomNumber()); - final String rotationTimeLimit = Integer.toString(generateRandomNumber()); - final String flushFrequency = Integer.toString(generateRandomNumber()); - - clickAndWait("treeForm:tree:configurations:server-config:loggerSetting:loggerSetting_link"); - if (!driver.findElement(By.id("form1:general:sheetSection:writeSystemLogEnabledProp:writeSystemLogEnabled")).isSelected()){ - clickByIdAction("form1:general:sheetSection:writeSystemLogEnabledProp:writeSystemLogEnabled"); - } - setFieldValue("form1:general:sheetSection:FileRotationLimitProp:FileRotationLimit", rotationLimit); - setFieldValue("form1:general:sheetSection:FileRotationTimeLimitProp:FileRotationTimeLimit", rotationTimeLimit); - setFieldValue("form1:general:sheetSection:FlushFrequencyProp:FlushFrequency", flushFrequency); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - - clickAndWait("form1:loggingTabs:loggerLevels"); - - clickAndWait("treeForm:tree:configurations:server-config:loggerSetting:loggerSetting_link"); - assertTrue(driver.findElement(By.id("form1:general:sheetSection:writeSystemLogEnabledProp:writeSystemLogEnabled")).isSelected()); - assertEquals(rotationLimit, getValue("form1:general:sheetSection:FileRotationLimitProp:FileRotationLimit", "value")); - assertEquals(rotationTimeLimit, getValue("form1:general:sheetSection:FileRotationTimeLimitProp:FileRotationTimeLimit", "value")); - assertEquals(flushFrequency, getValue("form1:general:sheetSection:FlushFrequencyProp:FlushFrequency", "value")); - } - - @Test - public void testLogLevels() { - gotoDasPage(); - final String loggerName = "testLogger" + Integer.toString(generateRandomNumber()); - clickAndWait("treeForm:tree:configurations:server-config:loggerSetting:loggerSetting_link"); - clickAndWait("form1:loggingTabs:loggerLevels"); - String newLevel = "WARNING"; - if ("WARNING".equals(getValue("form1:basicTable:rowGroup1:0:col3:level", "value"))) { - newLevel = "INFO"; - } - - Select select = new Select(driver.findElement(By.id("form1:basicTable:topActionsGroup1:change_list"))); - select.selectByVisibleText(newLevel); - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - - waitForButtonEnabled("form1:basicTable:topActionsGroup1:button2"); - - clickByIdAction("form1:basicTable:topActionsGroup1:button2"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button2"); - clickAndWait("form1:title:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:loggerSetting:loggerSetting_link"); - clickAndWait("form1:loggingTabs:loggerLevels"); - assertEquals(newLevel, getValue("form1:basicTable:rowGroup1:0:col3:level", "value")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:loggerSetting:loggerSetting_link"); - clickAndWait("form1:loggingTabs:loggerLevels"); - // Add Logger - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton", "Logger Settings"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", loggerName); - clickAndWait("form1:title:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - assertTableRowCount("form1:basicTable", count); - - //delete the property used to test - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:loggerSetting:loggerSetting_link"); - clickAndWait("form1:loggingTabs:loggerLevels"); - String prefix = getTableRowByVal("form1:basicTable", loggerName, "col2:col1St"); - String selectId = prefix + "col1:select"; - clickByIdAction(selectId); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:title:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/MonitoringTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/MonitoringTest.java deleted file mode 100644 index 0737bc666f8..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/MonitoringTest.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import java.io.File; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class MonitoringTest extends BaseSeleniumTestClass { - - private static final String MONITOR_LEVEL_OFF = "OFF"; - private static final String MONITOR_LEVEL_LOW = "LOW"; - private static final String MONITOR_LEVEL_HIGH = "HIGH"; - - private static final String MONITOR_LEVEL_COL_ID = "col3"; - private static final String MONITOR_COMP_COL_ID = "col2"; - private static final String MONITOR_COMP_SELECT_ID = "col1"; - - public static final String TARGET_SERVER_TYPE = "server"; - public static final String TARGET_STANDALONE_TYPE = "standalone"; - public static final String TARGET_CLUSTER_TYPE = "cluster"; - - private static final String MONITORING_APPLICATIONS_COMPONENT_DROPDOWN_ID = "propertyForm:propertyContentPage:propertySheet:viewPropertySection:ApplicationProp:ComponentView_list"; - private static final String MONITORING_APPLICATIONS_APPLICATION_DROPDOWN_ID = "propertyForm:propertyContentPage:propertySheet:viewPropertySection:ApplicationProp:View_list"; - - @Test - public void testMonitoringServicePage() { - gotoDasPage(); - setMonitorLevel("Web Container", MONITOR_LEVEL_LOW, false, "server", TARGET_SERVER_TYPE); - setMonitorLevel(null, MONITOR_LEVEL_OFF, true, "server", TARGET_SERVER_TYPE); - } - - @Test - public void testMonitoringServerPage() { - gotoDasPage(); - monitoringJvmStats("server", TARGET_SERVER_TYPE); - monitoringWebContainerStats("server", TARGET_SERVER_TYPE); - monitoringTransactionServiceStats("server", TARGET_SERVER_TYPE); - -// //This seems a bug to the glassfish v4 need to be resolved! -// monitoringSecurityStats("server", TARGET_SERVER_TYPE); - - monitoringHttpServiceStats("server", TARGET_SERVER_TYPE); - } - - @Test - public void testMonitoringApplicationsPage() { - gotoDasPage(); - ejbTimerMonitoring("server", TARGET_SERVER_TYPE); - gotoDasPage(); - statefulAndStatelessBeanMonitoring("server", TARGET_SERVER_TYPE); - } - - //Monitoring service related methods. - private void goToMonitoringServicePage(String target, String targetType) { - goToMonitoringApplicationsPage(target, targetType); - while(!driver.findElement(By.linkText("Configure Monitoring")).isDisplayed()){ - sleep(500); - } -// waitForElementPresent("TtlTxt_sun4", "Application Monitoring"); - driver.findElement(By.linkText("Configure Monitoring")).click(); - } - - private void setMonitorLevel(String component, String monLevel, boolean isAll, String target, String targetType) { - gotoDasPage(); - goToMonitoringServicePage(target, targetType); - waitForElementPresent("TtlTxt_sun4", "Monitoring Service"); - if (isAll) { - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - } else { - selectTableRowByValue("form1:basicTable", component, MONITOR_COMP_SELECT_ID, MONITOR_COMP_COL_ID); - } - waitForButtonEnabled("form1:basicTable:topActionsGroup1:button1"); - Select select = new Select(driver.findElement(By.id("form1:basicTable:topActionsGroup1:change_list"))); - select.selectByVisibleText(monLevel); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:title:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - //Test whether the level has changed to monLevel or not. - //clickAndWait("treeForm:tree:configurations:server-config:monitor:monitor_link", TRIGGER_MONITORING_SERVICE); - gotoDasPage(); - goToMonitoringServicePage(target, targetType); - Select select1; - if (isAll) { - select1 = new Select(driver.findElement(By.id("form1:basicTable:rowGroup1:0:" + MONITOR_LEVEL_COL_ID + ":level"))); - } else { - String id = getTableRowByValue("form1:basicTable", component, MONITOR_COMP_COL_ID); - select1 = new Select(driver.findElement(By.id(id + MONITOR_LEVEL_COL_ID + ":level"))); - } - assertTrue(select1.getFirstSelectedOption().getAttribute("value").equals(monLevel)); - } - - //Monitoring->Server related methods. - private void goToMonitoringServerPage(String target, String targetType) { - if (targetType.equals(TARGET_SERVER_TYPE)) { - clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); - clickAndWait("propertyForm:serverInstTabs:monitoring"); - waitForElementPresent("TtlTxt_sun4", "Application Monitoring"); - clickAndWait("propertyForm:serverInstTabs:monitoring:monitor_server"); - waitForElementPresent("TtlTxt_sun4", "Server Monitoring"); - } else if (targetType.equals(TARGET_STANDALONE_TYPE)) { - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - String prefix = getTableRowByValue("propertyForm:instancesTable", target, "col1"); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - clickAndWait("propertyForm:standaloneInstanceTabs:monitoring"); - waitForElementPresent("TtlTxt_sun4", "Application Monitoring"); - clickAndWait("propertyForm:standaloneInstanceTabs:monitoring:monitorServer"); - waitForElementPresent("TtlTxt_sun4", "Server Monitoring"); - } - } - - private void monitoringJvmStats(String target, String targetType) { - final String threadInfoHeader = "Thread Info Statistics"; - final String jvmMemHeader = "JVM: Memory Statistics"; - final String jvmOsHeader = "JVM: Operating System Statistics"; - final String jvmClassLoadingHeader = "JVM: Class Loading Statistics"; - final String jvmCompilationHeader = "JVM: Compilation Statistics"; - final String jvmRuntimeHeader = "JVM: Runtime Statistics"; - final String jvmThreadHeader = "JVM: Thread System Statistics"; - - final String threadInfoData = "DeadlockedThreads"; - final String jvmMemData = "UsedNonHeapSize"; - final String jvmOsData = "AvailableProcessors"; - final String jvmClassLoadingData = "UnLoadedClassCount"; - final String jvmCompilationData = "TotalCompilationTime"; - final String jvmRuntimeData = "VmName"; - final String jvmThreadData = "DeadlockedThreads"; - - final String dropDownId = "propertyForm:propertyContentPage:propertySheet:viewPropertySection:VsProp:View_list"; - final String gcCopyHeader = "Garbage Collectors Statistics : Copy"; - final String gcCopyData = "CollectionCount"; - final String gcMarkSweepHeader = "Garbage Collectors Statistics : MarkSweepCompact"; - final String gcMarkSweepData = "CollectionCount"; - final String threadHeader = "Thread Info Statistics"; - final String threadData = "ThreadState"; - - setMonitorLevel("Jvm", MONITOR_LEVEL_HIGH, false, target, targetType); - goToMonitoringServerPage(target, targetType); - - verifyMonitoringStat("jvmThreadInfoStats", threadInfoData, threadInfoHeader); - verifyMonitoringClickStat("jvmMemStats", jvmMemData, jvmMemHeader); - verifyMonitoringClickStat("osStats", jvmOsData, jvmOsHeader); - verifyMonitoringClickStat("clStats", jvmClassLoadingData, jvmClassLoadingHeader); - verifyMonitoringClickStat("comStats", jvmCompilationData, jvmCompilationHeader); - verifyMonitoringClickStat("runtimeStats", jvmRuntimeData, jvmRuntimeHeader); - verifyMonitoringClickStat("jvmThreadStats", jvmThreadData, jvmThreadHeader); - - Select select = new Select(driver.findElement(By.id(dropDownId))); - select.selectByVisibleText("PS Scavenge"); - verifyMonitoringStat("gcStats", gcCopyData, gcCopyHeader); - sleep(1000); - Select select1 = new Select(driver.findElement(By.id(dropDownId))); - select1.selectByVisibleText("PS MarkSweep"); - verifyMonitoringStat("gcStats", gcMarkSweepData, gcMarkSweepHeader); - sleep(1000); - Select select2 = new Select(driver.findElement(By.id(dropDownId))); - select2.selectByVisibleText("thread-1"); - verifyMonitoringStat("jvmThreadInfoStats", threadData, threadHeader); - - setMonitorLevel("Jvm", MONITOR_LEVEL_OFF, false, target, targetType); - } - - private void monitoringWebContainerStats(String target, String targetType) { - final String webContainerServletHeader = "Web Container: Servlet Statistics"; - final String webContainerSessionHeader = "Web Container: Session Statistics"; - final String webContainerRequestHeader = "Web Container: Request Statistics"; - final String webContainerJspHeader = "Web Container: JSP Statistics"; - final String webContainerServletData = "ActiveServletsLoaded"; - final String webContainerSessionData = "SessionsTotal"; - final String webContainerRequestData = "ProcessingTime"; - final String webContainerJspData = "JspCount"; - - setMonitorLevel("Web Container", MONITOR_LEVEL_HIGH, false, target, targetType); - goToMonitoringServerPage(target, targetType); - - verifyMonitoringClickStat("servletsWeb", webContainerServletData, webContainerServletHeader); - verifyMonitoringClickStat("sessionWeb", webContainerSessionData, webContainerSessionHeader); - verifyMonitoringClickStat("requestWebStats", webContainerRequestData, webContainerRequestHeader); - verifyMonitoringClickStat("jspWebStats", webContainerJspData, webContainerJspHeader); - - setMonitorLevel("Web Container", MONITOR_LEVEL_OFF, false, target, targetType); - } - - private void monitoringTransactionServiceStats(String target, String targetType) { - final String transactionServiceHeader = "Transaction Service Statistics"; - final String transactionServiceData = "RolledbackCount"; - - setMonitorLevel("Transaction Service", MONITOR_LEVEL_HIGH, false, target, targetType); - goToMonitoringServerPage(target, targetType); - verifyMonitoringStat("txnServiceStats", transactionServiceData, transactionServiceHeader); - - setMonitorLevel("Transaction Service", MONITOR_LEVEL_OFF, false, target, targetType); - } - -// //This seems a bug to the glassfish v4 need to be resolved! -// private void monitoringSecurityStats(String target, String targetType) { -// final String webAppSecurityDeploymentHeader = "Web Application Security Deployment Statistics"; -// final String webAppSecurityDeploymentData = "WebSecurityManagerCount"; -// -//// setMonitorLevel("Security", MONITOR_LEVEL_HIGH, false, target, targetType); -// goToMonitoringServerPage(target, targetType); -// verifyMonitoringClickStat("webSecurity", webAppSecurityDeploymentData, webAppSecurityDeploymentHeader); -//// setMonitorLevel("Security", MONITOR_LEVEL_OFF, false, target, targetType); -// } - - private void monitoringHttpServiceStats(String target, String targetType) { - final String virtualStatsHeader = "Virtual Server Statistics : server"; - final String requestStatsHeader = "Request Statistics : server"; - final String virtualStatsData = "Id"; - final String requestStatsData = "MaxOpenConnections"; - - final String fileCacheStatsHeader = "File Cache Statistics : admin-listener"; - final String keepAliveStatsHeader = "Keep Alive Statistics : admin-listener"; - final String connectionQueueStatsHeader = "Connection Queue Statistics : admin-listener"; - final String threadPoolStatsHeader = "Thread Pool Statistics : admin-listener"; - final String fileCacheStatsData = "ContentMissesCount"; - final String keepAliveStatsData = "CountTimeouts"; - final String connectionQueueStatsData = "CountQueued15MinutesAverage"; - final String threadPoolStatsData = "CoreThreads"; - - String dropDownId = "propertyForm:propertyContentPage:propertySheet:viewPropertySection:VsProp:View_list"; - - setMonitorLevel("Http Service", MONITOR_LEVEL_HIGH, false, target, targetType); - goToMonitoringServerPage(target, targetType); - - Select select = new Select(driver.findElement(By.id(dropDownId))); - select.selectByVisibleText("server"); - - verifyMonitoringStat("virtualServerStats", virtualStatsData, virtualStatsHeader); - verifyMonitoringStat("httpServiceStats", requestStatsData, requestStatsHeader); - - Select select1 = new Select(driver.findElement(By.id(dropDownId))); - select1.selectByVisibleText("admin-listener"); - verifyMonitoringStat("fileCacheStats", fileCacheStatsData, fileCacheStatsHeader); - verifyMonitoringClickStat("keepAliveStats", keepAliveStatsData, keepAliveStatsHeader); - verifyMonitoringClickStat("connectionQueueStats", connectionQueueStatsData, connectionQueueStatsHeader); - verifyMonitoringClickStat("threadPoolStats", threadPoolStatsData, threadPoolStatsHeader); - - setMonitorLevel("Http Service", MONITOR_LEVEL_OFF, false, target, targetType); - } - - private void verifyMonitoringStat(String stat, String statData, String statHeader) { - assertEquals(statData, driver.findElement(By.id("propertyForm:propertyContentPage:basicTable:" + stat+ ":0:col2")).getText()); - clickAndWait("propertyForm:propertyContentPage:basicTable:" + stat + ":_groupHeader:_groupPanelToggleButton:_groupPanelToggleButton_image"); - clickByIdAction("propertyForm:propertyContentPage:basicTable:" + stat + ":_groupHeader:_groupPanelToggleButton:_groupPanelToggleButton_image"); - } - - private void verifyMonitoringClickStat(String stat, String statData, String statHeader) { - clickAndWait("propertyForm:propertyContentPage:basicTable:" + stat + ":_groupHeader:_groupPanelToggleButton:_groupPanelToggleButton_image"); - assertEquals(statData, driver.findElement(By.id("propertyForm:propertyContentPage:basicTable:" + stat+ ":0:col2")).getText()); - clickByIdAction("propertyForm:propertyContentPage:basicTable:" + stat + ":_groupHeader:_groupPanelToggleButton:_groupPanelToggleButton_image"); - } - - private void goToMonitoringApplicationsPage(String target, String targetType) { - if (targetType.equals(TARGET_SERVER_TYPE)) { - clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); - clickAndWait("propertyForm:serverInstTabs:monitoring"); - } else if (targetType.equals(TARGET_STANDALONE_TYPE)) { - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - String prefix = getTableRowByValue("propertyForm:instancesTable", target, "col1"); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - clickAndWait("propertyForm:standaloneInstanceTabs:monitoring"); - } - } - - private void ejbTimerMonitoring(String target, String targetType) { - final String statDescription = "Number of times EJB remove method is called"; - final String appName = "ejb-timer-sessiontimerApp"; - - deployApp("src/test/resources/ejb-timer-sessiontimerApp.ear", targetType, appName); - setMonitorLevel("Web Container", MONITOR_LEVEL_HIGH, false, target, targetType); - setMonitorLevel("Ejb Container", MONITOR_LEVEL_HIGH, false, target, targetType); - goToMonitoringApplicationsPage(target, targetType); - - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertyContentPage:propertySheet:viewPropertySection:ApplicationProp:View_list"))); - select1.selectByVisibleText("ejb-timer-sessiontimer-ejb.jar"); - sleep(5000); - Select select = new Select(driver.findElement(By.id(MONITORING_APPLICATIONS_COMPONENT_DROPDOWN_ID))); - select.selectByVisibleText("TimerSingleton"); - assertEquals(statDescription, driver.findElement(By.id("propertyForm:propertyContentPage:appsTable:singletonBeanAppStats:0:col7")).getText()); - - setMonitorLevel("Web Container", MONITOR_LEVEL_OFF, false, target, targetType); - setMonitorLevel("Ejb Container", MONITOR_LEVEL_OFF, false, target, targetType); - undeployApp(appName, targetType); - } - - public void appScopedResourcesMonitoring(String target, String targetType, String resName) { - final String statDescription = "Number of potential connection leaks"; - - setMonitorLevel(null, MONITOR_LEVEL_HIGH, true, target, targetType); - gotoDasPage(); - goToMonitoringApplicationsPage(target, targetType); - - Select select = new Select(driver.findElement(By.id(MONITORING_APPLICATIONS_APPLICATION_DROPDOWN_ID))); - select.selectByVisibleText("JavaEEApp-war.war"); - Select select1 = new Select(driver.findElement(By.id(MONITORING_APPLICATIONS_COMPONENT_DROPDOWN_ID))); - select1.selectByVisibleText(resName); - assertEquals(statDescription, driver.findElement(By.id("propertyForm:propertyContentPage:appsTable:appScopedResStats:0:col7")).getText()); - - setMonitorLevel(null, MONITOR_LEVEL_OFF, true, target, targetType); - } - - private void statefulAndStatelessBeanMonitoring(String target, String targetType) { - final String statefulStatDescription = "Number of times EJB remove method is called"; - final String statelessStatDescription = "Provides a count value reflecting the number of passivations for a StatefulSessionBean from the bean cache that succeeded"; - String applicationName = "ejb-ejb30-hello-sessionApp"; - - deployApp("src/test/resources/ejb-ejb30-hello-sessionApp.ear", targetType, applicationName); - setMonitorLevel("Web Container", MONITOR_LEVEL_HIGH, false, target, targetType); - setMonitorLevel("Ejb Container", MONITOR_LEVEL_HIGH, false, target, targetType); - goToMonitoringApplicationsPage(target, targetType); - - Select select2 = new Select(driver.findElement(By.id("propertyForm:propertyContentPage:propertySheet:viewPropertySection:ApplicationProp:View_list"))); - select2.selectByVisibleText("ejb-ejb30-hello-session-ejb.jar"); - sleep(5000); - Select select = new Select(driver.findElement(By.id(MONITORING_APPLICATIONS_COMPONENT_DROPDOWN_ID))); - select.selectByVisibleText("SfulEJB"); - assertEquals(statefulStatDescription, driver.findElement(By.id("propertyForm:propertyContentPage:appsTable:sfullStats:0:col7")).getText()); - - Select select1 = new Select(driver.findElement(By.id(MONITORING_APPLICATIONS_COMPONENT_DROPDOWN_ID))); - select1.selectByVisibleText("bean-cache"); - assertEquals(statelessStatDescription, driver.findElement(By.id("propertyForm:propertyContentPage:appsTable:ejbCacheStats:0:col7")).getText()); - - setMonitorLevel("Web Container", MONITOR_LEVEL_OFF, false, target, targetType); - setMonitorLevel("Ejb Container", MONITOR_LEVEL_OFF, false, target, targetType); - undeployApp(applicationName, targetType); - } - - private void deployApp(String appLocation, String target, String appName) { - clickAndWait("treeForm:tree:applications:applications_link"); - int initCount = getTableRowCount("propertyForm:deployTable"); - if(initCount != 0){ - clickByIdAction("propertyForm:deployTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:deployTable:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - waitforBtnDisable("propertyForm:deployTable:topActionsGroup1:button1"); - } - - //start to deploy applications - driver.get(baseUrl + "common/applications/uploadFrame.jsf"); - driver.findElement(By.id("form:sheet1:section1:prop1:uploadRdBtn:uploadRdBtn_label")); - File war = new File(appLocation); - driver.findElement(By.id("form:sheet1:section1:prop1:fileupload")).sendKeys(war.getAbsoluteFile().toString()); - //waitForCondition("document.getElementById('form:war:psection:nameProp:appName').value == '" + appName + "'", 300000); - assertEquals(appName, getValue("form:war:psection:nameProp:appName", "value")); - clickAndWait("form:title:topButtons:uploadButton"); - - gotoDasPage(); - clickAndWait("treeForm:tree:applications:applications_link"); - String prefix = getTableRowByValue("propertyForm:deployTable", appName, "col1"); - assertEquals(appName, getText(prefix + "col1:link")); - } - - private void undeployApp(String applicationName, String target) { - clickAndWait("treeForm:tree:applications:applications_link"); - String prefix = getTableRowByValue("propertyForm:deployTable", applicationName, "col1"); - String selectId = prefix + "col0:select"; - clickByIdAction(selectId); - clickAndWait("propertyForm:deployTable:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - waitforBtnDisable("propertyForm:deployTable:topActionsGroup1:button1"); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/MsgSecurityTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/MsgSecurityTest.java deleted file mode 100644 index 6d72bcae8e6..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/MsgSecurityTest.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -/** - * - * @author Jeremy Lv - * - */ -public class MsgSecurityTest extends BaseSeleniumTestClass { - - @Test - public void testCreateMsgSecurityConfigWithNoDefaultProvider() { - gotoDasPage(); - final String providerName = "provider" + generateRandomString(); - final String configName= "Config-" + generateRandomString(); - final String propertyName= "property-" + generateRandomString(); - final String layer = "HttpServlet"; - - copyConfig("default-config", configName); - gotoDasPage(); - createMsgSecurityConfig(configName, layer, providerName, "client", false ,propertyName); - - String prefix = getTableRowByValue("propertyForm:configs", layer, "col1"); - assertEquals(layer, getText(prefix + "col1:authlayer")); - //since we didn't mark this as default provider, ensure it is not listed in the table. - assertEquals("", getText(prefix + "col2")); - assertEquals(providerName, getText(prefix + "col3")); - clickAndWait(prefix + "col1:authlayer" ); - - //clean up by removing the config. - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", configName); - } - - @Test - public void testCreateMsgSecurityConfigWithDefaultProvider() { - gotoDasPage(); - final String providerName = "provider" + generateRandomString(); - final String configName= "Config-" + generateRandomString(); - final String propertyName= "property-" + generateRandomString(); - final String layer = "HttpServlet"; - - copyConfig("default-config", configName); - gotoDasPage(); - createMsgSecurityConfig(configName, layer, providerName, "server", true, propertyName); - - String prefix = getTableRowByValue("propertyForm:configs", layer, "col1"); - assertEquals(layer, getText(prefix + "col1:authlayer")); - //since we didn't mark this as default provider, ensure it is not listed in the table. - assertEquals(providerName, getText(prefix + "col2:defaultprov")); - assertEquals("", getText(prefix + "col3")); - clickAndWait(prefix + "col1:authlayer" ); - assertEquals(configName, getText("propertyForm:propertySheet:configNameSheet:configName:configName")); - - //clean up by removing the config. - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", configName); - } - - @Test - public void testCreateMsgSecurityConfigWithDefaultClientProvider() { - gotoDasPage(); - final String providerName = "provider" + generateRandomString(); - final String configName= "Config-" + generateRandomString(); - final String propertyName= "property-" + generateRandomString(); - final String layer = "HttpServlet"; - - copyConfig("default-config", configName); - gotoDasPage(); - createMsgSecurityConfig(configName, layer, providerName, "client", true, propertyName); - - String prefix = getTableRowByValue("propertyForm:configs", layer, "col1"); - assertEquals(layer, getText(prefix + "col1:authlayer")); - //since we didn't mark this as default provider, ensure it is not listed in the table. - assertEquals("", getText(prefix + "col2")); - assertEquals(providerName, getText(prefix + "col3:defaultclientprov")); - clickAndWait(prefix + "col1:authlayer" ); - assertEquals(configName, getText("propertyForm:propertySheet:configNameSheet:configName:configName")); - - //clean up by removing the config. - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", configName); - } - - @Test - public void testCreateMsgSecurityConfigWithDefaultClientServerProvider() { - gotoDasPage(); - final String providerName = "provider" + generateRandomString(); - final String configName= "Config-" + generateRandomString(); - final String propertyName= "property-" + generateRandomString(); - final String layer = "HttpServlet"; - - copyConfig("default-config", configName); - gotoDasPage(); - createMsgSecurityConfig(configName, layer, providerName, "client-server", true, propertyName); - - String prefix = getTableRowByValue("propertyForm:configs", layer, "col1"); - assertEquals(layer, getText(prefix + "col1:authlayer")); - //since we didn't mark this as default provider, ensure it is not listed in the table. - assertEquals(providerName, getText(prefix + "col2:defaultprov")); - assertEquals(providerName, getText(prefix + "col3:defaultclientprov")); - clickAndWait(prefix + "col1:authlayer" ); - assertEquals(configName, getText("propertyForm:propertySheet:configNameSheet:configName:configName")); - //clean up by removing the config. - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", configName); - } - - - @Test - public void testCreateAdditionalProviders() { - gotoDasPage(); - final String providerName = "provider" + generateRandomString(); - final String providerName2 = "provider" + generateRandomString(); - final String configName= "Config-" + generateRandomString(); - final String propertyName= "property-" + generateRandomString(); - final String layer = "HttpServlet"; - - copyConfig("default-config", configName); - gotoDasPage(); - createMsgSecurityConfig(configName, layer, providerName, "client", true, propertyName); - - - String prefix = getTableRowByValue("propertyForm:configs", layer, "col1"); - assertEquals(layer, getText(prefix + "col1:authlayer")); - //since we didn't mark this as default provider, ensure it is not listed in the table. - assertEquals("", getText(prefix + "col2")); - assertEquals(providerName, getText(prefix + "col3:defaultclientprov")); - clickAndWait("propertyForm:configs:rowGroup1:0:col1:authlayer" ); - assertEquals(configName, getText("propertyForm:propertySheet:configNameSheet:configName:configName")); - - clickAndWait("propertyForm:msgSecurityTabs:providers" ); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - - setFieldValue("propertyForm:propertySheet:providerConfSection:ProviderIdTextProp:ProviderIdText", providerName2); - if (!driver.findElement(By.id("propertyForm:propertySheet:providerConfSection:DefaultProviderProp:def")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:providerConfSection:DefaultProviderProp:def"); - } - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:providerConfSection:ProviderTypeProp:ProviderType"))); - select.selectByVisibleText("server"); - setFieldValue("propertyForm:propertySheet:providerConfSection:ClassNameProp:ClassName", "CLASSNAME"); - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:requestPolicySection:AuthSourceProp:AuthSource"))); - select1.selectByVisibleText("sender"); - Select select2 = new Select(driver.findElement(By.id("propertyForm:propertySheet:requestPolicySection:AuthRecipientProp:AuthRecipient"))); - select2.selectByVisibleText("before-content"); - Select select3 = new Select(driver.findElement(By.id("propertyForm:propertySheet:responsePolicySection:AuthSourceProp:AuthSource"))); - select3.selectByVisibleText("content"); - addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", propertyName); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "DESC"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String proPrefix = getTableRowByValue("propertyForm:configs", providerName2, "col1"); - assertEquals("server", getText(proPrefix + "col2:provType")); - assertEquals("true", getText(proPrefix + "col3:default")); - assertEquals("CLASSNAME", getText(proPrefix + "col4:defaultclientprov")); - - clickAndWait(proPrefix+"col1:authlayer" ); - assertEquals(configName, getText("propertyForm:propertySheet:configNameSheet:configName:configName")); - - Select select4 = new Select(driver.findElement(By.id("propertyForm:propertySheet:requestPolicySection:AuthSourceProp:AuthSource"))); - Select select5 = new Select(driver.findElement(By.id("propertyForm:propertySheet:requestPolicySection:AuthRecipientProp:AuthRecipient"))); - Select select6 = new Select(driver.findElement(By.id("propertyForm:propertySheet:responsePolicySection:AuthSourceProp:AuthSource"))); - Select select7 = new Select(driver.findElement(By.id("propertyForm:propertySheet:responsePolicySection:AuthRecipientProp:AuthRecipient"))); - assertEquals(select4.getFirstSelectedOption().getAttribute("value"), "sender"); - assertEquals(select5.getFirstSelectedOption().getAttribute("value"), "before-content"); - assertEquals(select6.getFirstSelectedOption().getAttribute("value"), "content"); - assertEquals(select7.getFirstSelectedOption().getAttribute("value"), ""); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //clean up by removing the config. - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", configName); - } - - - public void createMsgSecurityConfig(String configName, String layer, String providerName, String type, boolean isDefault, String propertyName){ - - clickAndWait("treeForm:tree:configurations:" + configName + ":security:messageSecurity:messageSecurity_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - isElementPresent("propertyForm:propertySheet:propertySheetSection:AuthLayerProp:AuthLayer"); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertySheetSection:AuthLayerProp:AuthLayer"))); - select.selectByVisibleText(layer); - setFieldValue("propertyForm:propertySheet:providerConfSection:ProviderIdTextProp:ProviderIdText", providerName); - if (!driver.findElement(By.id("propertyForm:propertySheet:providerConfSection:DefaultProviderProp:def")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:providerConfSection:DefaultProviderProp:def"); - } - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:providerConfSection:ProviderTypeProp:ProviderType"))); - select1.selectByVisibleText(type); - setFieldValue("propertyForm:propertySheet:providerConfSection:ClassNameProp:ClassName", "CLASSNAME"); - addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", propertyName); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "DESC"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - } - - public void copyConfig(String srcName, String newConfigName) { - clickAndWait("treeForm:tree:configurations:configurations_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:NameProp:Name", newConfigName); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:ConfigProp:Config"))); - select.selectByVisibleText(srcName); - clickAndWait("propertyForm:propertyContentPage:topButtons:okButton"); - - String prefix = getTableRowByValue("propertyForm:configs", newConfigName, "col1"); - assertEquals(newConfigName, getText(prefix + "col1:link")); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/NetworkConfigTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/NetworkConfigTest.java deleted file mode 100644 index 13db8cc70ab..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/NetworkConfigTest.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import java.util.ArrayList; -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class NetworkConfigTest extends BaseSeleniumTestClass { - ArrayList list = new ArrayList(); {list.add("server-config"); list.add("new-config");} - - @Test - public void testAddingNetworkListener() { - final String listenerName = "listener"+generateRandomString(); - createConfig("new-config"); - for (String configName : list) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName + ":networkConfig:networkListeners:networkListeners_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:nameNew:name", listenerName); - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:prop1:existingRdBtn"); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:prop1:protocoldw"))); - select.selectByVisibleText("http-listener-1"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:port:port", "1234"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", listenerName, "col1"); - assertEquals(listenerName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTrue(getText("propertyForm:propertySheet:propertSectionTextField:name:name").equals(listenerName)); - assertTrue(getText("propertyForm:propertySheet:propertSectionTextField:protocol:protocol").equals("http-listener-1")); - - assertEquals("1234", getValue("propertyForm:propertySheet:propertSectionTextField:port:port", "value")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", listenerName); - } - deleteConfig("new-config"); - - } - - private void deleteConfig(String configName) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", configName); - } - - public void createConfig(String configName) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - int emptyCount = getTableRowCountByValue("propertyForm:configs", "new-config", "col1:link", true); - if (emptyCount == 0) { - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:NameProp:Name", configName); - clickAndWait("propertyForm:propertyContentPage:topButtons:okButton"); - - String prefix = getTableRowByValue("propertyForm:configs", configName, "col1"); - assertEquals(configName, getText(prefix + "col1:link")); - } - } - - @Test - public void testAddingTransport() { - final String transportName = "transport"+generateRandomString(); - createConfig("new-config"); - for (String configName : list) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName + ":networkConfig:transports:transports_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:IdTextProp:IdText", transportName); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:ByteBufferType:ByteBufferType"))); - select.selectByVisibleText("DIRECT"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:BufferSizeBytes:BufferSizeBytes", "1000"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:AcceptorThreads:AcceptorThreads", "-1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", transportName, "col1"); - assertEquals(transportName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTrue(getText("propertyForm:propertySheet:propertSectionTextField:name:name").equals(transportName)); - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:ByteBufferType:ByteBufferType"))); - assertTrue(select1.getFirstSelectedOption().getAttribute("value").equals("DIRECT")); - assertEquals("1000", getValue("propertyForm:propertySheet:propertSectionTextField:BufferSizeBytes:BufferSizeBytes", "value")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", transportName); - } - deleteConfig("new-config"); - - } - - @Test - public void testAddingProtocol() { - final String protocol = "protocol"+generateRandomString(); - final String maxAge = Integer.toString(generateRandomNumber(60)); - final String maxCacheSizeBytes = Integer.toString(generateRandomNumber(10485760)); - final String maxFile = Integer.toString(generateRandomNumber(2048)); - final String maxC = Integer.toString(generateRandomNumber(512)); - final String timeoutSeconds = Integer.toString(generateRandomNumber(60)); - final String connectionUploadTimeout = Integer.toString(generateRandomNumber(600000)); - final String requestTimeoutSeconds = Integer.toString(generateRandomNumber(60)); - final String sendBsize = Integer.toString(generateRandomNumber(16384)); - final String headerBLength = Integer.toString(generateRandomNumber(16384)); - final String maxPostSize = Integer.toString(generateRandomNumber(2097152)); - final String compressableMime = Integer.toString(generateRandomNumber(4096)); - createConfig("new-config"); - for (String configName : list) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName +":networkConfig:protocols:protocols_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:nameNew:name", protocol); - setFieldValue("propertyForm:propertySheet:fileTextField:maxAge:maxAge", maxAge); - setFieldValue("propertyForm:propertySheet:fileTextField:maxCacheSizeBytes:maxCacheSizeBytes", maxCacheSizeBytes); - setFieldValue("propertyForm:propertySheet:fileTextField:maxFile:maxFile", maxFile); - setFieldValue("propertyForm:propertySheet:httpTextField:maxC:maxC", maxC); - setFieldValue("propertyForm:propertySheet:httpTextField:TimeoutSeconds:TimeoutSeconds", timeoutSeconds); - setFieldValue("propertyForm:propertySheet:httpTextField:connectionUploadTimeout:connectionUploadTimeout", connectionUploadTimeout); - setFieldValue("propertyForm:propertySheet:httpTextField:RequestTimeoutSeconds:RequestTimeoutSeconds", requestTimeoutSeconds); - setFieldValue("propertyForm:propertySheet:httpTextField:sendBsize:sendBsize", sendBsize); - setFieldValue("propertyForm:propertySheet:httpTextField:headerBLength:headerBLength", headerBLength); - setFieldValue("propertyForm:propertySheet:httpTextField:MaxPostSize:headerBLength", maxPostSize); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:httpTextField:Compression:Compression"))); - select.selectByVisibleText("on"); - setFieldValue("propertyForm:propertySheet:httpTextField:compressableMime:compressableMime", compressableMime); - if (!driver.findElement(By.id("propertyForm:propertySheet:httpTextField:Comet:cometEnabled")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:httpTextField:Comet:cometEnabled"); - } - - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", protocol, "col1"); - assertEquals(protocol, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTrue(getText("propertyForm:propertySheet:propertSectionTextField:name:name").equals(protocol)); - - clickAndWait("propertyForm:protocolTabs:httpTab"); - assertEquals(maxC, getValue("propertyForm:propertySheet:httpTextField:maxC:maxC", "value")); - assertEquals(timeoutSeconds, getValue("propertyForm:propertySheet:httpTextField:TimeoutSeconds:TimeoutSeconds", "value")); - assertEquals(requestTimeoutSeconds, getValue("propertyForm:propertySheet:httpTextField:RequestTimeoutSeconds:RequestTimeoutSeconds", "value")); - assertEquals(connectionUploadTimeout, getValue("propertyForm:propertySheet:httpTextField:connectionUploadTimeout:connectionUploadTimeout", "value")); - assertEquals(sendBsize, getValue("propertyForm:propertySheet:httpTextField:sendBsize:sendBsize", "value")); - assertEquals(headerBLength, getValue("propertyForm:propertySheet:httpTextField:headerBLength:headerBLength", "value")); - assertEquals(maxPostSize, getValue("propertyForm:propertySheet:httpTextField:MaxPostSize:headerBLength", "value")); - assertEquals(compressableMime, getValue("propertyForm:propertySheet:httpTextField:compressableMime:compressableMime", "value")); - assertEquals("true", getValue("propertyForm:propertySheet:httpTextField:Comet:cometEnabled", "value")); - - clickAndWait("propertyForm:protocolTabs:fileCacheTab"); - assertEquals(maxAge, getValue("propertyForm:propertySheet:fileTextField:maxAge:maxAge", "value")); - assertEquals(maxCacheSizeBytes, getValue("propertyForm:propertySheet:fileTextField:maxCacheSizeBytes:maxCacheSizeBytes", "value")); - assertEquals(maxFile, getValue("propertyForm:propertySheet:fileTextField:maxFile:maxFile", "value")); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", protocol); - } - deleteConfig("new-config"); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/NodeTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/NodeTest.java deleted file mode 100644 index 33cfeafb653..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/NodeTest.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * - * @author Jeremy Lv - * - */ -public class NodeTest extends BaseSeleniumTestClass { - - private static final String ID_NODES_TABLE = "propertyForm:nodesTable"; - private static final String ID_NODEHOST_FIELD = "propertyForm:propertySheet:propertSectionTextField:NodeHost:NodeHost"; - private static final String ID_NODEDIRECTORY_FIELD = "propertyForm:propertySheet:propertSectionTextField:NodeHome:NodeHome"; - private static final String ID_NEW_NODE_BUTTON = "propertyForm:nodesTable:topActionsGroup1:newButton"; - private static final String ID_DELETE_NODE_BUTTON = "propertyForm:nodesTable:topActionsGroup1:button1"; - private static final String ID_INSTALLDIR_FIELD = "propertyForm:propertySheet:propertSectionTextField:installdir-ssh:installDirssh"; - private static final String ID_FORCE_FIELD = "propertyForm:propertySheet:sshConnectorSection:force:force"; - private static final String ID_CREATE_NAME_FIELD = "propertyForm:propertySheet:propertSectionTextField:nameProp:name"; - private static final String ID_CONFIG_INSTALLDIR_FIELD = "propertyForm:propertySheet:propertSectionTextField:installdir-config:installDirConfig"; - private static final String ID_TYPE_FIELD = "propertyForm:propertySheet:propertSectionTextField:typeProp:type"; - private static final String ID_CREATE_NODE_BUTTON = "propertyForm:propertyContentPage:topButtons:newButton"; - private static final String ID_STANDALONE_TREE_LINK = "treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"; - - private static final String ID_NODE_TREE_LINK = "treeForm:tree:nodeTreeNode:nodeTreeNode_link"; - - - private static final String NODE_NAME_PREFIX = "testNode-"; - private static final String PSWD_ALIAS_NAME_PREFIX = "pswdalias-"; - - - @Test - public void testCreateAndDeleteSSHNodewithKeyFile() { - gotoDasPage(); - final String nodeName = NODE_NAME_PREFIX + generateRandomString(); - - clickAndWait(ID_NODE_TREE_LINK); - clickAndWait(ID_NEW_NODE_BUTTON); - - isElementPresent(ID_CREATE_NAME_FIELD); - setFieldValue(ID_CREATE_NAME_FIELD, nodeName); - setFieldValue(ID_NODEHOST_FIELD, "NodeHOST"); - setFieldValue(ID_NODEDIRECTORY_FIELD, "NodeDirectory"); - //enterText(ID_INSTALLDIR_FIELD, "${com.sun.aas.productRoot}"); - if (!driver.findElement(By.id(ID_FORCE_FIELD)).isSelected()){ - clickByIdAction(ID_FORCE_FIELD); - } - setFieldValue("propertyForm:propertySheet:sshConnectorSection:sshport:sshport", "24"); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:sshConnectorSection:psSelected:psSelected"))); - select.selectByVisibleText("Key File"); - setFieldValue("propertyForm:propertySheet:sshConnectorSection:Keyfile:Keyfile", "/sshKeyFileLocation"); - clickAndWait(ID_CREATE_NODE_BUTTON); - // Verify nodes information in table - String prefix = getTableRowByValue(ID_NODES_TABLE, nodeName, "col1"); - assertEquals(nodeName, getText(prefix + "col1:link")); - assertEquals("NodeHOST", getText(prefix + "col2")); - assertEquals("SSH", getText(prefix + "colType")); - - //Verify the node is created with the value specified. - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTrue(getText("propertyForm:propertySheet:propertSectionTextField:staticnameProp:IdStatic").equals(nodeName)); - - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:typeProp:type"))); - assertTrue(select1.getFirstSelectedOption().getAttribute("value").equals("SSH")); - assertEquals("NodeHOST", getValue(ID_NODEHOST_FIELD, "value")); - assertEquals("NodeDirectory", getValue(ID_NODEDIRECTORY_FIELD, "value")); - assertEquals("${com.sun.aas.productRoot}", getValue(ID_INSTALLDIR_FIELD, "value")); - - assertEquals("24", getValue("propertyForm:propertySheet:sshConnectorSection:sshport:sshport", "value")); - assertEquals("/sshKeyFileLocation", getValue("propertyForm:propertySheet:sshConnectorSection:Keyfile:Keyfile", "value")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //Test Delete Node - deleteRow(ID_DELETE_NODE_BUTTON, "propertyForm:nodesTable", nodeName); - } - - @Test - public void testCreateAndDeleteSSHNodewithPassword() { - gotoDasPage(); - final String nodeName = NODE_NAME_PREFIX + generateRandomString(); - - clickAndWait(ID_NODE_TREE_LINK); - clickAndWait(ID_NEW_NODE_BUTTON); - - setFieldValue(ID_CREATE_NAME_FIELD, nodeName); - setFieldValue(ID_NODEHOST_FIELD, "NodeHOST2"); - setFieldValue(ID_NODEDIRECTORY_FIELD, "NodeDirectory2"); - setFieldValue(ID_INSTALLDIR_FIELD, "ProductRoot"); - if (!driver.findElement(By.id(ID_FORCE_FIELD)).isSelected()){ - clickByIdAction(ID_FORCE_FIELD); - } - setFieldValue("propertyForm:propertySheet:sshConnectorSection:sshport:sshport", "34"); - - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:sshConnectorSection:psSelected:psSelected"))); - select.selectByVisibleText("Password"); - - setFieldValue("propertyForm:propertySheet:sshConnectorSection:newPasswordProp:NewPassword", "abcde"); -// setFieldValue("propertyForm:propertySheet:sshConnectorSection:confirmPasswordProp:ConfirmPassword", "abcde"); - clickAndWait(ID_CREATE_NODE_BUTTON); - // Verify nodes information in table - String prefix = getTableRowByValue(ID_NODES_TABLE, nodeName, "col1"); - assertEquals(nodeName, getText(prefix + "col1:link")); - assertEquals("NodeHOST2", getText(prefix + "col2")); - assertEquals("SSH", getText(prefix + "colType")); - - //Verify the node is created with the value specified. - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTrue(getText("propertyForm:propertySheet:propertSectionTextField:staticnameProp:IdStatic").equals(nodeName)); - - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:typeProp:type"))); - assertTrue(select1.getFirstSelectedOption().getAttribute("value").equals("SSH")); - assertEquals("NodeHOST2", getValue(ID_NODEHOST_FIELD, "value")); - assertEquals("NodeDirectory2", getValue(ID_NODEDIRECTORY_FIELD, "value")); - assertEquals("ProductRoot", getValue(ID_INSTALLDIR_FIELD, "value")); - - assertEquals("34", getValue("propertyForm:propertySheet:sshConnectorSection:sshport:sshport", "value")); - assertEquals("abcde", getValue("propertyForm:propertySheet:sshConnectorSection:newPasswordProp:NewPassword", "value")); -// assertEquals("abcde", getValue("propertyForm:propertySheet:sshConnectorSection:confirmPasswordProp:ConfirmPassword", "value")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //Test Delete Node - deleteRow(ID_DELETE_NODE_BUTTON, "propertyForm:nodesTable", nodeName); - } - - @Test - public void testCreateAndDeleteSSHNodewithPswdAlias() { - gotoDasPage(); - final String nodeName = NODE_NAME_PREFIX + generateRandomString(); - final String pswdAliasName = PSWD_ALIAS_NAME_PREFIX + generateRandomString(); - //create PasswordAlias - clickAndWait("treeForm:tree:nodes:nodes_link"); - clickAndWait("propertyForm:domainTabs:pswdAliases"); - clickAndWait("propertyForm:aliases:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:aliasNameNew:aliasNameNew", pswdAliasName); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:newPasswordProp:NewPassword", "abcde"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:confirmPasswordProp:ConfirmPassword", "abcde"); - clickAndWait(ID_CREATE_NODE_BUTTON); - - clickAndWait(ID_NODE_TREE_LINK); - clickAndWait(ID_NEW_NODE_BUTTON); - setFieldValue(ID_CREATE_NAME_FIELD, nodeName); - setFieldValue(ID_NODEHOST_FIELD, "NodeHOST3"); - setFieldValue(ID_NODEDIRECTORY_FIELD, "NodeDirectory3"); - setFieldValue(ID_INSTALLDIR_FIELD, "ProductRoot3"); - if (!driver.findElement(By.id(ID_FORCE_FIELD)).isSelected()){ - clickByIdAction(ID_FORCE_FIELD); - } - setFieldValue("propertyForm:propertySheet:sshConnectorSection:sshport:sshport", "34"); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:sshConnectorSection:psSelected:psSelected"))); - select.selectByVisibleText("Password Alias"); - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:sshConnectorSection:pswdAlias:pswdAlias"))); - select1.selectByVisibleText(pswdAliasName); - clickAndWait(ID_CREATE_NODE_BUTTON); - - - // Verify nodes information in table - String prefix = getTableRowByValue(ID_NODES_TABLE, nodeName, "col1"); - assertEquals(nodeName, getText(prefix + "col1:link")); - assertEquals("NodeHOST3", getText(prefix + "col2")); - assertEquals("SSH", getText(prefix + "colType")); - - //Verify the node is created with the value specified. - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTrue(getText("propertyForm:propertySheet:propertSectionTextField:staticnameProp:IdStatic").equals(nodeName)); - Select select2 = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:typeProp:type"))); - assertTrue(select2.getFirstSelectedOption().getAttribute("value").equals("SSH")); - assertEquals("NodeHOST3", getValue(ID_NODEHOST_FIELD, "value")); - assertEquals("NodeDirectory3", getValue(ID_NODEDIRECTORY_FIELD, "value")); - assertEquals("ProductRoot3", getValue(ID_INSTALLDIR_FIELD, "value")); - - assertEquals("34", getValue("propertyForm:propertySheet:sshConnectorSection:sshport:sshport", "value")); - Select select3 = new Select(driver.findElement(By.id("propertyForm:propertySheet:sshConnectorSection:psSelected:psSelected"))); - Select select4 = new Select(driver.findElement(By.id("propertyForm:propertySheet:sshConnectorSection:pswdAlias:pswdAlias"))); - assertTrue(select3.getFirstSelectedOption().getAttribute("value").equals("3")); - assertTrue(select4.getFirstSelectedOption().getAttribute("value").equals(pswdAliasName)); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //Test Delete Node -// gotoDasPage(); -// clickAndWait("treeForm:tree:nodes:nodes_link"); - deleteRow(ID_DELETE_NODE_BUTTON, "propertyForm:nodesTable", nodeName); - - //Delete Pswd Alias created - gotoDasPage(); - clickAndWait("treeForm:tree:nodes:nodes_link"); - clickAndWait("propertyForm:domainTabs:pswdAliases"); - String delId = getTableRowByValue("propertyForm:aliases", pswdAliasName, "col1")+"col0:select"; - clickByIdAction(delId); - clickByIdAction("propertyForm:aliases:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - } - - - @Test - public void testCreateAndDeleteCONFIGNodes() { - gotoDasPage(); - final String nodeName = NODE_NAME_PREFIX + generateRandomString(); - - clickAndWait(ID_NODE_TREE_LINK); - clickAndWait(ID_NEW_NODE_BUTTON); - - Select select = new Select(driver.findElement(By.id(ID_TYPE_FIELD))); - select.selectByVisibleText("CONFIG"); - - setFieldValue(ID_CREATE_NAME_FIELD, nodeName); - setFieldValue(ID_NODEHOST_FIELD, "NodeHOSTCC"); - setFieldValue(ID_NODEDIRECTORY_FIELD, "NodeDirectoryCC"); - setFieldValue(ID_CONFIG_INSTALLDIR_FIELD, "/ProductRoot"); - clickAndWait(ID_CREATE_NODE_BUTTON); - - // Verify nodes information in table - String prefix = getTableRowByValue(ID_NODES_TABLE, nodeName, "col1"); - assertEquals(nodeName, getText(prefix + "col1:link")); - assertEquals("NodeHOSTCC", getText(prefix + "col2")); - assertEquals("CONFIG", getText(prefix + "colType")); - - //Verify the node is created with the value specified. - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - assertTrue(getText("propertyForm:propertySheet:propertSectionTextField:staticnameProp:IdStatic").equals(nodeName)); - Select select1 = new Select(driver.findElement(By.id(ID_TYPE_FIELD))); - assertTrue(select1.getFirstSelectedOption().getAttribute("value").equals("CONFIG")); - assertEquals("NodeHOSTCC", getValue(ID_NODEHOST_FIELD, "value")); - assertEquals("NodeDirectoryCC", getValue(ID_NODEDIRECTORY_FIELD, "value")); - assertEquals("/ProductRoot", getValue(ID_CONFIG_INSTALLDIR_FIELD, "value")); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //Test Delete Node - deleteRow(ID_DELETE_NODE_BUTTON, "propertyForm:nodesTable", nodeName); - } - - - @Test - public void testUpdateCONFIGNode() { - gotoDasPage(); - final String nodeName = NODE_NAME_PREFIX + generateRandomString(); - - clickAndWait(ID_NODE_TREE_LINK); - clickAndWait(ID_NEW_NODE_BUTTON); - - //create the config node - Select select = new Select(driver.findElement(By.id(ID_TYPE_FIELD))); - select.selectByVisibleText("CONFIG"); - setFieldValue(ID_CREATE_NAME_FIELD, nodeName); - setFieldValue(ID_NODEHOST_FIELD, "NodeHOSTCC"); - setFieldValue(ID_NODEDIRECTORY_FIELD, "NodeDirectoryCC"); - setFieldValue(ID_CONFIG_INSTALLDIR_FIELD, "/ProductRoot"); - clickAndWait(ID_CREATE_NODE_BUTTON); - - // Verify nodes information in table - String prefix = getTableRowByValue(ID_NODES_TABLE, nodeName, "col1"); - assertEquals(nodeName, getText(prefix + "col1:link")); - - //Verify the node is created with the value specified. - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - Select select1 = new Select(driver.findElement(By.id(ID_TYPE_FIELD))); - assertTrue(select1.getFirstSelectedOption().getAttribute("value").equals("CONFIG")); - assertEquals("NodeHOSTCC", getValue(ID_NODEHOST_FIELD, "value")); - setFieldValue(ID_NODEHOST_FIELD, "new-NodeHOSTCC"); - - assertEquals("NodeDirectoryCC", getValue(ID_NODEDIRECTORY_FIELD, "value")); - setFieldValue(ID_NODEDIRECTORY_FIELD, "new-NodeDirectoryCC"); - - assertEquals("/ProductRoot", getValue(ID_CONFIG_INSTALLDIR_FIELD, "value")); - setFieldValue(ID_CONFIG_INSTALLDIR_FIELD, "/new-ProductRoot"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - assertEquals("new-NodeHOSTCC", getValue(ID_NODEHOST_FIELD , "value")); - assertEquals("new-NodeDirectoryCC", getValue(ID_NODEDIRECTORY_FIELD, "value")); - assertEquals("/new-ProductRoot", getValue(ID_CONFIG_INSTALLDIR_FIELD, "value")); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - deleteRow(ID_DELETE_NODE_BUTTON, "propertyForm:nodesTable", nodeName); - } - - /* Create a Node, create an instance with this node, delete this node will cause error */ - @Test - public void testDeleteWithInstance(){ - gotoDasPage(); - final String nodeName = NODE_NAME_PREFIX + generateRandomString(); - final String instanceName = "testInstance" + generateRandomString(); - - createSSHNode(nodeName); - createInstance(instanceName, nodeName); - clickAndWait(ID_NODE_TREE_LINK); - // This part should fail? - deleteRow(ID_DELETE_NODE_BUTTON, "propertyForm:nodesTable", nodeName); - isClassPresent("label_sun4"); - assertTrue(driver.findElement(By.className("label_sun4")).getText().equals(("An error has occurred"))); - - //cleanup - clickAndWait(ID_STANDALONE_TREE_LINK); - deleteRow("propertyForm:instancesTable:topActionsGroup1:button1", "propertyForm:instancesTable", instanceName); - - clickAndWait(ID_NODE_TREE_LINK); - deleteRow(ID_DELETE_NODE_BUTTON, "propertyForm:nodesTable", nodeName); - } - - private void createSSHNode(String nodeName){ - clickAndWait(ID_NODE_TREE_LINK); - clickAndWait(ID_NEW_NODE_BUTTON); - - setFieldValue(ID_CREATE_NAME_FIELD, nodeName); - setFieldValue(ID_NODEHOST_FIELD, "localhost"); - if (!driver.findElement(By.id(ID_FORCE_FIELD)).isSelected()){ - clickByIdAction(ID_FORCE_FIELD); - } - clickAndWait(ID_CREATE_NODE_BUTTON); - String prefix = getTableRowByValue(ID_NODES_TABLE, nodeName, "col1"); - assertEquals(nodeName, getText(prefix + "col1:link")); - } - - private void createInstance(String instanceName, String nodeName){ - clickAndWait(ID_STANDALONE_TREE_LINK); - clickAndWait("propertyForm:instancesTable:topActionsGroup1:newButton"); - isElementPresent("propertyForm:propertySheet:propertSectionTextField:NameTextProp:NameText"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:NameTextProp:NameText", instanceName); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:node:node"))); - select.selectByVisibleText(nodeName); - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:configProp:Config"))); - select1.selectByVisibleText("default-config"); - if (!driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:configOptionProp:optC")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:configOptionProp:optC"); - } - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - String prefix = getTableRowByValue("propertyForm:instancesTable", instanceName, "col1"); - assertEquals(instanceName, getText(prefix + "col1:link")); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ResourceAdapterConfigsTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ResourceAdapterConfigsTest.java deleted file mode 100644 index b1f9fa8d8d5..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ResourceAdapterConfigsTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.*; -/** - * - * @author Jeremy Lv - * - */ -public class ResourceAdapterConfigsTest extends BaseSeleniumTestClass { - @Test - public void testResourceAdapterConfigs() throws Exception { - gotoDasPage(); - clickAndWait("treeForm:tree:resources:resourceAdapterConfigs:resourceAdapterConfigs_link"); - int emptyCount = getTableRowCountByValue("propertyForm:poolTable", "jmsra", "col1:link", true); - if (emptyCount != 0){ - gotoDasPage(); - clickAndWait("treeForm:tree:resources:resourceAdapterConfigs:resourceAdapterConfigs_link"); - deleteRow("propertyForm:poolTable:topActionsGroup1:button1", "propertyForm:poolTable", "jmsra"); - } - - // Create new RA config - clickAndWait("propertyForm:poolTable:topActionsGroup1:newButton"); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:threadPoolsIdProp:threadpoolsid"))); - select.selectByVisibleText("thread-pool-1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - // Verify config was saved and update values - String prefix = getTableRowByValue("propertyForm:poolTable", "jmsra", "col1"); - assertEquals("jmsra", getText(prefix + "col1:link")); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - Select select1 = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:threadPoolsIdProp:threadpoolsid"))); - assertTrue(select1.getFirstSelectedOption().getAttribute("value").equals("thread-pool-1")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - // Remove config - gotoDasPage(); - clickAndWait("treeForm:tree:resources:resourceAdapterConfigs:resourceAdapterConfigs_link"); - deleteRow("propertyForm:poolTable:topActionsGroup1:button1", "propertyForm:poolTable", "jmsra"); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/SecurityTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/SecurityTest.java deleted file mode 100644 index 8a000fd758f..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/SecurityTest.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import java.util.ArrayList; -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -/** - * - * @author Jeremy Lv - * - */ -public class SecurityTest extends BaseSeleniumTestClass { - ArrayList list = new ArrayList(); {list.add("server-config"); list.add("new-config");} - - -// @Test - // TODO: The page has a component without an explicit ID. Disabling the test for now. - public void testSecurityPage() { - createConfig("new-config"); - for (String configName : list) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName + ":jvmSettings:jvmSettings_link"); - clickAndWait("propertyForm:javaConfigTab:jvmOptions"); - waitForElementPresent("TtlTxt_sun4", "JVM Options"); - sleep(1000); - int emptyCount = getTableRowCountByValue("propertyForm:basicTable", "-Djava.security.manager", "col3:col1St", false); - if (emptyCount != 0 ){ - String clickId = getTableRowByVal("propertyForm:basicTable", "-Djava.security.manager", "col3:col1St")+"col1:select"; - clickByIdAction(clickId); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:basicTable:topActionsGroup1:button1"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - sleep(1000); - int beforeCount = getTableRowCount("propertyForm:basicTable"); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:"+ configName +":security:security_link"); - - if (!driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:securityManagerProp:sun_checkbox380")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:securityManagerProp:sun_checkbox380"); - } - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:"+ configName +":jvmSettings:jvmSettings_link"); - clickAndWait("propertyForm:javaConfigTab:jvmOptions"); - sleep(1000); - int afterCount = getTableRowCount("propertyForm:basicTable"); - assertEquals(afterCount, beforeCount+1); - -// //delete security attribute if needed -// emptyCount = getTableRowCountByValue("propertyForm:basicTable", "-Djava.security.manager", "col3:col1St", false); -// if (emptyCount != 0 ){ -// String clickId = getTableRowByVal("propertyForm:basicTable", "-Djava.security.manager", "col3:col1St")+"col1:select"; -// clickByIdAction(clickId); -// clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); -// waitforBtnDisable("propertyForm:basicTable:topActionsGroup1:button1"); -// clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); -// isClassPresent("label_sun4"); -// } - } - deleteConfig("new-config"); - } - - @Test - public void testNewSecurityRealm() { - final String realmName = "TestRealm" + generateRandomString(); - final String contextName = "Context" + generateRandomString(); - - createConfig("new-config"); - for (String configName : list) { - createRealm(configName, realmName, contextName); - - //delete the related realm - String clickId = getTableRowByValue("propertyForm:realmsTable", realmName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction("propertyForm:realmsTable:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitforBtnDisable("propertyForm:realmsTable:topActionsGroup1:button1"); - } - deleteConfig("new-config"); - } - - @Test - public void testAddUserToFileRealm() { - final String userId = "user" + generateRandomString(); - final String password = "password" + generateRandomString(); - - createConfig("new-config"); - for (String configName : list) { - addUserToRealm(configName, "file", userId, password); - - //delete the added User for File Realm - String clickId = getTableRowByValue("propertyForm:users", userId, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction("propertyForm:users:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitforBtnDisable("propertyForm:users:topActionsGroup1:button1"); - } - deleteConfig("new-config"); - } - - @Test - public void testAddAuditModule() { - final String auditModuleName = "auditModule" + generateRandomString(); - final String className = "org.glassfish.NonexistentModule"; - - createConfig("new-config"); - for (String configName : list) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName + ":security:auditModules:auditModules_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:IdTextProp:IdText", auditModuleName); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:classNameProp:ClassName", className); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", auditModuleName, "col1"); - assertEquals(auditModuleName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", auditModuleName); - } - deleteConfig("new-config"); - } - - @Test - public void testAddJaccModule() { - final String providerName = "testJaccProvider" + generateRandomString(); - final String policyConfig = "com.example.Foo"; - final String policyProvider = "com.example.Foo"; - final String propName = "propName"; - final String propValue = "propValue"; - final String propDescription = generateRandomString(); - - createConfig("new-config"); - for (String configName : list) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName + ":security:jaccProviders:jaccProviders_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - - setFieldValue("propertyForm:propertySheet:propertSectionTextField:IdTextProp:IdText", providerName); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:policyConfigProp:PolicyConfig", policyConfig); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:policyProviderProp:PolicyProvider", policyProvider); - - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", propName); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", propValue); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", propDescription); - - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", providerName, "col1"); - assertEquals(providerName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertEquals(policyConfig, getValue("propertyForm:propertySheet:propertSectionTextField:policyConfigProp:PolicyConfig", "value")); - assertEquals(policyProvider, getValue("propertyForm:propertySheet:propertSectionTextField:policyProviderProp:PolicyProvider", "value")); - assertEquals(propName, getValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "value")); - assertEquals(propValue, getValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value")); - assertEquals(propDescription, getValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "value")); - - assertTableRowCount("propertyForm:basicTable", count); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", providerName); - } - deleteConfig("new-config"); - } - - @Test - public void testAddMessageSecurityConfiguration() { - final String providerName = "provider" + generateRandomString(); - final String className = "com.example.Foo"; - - createConfig("new-config"); - for (String configName : list) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName + ":security:messageSecurity:messageSecurity_link"); - clickAndWait("treeForm:tree:configurations:" + configName + ":security:messageSecurity:SOAP:link"); - clickAndWait("propertyForm:msgSecurityTabs:providers"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - - setFieldValue("propertyForm:propertySheet:providerConfSection:ProviderIdTextProp:ProviderIdText", providerName); - setFieldValue("propertyForm:propertySheet:providerConfSection:ClassNameProp:ClassName", className); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", providerName, "col1"); - assertEquals(providerName, getText(prefix + "col1:authlayer")); - - String clickId = prefix + "col1:authlayer"; - clickByIdAction(clickId); - - assertEquals(className, getValue("propertyForm:propertySheet:providerConfSection:ClassNameProp:ClassName", "value")); - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - //delete security attribute if needed - int emptyCount = getTableRowCountByValue("propertyForm:configs", providerName, "col1:authlayer", true); - if (emptyCount != 0 ){ - clickId = getTableRowByValue("propertyForm:configs", providerName, "col1:authlayer")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction("propertyForm:configs:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitforBtnDisable("propertyForm:configs:topActionsGroup1:button1"); - } - } - deleteConfig("new-config"); - } - - @Test - public void testNewAdminPassword() { - gotoDasPage(); - final String userPassword = ""; - - clickAndWait("treeForm:tree:nodes:nodes_link"); - clickAndWait("propertyForm:domainTabs:adminPassword"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:newPasswordProp:NewPassword", userPassword); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:confirmPasswordProp:ConfirmPassword", userPassword); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - closeAlertAndGetItsText(); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - - /* - * This test was add to test for regressions of GLASSFISH-14797 - */ - @Test - public void testAddUserToRealmInRunningStandaloneInstance() { - final String instanceName = "server" + generateRandomString(); - final String configName = instanceName + "-config"; - final String contextName = "Context" + generateRandomString(); - final String realmName = "newRealm"; - final String userName = "user" + generateRandomNumber(); - final StandaloneTest sat = new StandaloneTest(); - - try { - sat.createStandAloneInstance(instanceName); - sat.startInstance(instanceName); - - createRealm(configName, realmName, contextName); - addUserToRealm(configName, realmName, userName, "password"); - - // Delete the user for good measure - deleteUserFromRealm(configName, realmName, userName); - } finally { - sat.gotoStandaloneInstancesPage(); - sat.stopInstance(instanceName); - sat.deleteStandAloneInstance(instanceName); - } - } - - /* - * This test was added to test for GLASSFISH-16126 - * This test case need to be finished in the future - */ -// @Test -// public void testSecureAdministration() { -// gotoDasPage(); -// clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); -// clickAndWait("propertyForm:propertyContentPage:secureAdmin"); -// if (driver.findElement(By.className("TtlTxt_sun4")).getText().equals("Secure Administration")) { -// clickAndWait("form:propertyContentPage:topButtons:enableSecureAdminButton"); -// closeAlertAndGetItsText(); -// sleep(10000); -// gotoDasPage(); -// clickAndWait("treeForm:tree:applicationServer:applicationServer_link"); -// clickAndWait("propertyForm:propertyContentPage:secureAdmin"); -// selenium.click("form:propertyContentPage:topButtons:disableSecureAdminButton"); -// closeAlertAndGetItsText(); -// sleep(10000); -// } -// } - -// //Need to be finished in the future -// @Test -// public void testRedirectAfterLogin() { -// gotoDasPage(); -// final String newUser = "user" + generateRandomString(); -// final String realmName = "admin-realm"; -// final String newPass = generateRandomString(); -// -// try { -// addUserToRealm("server-config", realmName, newUser, newPass); -// // http://localhost:4848/common/help/help.jsf?contextRef=/resource/common/en/help/ref-developercommontasks.html -// clickByIdAction("Masthead:logoutLink"); -// driver.close(); -// driver.get("http://localhost:4848/common/help/help.jsf?contextRef=/resource/common/en/help/ref-developercommontasks.html"); -// driver.close(); -//// handleLogin(newUser, newPass, "The Common Tasks page provides shortcuts for common Administration Console tasks."); -// } finally { -// clickByIdAction("Masthead:logoutLink"); -// gotoDasPage(); -//// handleLogin(); -// deleteUserFromRealm("server-config", realmName, newUser); -// } -// } - - public void createConfig(String configName) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - int emptyCount = getTableRowCountByValue("propertyForm:configs", "new-config", "col1:link", true); - if (emptyCount == 0) { - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:NameProp:Name", configName); - clickAndWait("propertyForm:propertyContentPage:topButtons:okButton"); - - String prefix = getTableRowByValue("propertyForm:configs", configName, "col1"); - assertEquals(configName, getText(prefix + "col1:link")); - } - } - - private void deleteConfig(String configName) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:configurations_link"); - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", configName); - } - - public void createRealm(String configName, String realmName, String contextName) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName + ":security:realms:realms_link"); - clickAndWait("propertyForm:realmsTable:topActionsGroup1:newButton"); - setFieldValue("form1:propertySheet:propertySectionTextField:NameTextProp:NameText", realmName); - Select select = new Select(driver.findElement(By.id("form1:propertySheet:propertySectionTextField:cp:Classname"))); - select.selectByVisibleText("com.sun.enterprise.security.auth.realm.file.FileRealm"); - setFieldValue("form1:fileSection:jaax:jaax", contextName); - setFieldValue("form1:fileSection:keyFile:keyFile", "${com.sun.aas.instanceRoot}/config/testfile"); - clickAndWait("form1:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:realmsTable", realmName, "col1"); - assertEquals(realmName, getText(prefix + "col1:link")); - - } - - public void addUserToRealm(String configName, String realmName, String userName, String password) { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:" + configName + ":security:realms:realms_link"); - - String prefix = getTableRowByValue("propertyForm:realmsTable", realmName, "col1"); - assertEquals(realmName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - waitForElementPresent("TtlTxt_sun4","Edit Realm"); - clickAndWait("form1:propertyContentPage:manageUsersButton"); - clickAndWait("propertyForm:users:topActionsGroup1:newButton"); - - setFieldValue("propertyForm:propertySheet:propertSectionTextField:userIdProp:UserId", userName); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:newPasswordProp:NewPassword", password); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:confirmPasswordProp:ConfirmPassword", password); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix1 = getTableRowByValue("propertyForm:users", userName, "col1"); - assertEquals(userName, getText(prefix1 + "col1:link")); - - } - - public void deleteUserFromRealm(String configName, String realmName, String userName) { - clickAndWait("treeForm:tree:configurations:" + configName + ":security:realms:realms_link"); - - String prefix = getTableRowByValue("propertyForm:realmsTable", realmName, "col1"); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - clickAndWait("form1:propertyContentPage:manageUsersButton"); - - //delete security attribute if needed - int emptyCount = getTableRowCountByValue("propertyForm:users", userName, "col1:link", true); - if (emptyCount != 0 ){ - clickId = getTableRowByValue("propertyForm:users", userName, "col1:link")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction("propertyForm:users:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitforBtnDisable("propertyForm:users:topActionsGroup1:button1"); - } - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/StandaloneTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/StandaloneTest.java deleted file mode 100644 index 3159825d6d7..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/StandaloneTest.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * - * @author jeremy_lv - */ -public class StandaloneTest extends BaseSeleniumTestClass { - public static final String STATUS_RUNNING = "Running"; - public static final String STATUS_STOPPED = "Stopped"; - - public static final String ID_INSTANCE_TABLE_NEW_BUTTON = "propertyForm:instancesTable:topActionsGroup1:newButton"; - public static final String ID_INSTANCE_TABLE_DELETE_BUTTON = "propertyForm:instancesTable:topActionsGroup1:button1"; - public static final String ID_INSTANCE_TABLE_START_BUTTON = "propertyForm:instancesTable:topActionsGroup1:button2"; - public static final String ID_INSTANCE_TABLE_STOP_BUTTON = "propertyForm:instancesTable:topActionsGroup1:button3"; - public static final String ID_INSTANCE_TABLE = "propertyForm:instancesTable"; - public static final String ID_INSTANCE_PROP_TAB = "propertyForm:standaloneInstanceTabs:standaloneProp"; - - public static final String ID_INSTANCE_NAME_TEXT = "propertyForm:propertySheet:propertSectionTextField:NameTextProp:NameText"; - public static final String ID_INSTANCE_NODE_TEXT = "propertyForm:propertySheet:propertSectionTextField:node:node" ; - public static final String ID_INSTANCE_CONFIG_SELECT = "propertyForm:propertySheet:propertSectionTextField:configProp:Config" ; - public static final String ID_INSTANCE_CONFIG_OPTION = "propertyForm:propertySheet:propertSectionTextField:configOptionProp:optC"; - public static final String ID_INSTANCE_NEW_PAGE_BUTTON = "propertyForm:propertyContentPage:topButtons:newButton" ; - - public static final String INSTANCE_PREFIX = "standAlone" ; - public static final String NODE_NAME = "localhost-domain1" ; - public static final String DEFAULT_WEIGHT = "100" ; - - @Test - public void testCreateStartStopAndDeleteStandaloneInstance() { - String instanceName = INSTANCE_PREFIX + generateRandomString(); - createStandAloneInstance(instanceName); - - String prefix = getTableRowByValue(ID_INSTANCE_TABLE, instanceName, "col1"); - assertEquals(instanceName, getText(prefix + "col1:link")); - assertEquals(instanceName+"-config", getText(prefix + "col3:configlink")); - assertEquals(NODE_NAME, getText(prefix + "col5:nodeAgentlink")); - assertTrue(getText(prefix + "col6").endsWith(STATUS_STOPPED)); - assertEquals(DEFAULT_WEIGHT, getValue(prefix + "col2:weight", "value")); - - startInstance(instanceName); - assertTrue(getText(prefix + "col6").endsWith(STATUS_RUNNING)); - - stopInstance(instanceName); - assertTrue(getText(prefix + "col6").endsWith(STATUS_STOPPED)); - - deleteStandAloneInstance(instanceName); - } - - @Test - public void testProperties() { - String instanceName = INSTANCE_PREFIX + generateRandomString(); - createStandAloneInstance(instanceName); - - String clickId = getTableRowByValue(ID_INSTANCE_TABLE, instanceName, "col1")+"col1:link"; - clickByIdAction(clickId); - clickAndWait(ID_INSTANCE_PROP_TAB); - int sysPropCount = addTableRow("propertyForm:sysPropsTable", "propertyForm:sysPropsTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:sysPropsTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:sysPropsTable:rowGroup1:0:overrideValCol:overrideVal", "foo=bar"); - // FIXME: The app needs to be fixed here. should show success message - clickAndWait("propertyForm:clusterSysPropsPage:topButtons:topButtons:saveButton"); - assertTrue(driver.findElement(By.className("label_sun4")).getText().equals("New values successfully saved.")); - - // Go to instance props page - clickAndWait("propertyForm:standaloneInstanceTabs:standaloneProp:instanceProps"); // FIXME - - int instancePropCount = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "foo=bar"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(driver.findElement(By.className("label_sun4")).getText().equals("New values successfully saved.")); - - // Verify that properties were persisted - clickAndWait("propertyForm:standaloneInstanceTabs:standaloneProp:configProps"); - - assertTableRowCount("propertyForm:sysPropsTable", sysPropCount); - clickAndWait("propertyForm:standaloneInstanceTabs:standaloneProp:instanceProps"); // FIXME - assertTableRowCount("propertyForm:basicTable", instancePropCount); - - deleteStandAloneInstance(instanceName); - } - - @Test - public void testStandaloneInstanceResourcesPage() { - final String jndiName = "jdbcResource"+generateRandomString(); - String target = INSTANCE_PREFIX + generateRandomString(); - final String description = "devtest test for standalone instance->resources page- " + jndiName; - final String tableID = "propertyForm:resourcesTable"; - - JdbcTest jdbcTest = new JdbcTest(); - jdbcTest.createJDBCResource(jndiName, description, target, "standalone"); - - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - String prefix = getTableRowByValue(ID_INSTANCE_TABLE, target, "col1"); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - clickAndWait("propertyForm:standaloneInstanceTabs:resources"); - String resourcePrefix = getTableRowByValue(tableID, jndiName, "col1"); - assertTrue(isTextPresent(resourcePrefix, jndiName, tableID)); - - int jdbcCount = getTableRowCountByValue(tableID, "JDBC Resources", "col3:type"); - int customCount = getTableRowCountByValue(tableID, "Custom Resources", "col3:type"); - - EnterpriseServerTest adminServerTest = new EnterpriseServerTest(); - Select select = new Select(driver.findElement(By.id("propertyForm:resourcesTable:topActionsGroup1:filter_list"))); - select.selectByVisibleText("Custom Resources"); - - adminServerTest.waitForTableRowCount(tableID, customCount); - - select = new Select(driver.findElement(By.id("propertyForm:resourcesTable:topActionsGroup1:filter_list"))); - select.selectByVisibleText("JDBC Resources"); - adminServerTest.waitForTableRowCount(tableID, jdbcCount); - - clickId = getTableRowByValue(tableID, jndiName, "col1") + "col1:link"; - clickByIdAction(clickId); - waitForButtonEnabled("propertyForm:propertyContentPage:topButtons:saveButton"); - clickByIdAction("propertyForm:propertyContentPage:topButtons:saveButton"); - - jdbcTest.deleteJDBCResource(jndiName, target, "standalone"); - } - - public void createStandAloneInstance(String instanceName){ - gotoStandaloneInstancesPage(); - clickAndWait(ID_INSTANCE_TABLE_NEW_BUTTON); - setFieldValue(ID_INSTANCE_NAME_TEXT, instanceName); - Select select = new Select(driver.findElement(By.id(ID_INSTANCE_NODE_TEXT))); - select.selectByVisibleText(NODE_NAME); - Select select1 = new Select(driver.findElement(By.id(ID_INSTANCE_CONFIG_SELECT))); - select1.selectByVisibleText("default-config"); - clickByIdAction(ID_INSTANCE_CONFIG_OPTION); - clickAndWait(ID_INSTANCE_NEW_PAGE_BUTTON); - String prefix = getTableRowByValue(ID_INSTANCE_TABLE, instanceName, "col1"); - assertEquals(instanceName, getText(prefix + "col1:link")); - } - - public void deleteStandAloneInstance(String instanceName) { - gotoStandaloneInstancesPage(); - String clickId = getTableRowByValue(ID_INSTANCE_TABLE, instanceName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(ID_INSTANCE_TABLE_DELETE_BUTTON); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - - public void deleteAllStandaloneInstances() { - gotoStandaloneInstancesPage(); - if (getTableRowCount(ID_INSTANCE_TABLE) == 0) { - return; - } - - //Disable all of the standalone instance - clickByIdAction("propertyForm:instancesTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:instancesTable:topActionsGroup1:button3"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - - // Delete all instances - clickByIdAction("propertyForm:instancesTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:instancesTable:topActionsGroup1:button1"); - closeAlertAndGetItsText(); - waitForAlertProcess("modalBody"); - } - - public void startInstance(String instanceName) { - String clickId = getTableRowByValue(ID_INSTANCE_TABLE, instanceName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(ID_INSTANCE_TABLE_START_BUTTON); - assertTrue(closeAlertAndGetItsText().matches("^Start the selected GlassFish Server instances[\\s\\S]$")); - waitForAlertProcess("modalBody"); - String prefix = getTableRowByValue(ID_INSTANCE_TABLE, instanceName, "col1"); - assertTrue(getText(prefix + "col6").endsWith(STATUS_RUNNING)); - } - - public void stopInstance(String instanceName) { - String clickId = getTableRowByValue(ID_INSTANCE_TABLE, instanceName, "col1")+"col0:select"; - clickByIdAction(clickId); - clickByIdAction(ID_INSTANCE_TABLE_STOP_BUTTON); - assertTrue(closeAlertAndGetItsText().matches("^Stop the selected GlassFish Server instances[\\s\\S]$")); - waitForAlertProcess("modalBody"); - String prefix = getTableRowByValue(ID_INSTANCE_TABLE, instanceName, "col1"); - assertTrue(getText(prefix + "col6").endsWith(STATUS_STOPPED)); - } - - public void gotoStandaloneInstancesPage() { - driver.get(baseUrl + "common/index.jsf"); - clickAndWait("treeForm:tree:standaloneTreeNode:standaloneTreeNode_link"); - } - -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ThreadPoolsTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ThreadPoolsTest.java deleted file mode 100644 index d011aa44f6a..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/ThreadPoolsTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -/** - * - * @author Jeremy Lv - * - */ -public class ThreadPoolsTest extends BaseSeleniumTestClass { - - @Test - public void testAddThreadPool() { - gotoDasPage(); - final String threadPoolName = "testThreadPool"+generateRandomString(); - - clickAndWait("treeForm:tree:configurations:server-config:threadPools:threadPools_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:nameProp:nameText", threadPoolName); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:max:max", "8192"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:maxThread:maxThread", "10"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:minThread:minThread", "4"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:timeout:timeout", "1800"); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", threadPoolName, "col1"); - assertEquals(threadPoolName, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickAndWait(clickId); - - assertEquals("8192", getValue("propertyForm:propertySheet:propertSectionTextField:max:max", "value")); - assertEquals("10", getValue("propertyForm:propertySheet:propertSectionTextField:maxThread:maxThread", "value")); - assertEquals("4", getValue("propertyForm:propertySheet:propertSectionTextField:minThread:minThread", "value")); - assertEquals("1800", getValue("propertyForm:propertySheet:propertSectionTextField:timeout:timeout", "value")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", threadPoolName); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/TransactionServiceTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/TransactionServiceTest.java deleted file mode 100644 index dab5bb04b5c..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/TransactionServiceTest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * - * @author Jeremy Lv - * - */ -public class TransactionServiceTest extends BaseSeleniumTestClass { - - @Test - public void testTransactionService() { - gotoDasPage(); - final String timeout = Integer.toString(generateRandomNumber(60)); - final String retry = Integer.toString(generateRandomNumber(600)); - final String keypoint = Integer.toString(generateRandomNumber(65535)); - - clickAndWait("treeForm:tree:configurations:server-config:transactionService:transactionService_link"); - if (!driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:onRestartProp:enabled")).isSelected()){ - clickByIdAction("propertyForm:propertySheet:propertSectionTextField:onRestartProp:enabled"); - } - setFieldValue("propertyForm:propertySheet:propertSectionTextField:timeoutProp:Timeout", timeout); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:retryProp:Retry", retry); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:heuristicProp:HeuristicDecision"))); - select.selectByVisibleText("Commit"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:keyPointProp:Keypoint", keypoint); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"+generateRandomString()); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:transactionService:transactionService_link"); - assertTrue(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:onRestartProp:enabled")).isSelected()); - assertEquals(timeout, getValue("propertyForm:propertySheet:propertSectionTextField:timeoutProp:Timeout", "value")); - assertEquals(retry, getValue("propertyForm:propertySheet:propertSectionTextField:retryProp:Retry", "value")); - assertEquals("commit", getValue("propertyForm:propertySheet:propertSectionTextField:heuristicProp:HeuristicDecision", "value")); - assertEquals(keypoint, getValue("propertyForm:propertySheet:propertSectionTextField:keyPointProp:Keypoint", "value")); - assertTableRowCount("propertyForm:basicTable", count); - - //delete the property used to test - clickByIdAction("propertyForm:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("propertyForm:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("propertyForm:basicTable:topActionsGroup1:button1"); - clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/VirtualServerTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/VirtualServerTest.java deleted file mode 100644 index 7930fbe4bdb..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/VirtualServerTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.Select; - -import static org.junit.Assert.assertEquals; -/** - * - * @author Jeremy Lv - * - */ -public class VirtualServerTest extends BaseSeleniumTestClass { - - @Test - public void testAddVirtualServer() { - gotoDasPage(); - final String serverName = "vs" + generateRandomString(); - - clickAndWait("treeForm:tree:configurations:server-config:virtualServers:virtualServers_link"); - clickAndWait("propertyForm:configs:topActionsGroup1:newButton"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:IdTextProp:IdText", serverName); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:hostsProp:Hosts", "localhost"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:logFileProp:LogFile", "logfile.txt"); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:docroot:docroot", "/tmp"); - Select select = new Select(driver.findElement(By.id("propertyForm:propertySheet:propertSectionTextField:nwProps:nw"))); - select.selectByVisibleText("http-listener-1"); - int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); - - setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", "property"); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "value"); - setFieldValue("propertyForm:basicTable:rowGroup1:0:col4:col1St", "description"); - - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:configs", serverName, "col1"); - assertEquals(serverName, getText(prefix + "col1:link")); - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertTableRowCount("propertyForm:basicTable", count); - - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - deleteRow("propertyForm:configs:topActionsGroup1:button1", "propertyForm:configs", serverName); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/WebContainerTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/WebContainerTest.java deleted file mode 100644 index 05db79520bf..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/WebContainerTest.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.admingui.devtests; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * - * @author Jeremy Lv - * - */ -public class WebContainerTest extends BaseSeleniumTestClass { - - @Test - public void testGeneralTab() { - gotoDasPage(); - final String property = "property" + generateRandomString(); - final String value = generateRandomString(); - final String description = "Description for " + property; - - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", property); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", value); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", description); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - assertTableRowCount("form1:basicTable", count); - - - //Delete all of the property after the tests finished - if (count != 0){ - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - } - - @Test - public void testSessionProperties() { - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:sessionTab"); - waitForElementPresent("TtlTxt_sun4", "Session Properties"); - - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - - setFieldValue("form1:sessionPropSheet:sessionPropSheetSection:SessionTimeoutProp:SessionTimeout", "300"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:sessionTab"); - waitForElementPresent("TtlTxt_sun4", "Session Properties"); - - assertTableRowCount("form1:basicTable", count); - assertEquals("300", getValue("form1:sessionPropSheet:sessionPropSheetSection:SessionTimeoutProp:SessionTimeout", "value")); - setFieldValue("form1:sessionPropSheet:sessionPropSheetSection:SessionTimeoutProp:SessionTimeout", "1800"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - //Delete all of the property after the tests finished - if (count != 0){ - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:sessionTab"); - waitForElementPresent("TtlTxt_sun4", "Session Properties"); - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - } - - @Test - public void testManagerProperties() { - final String reapInterval = Integer.toString(generateRandomNumber(100)); - final String maxSessions = Integer.toString(generateRandomNumber(1000)); - final String sessFileName = generateRandomString(); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:managerTab"); - waitForElementPresent("TtlTxt_sun4", "Manager Properties"); - - setFieldValue("form1:managerPropSheet:managerPropSheetSection:ReapIntervalProp:ReapInterval", reapInterval); - setFieldValue("form1:managerPropSheet:managerPropSheetSection:MaxSessionsProp:MaxSessions", maxSessions); - setFieldValue("form1:managerPropSheet:managerPropSheetSection:SessFileNameProp:SessFileName", sessFileName); - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:managerTab"); - waitForElementPresent("TtlTxt_sun4", "Manager Properties"); - - assertEquals(reapInterval, getValue("form1:managerPropSheet:managerPropSheetSection:ReapIntervalProp:ReapInterval", "value")); - assertEquals(maxSessions, getValue("form1:managerPropSheet:managerPropSheetSection:MaxSessionsProp:MaxSessions", "value")); - assertEquals(sessFileName, getValue("form1:managerPropSheet:managerPropSheetSection:SessFileNameProp:SessFileName", "value")); - assertTableRowCount("form1:basicTable", count); - - //Delete all of the property after the tests finished - if (count != 0){ - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:managerTab"); - waitForElementPresent("TtlTxt_sun4", "Manager Properties"); - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - } - - @Test - public void testStoreProperties() { - final String directory = generateRandomString(); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:storeTab"); -// waitForElementPresent("TtlTxt_sun4", "Store Properties"); - - isElementPresent("form1:storePropSheet:storePropSheetSection:DirectoryProp:Directory"); - setFieldValue("form1:storePropSheet:storePropSheetSection:DirectoryProp:Directory", directory); - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", "property" + generateRandomString()); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", "value"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", "description"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:storeTab"); - waitForElementPresent("TtlTxt_sun4", "Store Properties"); - assertEquals(directory, getValue("form1:storePropSheet:storePropSheetSection:DirectoryProp:Directory", "value")); - assertTableRowCount("form1:basicTable", count); - - setFieldValue("form1:storePropSheet:storePropSheetSection:DirectoryProp:Directory", ""); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - //Delete all of the property after the tests finished - if (count != 0){ - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickAndWait("form1:webContainerTabs:storeTab"); - waitForElementPresent("TtlTxt_sun4", "Store Properties"); - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - } - - /* To test the property table. - * If the property value/name is empty, that property will not be created. - * If the property value is (), property will be persisted with the empty value. - */ - @Test - public void testWebContainerPropertyTable() { - - final String property1 = "property1" + generateRandomString(); - final String value1 = "value"+generateRandomString(); - final String description1 = "Description for " + property1; - final String property2 = "property2" + generateRandomString(); - final String value2 = ""; - final String description2 = "Description for " + property2; - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - - int count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", property1); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", value1); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", description1); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - count = addTableRow("form1:basicTable", "form1:basicTable:topActionsGroup1:addSharedTableButton"); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col2:col1St", property2); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col3:col1St", value2); - sleep(500); - setFieldValue("form1:basicTable:rowGroup1:0:col4:col1St", description2); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - - assertTableRowCount("form1:basicTable", count-1); - - //Delete all of the property after the tests finished - if (count != 0){ - gotoDasPage(); - clickAndWait("treeForm:tree:configurations:server-config:webContainer:webContainer_link"); - clickByIdAction("form1:basicTable:_tableActionsTop:_selectMultipleButton:_selectMultipleButton_image"); - clickByIdAction("form1:basicTable:topActionsGroup1:button1"); - waitforBtnDisable("form1:basicTable:topActionsGroup1:button1"); - clickAndWait("form1:propertyContentPage:topButtons:saveButton"); - assertTrue(isElementSaveSuccessful("label_sun4","New values successfully saved.")); - } - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/WorkSecurityMapTest.java b/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/WorkSecurityMapTest.java deleted file mode 100644 index 539b93aec6a..00000000000 --- a/appserver/tests/admingui/auto-test/src/test/java/org/glassfish/admingui/devtests/WorkSecurityMapTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admingui.devtests; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -/** - * - * @author Jeremy Lv - * - */ -public class WorkSecurityMapTest extends BaseSeleniumTestClass { - - - @Test - public void testWorkSecurityMaps() throws Exception { - gotoDasPage(); - final String testWorkSecurityMap = generateRandomString(); - final String testGroupMapKey = generateRandomString(); - final String testGroupMapValue = generateRandomString(); - - clickAndWait("treeForm:tree:resources:Connectors:workSecurityMaps:workSecurityMaps_link"); - - clickAndWait("propertyForm:resourcesTable:topActionsGroup1:newButton"); - - setFieldValue("propertyForm:propertySheet:propertSectionTextField:mapNameNew:mapName", testWorkSecurityMap); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:groupProp:eisgrouptext", testGroupMapKey + "=" + testGroupMapValue); - clickAndWait("propertyForm:propertyContentPage:topButtons:newButton"); - - String prefix = getTableRowByValue("propertyForm:resourcesTable", testWorkSecurityMap, "col1"); - assertEquals(testWorkSecurityMap, getText(prefix + "col1:link")); - - String clickId = prefix + "col1:link"; - clickByIdAction(clickId); - - assertEquals(testGroupMapKey + "=" + testGroupMapValue, getValue("propertyForm:propertySheet:propertSectionTextField:groupProp:eisgrouptext", "value")); - clickAndWait("propertyForm:propertyContentPage:topButtons:cancelButton"); - - deleteRow("propertyForm:resourcesTable:topActionsGroup1:button1", "propertyForm:resourcesTable", testWorkSecurityMap); - } -} diff --git a/appserver/tests/admingui/auto-test/src/test/resources/JavaEEApp.ear b/appserver/tests/admingui/auto-test/src/test/resources/JavaEEApp.ear deleted file mode 100644 index 4e570ca7648fffdfea2f1c7386e65f68a39377a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10923 zcmeHN&2Jn@6`##632PBpAV>%h)V8!@SERdV;t#UU%w#A2*o_k>v+;y1T&$k%nsM9x zm9FmCM#~{^;(!o;04D+x2gC(&;2%IBBqUB8;mBbRAR)m8@q1PMHSHNYK}5TW+)+>L zs`p;K_v(FA{l@(pFTOO_XnefU_^JP|Zlm(N+<2+6xi;wO*Ke(x|M`8R(Jx3Jfz%N{ zez*&AdN1HDNH=@8uCK3c4UEn8O)GFmTqOE8cr4s7SY|Dwd48@JR7QG{W$$o?F-%@I zTIc6hVs0he(XSm6{gTn#zSPo(%_a8wRvNHP*N#JRC=%`qc0I6-H_p$UpPSU}{MmCq z`PK`K2ECt#ZX4DEYi+F;MLORd8oO3plDF^w<8iIN0@9C~)i0d6@S@tjX@vD_%(bMtd-5}-}u;BqBw(p-@*UCrC(}6^2>$4|NAeWYc%Mc z+=zWEHt?1k@f?MpbVT-n#A@7IyC##UG?o&mO7%*G%JwWFxG*QF|NQRW!|#8x(V+J$ z73wijk6f{%$6SPIY;$28_+I-eKG*}5b{!3Ar!gMbq2mVQj&^sju3y%!cIW2Wudd!+ z8GN(9#tL@UzkBWG^%bV+rujBWUx#!fjK`+AI#^}J5JNtBu5BeqY_`Q?EXL-I7Q2(_ z!B+Xm4P2TQ%rw_-X-wNml4#j93#Fx4CvikMRNArK+Fmp;sYyL`eU9N-38TZ<9q%OU zQnR_B<71K4%fdxj7Z~e#9+R|!tRoE_LkhVoICBLP>2R0Z2}?o-LwJDEgvY)x=5)Qf z=Iz+BJrfx}wOFwXtx%qIGNec+hh7|P6>gE+=>I{hcRbx_{QqBm2%H6vdA;=>j*l* zn#oCK?^qEGW8sKdjt?Wosq1j%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)`!V$Q~fU8*EY*_+r!W~tg!90y6+Er(G%F z%b%$vVGakMYn*HR8fspkF9m9F@SlG3z2E%-bM$^5vjwb-3YtTSPtpS_Y$evYq%l|# zWTzOQjq>CV10@E9DKijqj3e+Rl`I3e*fQVSyt#!hD11wI1CdyPO0~}>2L)wljfPWpz{@X1&14?UkoCwvGJIgBc z(>(jy_!+&%Et&NUf5%ZMo09oUou%4`ip7ZjXd41K@k=Gmd~w{)N;B#;{GY#i{TE|E z*z~e$1k8x$Qykkk#j&$1_9>1%iSkp;E{@vxvg8!UJ{|&>6>b7)E|E)l;;VjCv0%bi zPjT$yoqNn|_H9}bs%RI_5{`{-b_!xw5pb$Ia0=b|o+%JpZsc=~V3UQ<2Yfw|bVm@c zd{#nTj}Kf+_vAR~DQZ0x@2(=pxC&%n#7bxwSVlGiN?!aeW2rjUIhJ&`aklY8U`1!&ApZXXI2j6S diff --git a/appserver/tests/admingui/auto-test/src/test/resources/ejb-ejb30-hello-sessionApp.ear b/appserver/tests/admingui/auto-test/src/test/resources/ejb-ejb30-hello-sessionApp.ear deleted file mode 100644 index 4a6cdc64a0a32763d8b7fc82970c8279823c84a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30998 zcmaI6Q;aT5)GR!490s`vP=HLbTe*g^x1|%!0B1kJKCr1A>0R*J*f2dGE9sf}$xt-SZ{-ay{ zS7`s$|59ZIE_|3X{lzWW*e0lmYDaBou-6Q9BCwEW+YUB zB7jM0pWxivvm%vHrInPOv#A6xrk~&r;Ne{o;iAx40;C_&yqFUsA0nwErIi4Y=sb@J z&n)ikZtee%p8t`qZK-A3^xrXt;emjN|I=e?Wkma5F*DFwnA+Ib(*jHZ084v2T4Nha zQ#)rmD?_L36j+YMPlD0Vt#R8i+63bhxry%?t#;WOYGbp=^)yzs_Q_)5QC`I&r||@i zaV)2dgd}ZJ*9c*X1Un_V@6}%1r#;S@*H^EWUHjS3@1Jj<+*|Y6#{kWGn?n#F4j{h` z60Q(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ACEY)^X2I)L-PMH!|=S_t-6efv<4N;Aga< zxHs{qX6AwH9BksZS#|REs28gAOTzctZv2-d@M zvT6Lc09Gj>IN%!#`a4!_0S^yr{=u&B7ffCX01z4I|IXe0PoNC^pKF2ti2gsc?tfBv z|99&DnZx^^sek?y1yKF>)c;21{jb5n|6l0u|0L)BmqO>i@c*Bq`#<&mCzbBM^lBmg z?|T1>QTJbB|7W_+e~SIb%rGPTZ`RI#P00U=w)0=ZtNyQy|IXf#mjVI(k2gU7wFrPe Le_Y-Eqxb&+rLv}1 diff --git a/appserver/tests/admingui/auto-test/src/test/resources/ejb-timer-sessiontimerApp.ear b/appserver/tests/admingui/auto-test/src/test/resources/ejb-timer-sessiontimerApp.ear deleted file mode 100644 index a0d118a32910f68dcfee3f195efe886f78b44a89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38207 zcmZ^qQ;?`pu${-YJ#)skZQCYN+qP}nwrx+&y-99vQkAaSRsXJ9554=XzqNjO zDPRyN000O8017R39)SN=kN_Y6G9tG+B7YMbc{sheoS~~ zc5ioU|8M>LN9#<0%w~KD001Ir004jf^fp>;pRIU*7>Pg5gq=t|VCN?x45P3Fg>M7r!y)GjTgwCpLFNfN%mkifF~YI5 zp9qL0e{Lqb+4endg05_KQ~ zJi(?l;mOer>@K0h<9K;vE>?b`D-dn>w8_(ghE{h8<1lq1+Kms7{6k#c1i@I~-BjI2 zBV7dU%GYJ{tWrl=>p~FE@*N`-6{;4&O7&-rtraXnfDUwVezm33JcX>e!ds#CgLfj*fOPf(l(j%gK#4ZKbIjTaA7u#{YgfFR0T`DkgJ}4=EO)F)Uin3B4`6 z2eyw)Pr#Z#>jJFlglhL=tR?>gn_H@_)|Nua=)xImNTOV|LMMbq7@gj;ZTIIT z-o>GRi`Y^0p_>3pEdB_R)AH83OjV9!FwO6ooVbxVAHiR6#3$zQg(zfgg61B#$$fINiVBLiO8_7Y-+_!+)lCHJ$byM->`Tr7B%swH9})ugJ3G_`g&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L|z~V9VjghT_d|}SRYG3TZa@kNQz90!}QacegZERHDl#NfgFSkpfz$(u8I6G zYSr*!VX)R%wTqnK=wJIUEDKcQ_3sdnS{Ppc*1D0%4@P(fj9V)CZmaDFp*kXiw4l9^ zT)mfgyzsP~wWurzIs`l=Jmr@&`DP{1BqX6W{J?rje7r@>?4Y{B6PYN2cIcV|v!|D5w9G4~UER%tP+_2mT28tn zM_w1AFOKe^MW;@uK9L&NnqSW05G_$dk~cZn=AAi3HGRbm0C=)|bK4mEB7b&%wyApg zy19oSJOhY6{8%_*nsdv2TSY^dyI7Y%);7a&a6$k-N5}VEU`NN#^&<<|LGmkfr>V1p zW4r!fwLhRcVubwyAK>@qzx_fJtKE)*ZOZI0*r^6P47O{U)qY2Pi-w(~*@ErV;(sFF Z;Y^l1+wz&=fIRFQAZy8S005}1(|;h;<>UYW diff --git a/appserver/tests/admingui/pom.xml b/appserver/tests/admingui/pom.xml deleted file mode 100644 index 24848f31604..00000000000 --- a/appserver/tests/admingui/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.admingui - admingui - 4.1-SNAPSHOT - pom - GlassFish admingui Tests - - - auto-test - - - - - - org.seleniumhq.selenium - selenium-java - 2.32.0 - - - junit - junit - test - - - - - - install - - - - - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - maven-clean-plugin - - - auto-clean - initialize - - clean - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - package-tests - package - - test-jar - - - - - - - true - - - - - - - - - diff --git a/appserver/tests/admingui/test_results.TXT b/appserver/tests/admingui/test_results.TXT deleted file mode 100644 index 311c1db0c5a..00000000000 --- a/appserver/tests/admingui/test_results.TXT +++ /dev/null @@ -1,81 +0,0 @@ -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false -Running org.glassfish.admingui.devtests.StandaloneTest -Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 289.533 sec -Running org.glassfish.admingui.devtests.AdminObjectTest -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 155.045 sec -Running org.glassfish.admingui.devtests.JavaMailTest -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 121.833 sec -Running org.glassfish.admingui.devtests.JdbcTest -Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 183.541 sec -Running org.glassfish.admingui.devtests.MonitoringTest -Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1,986.826 sec -Running org.glassfish.admingui.devtests.WebContainerTest -Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 112.101 sec -Running org.glassfish.admingui.devtests.ApplicationTest -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 48.749 sec -Running org.glassfish.admingui.devtests.ConnectorsTest -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 166.592 sec -Running org.glassfish.admingui.devtests.JvmSettingsTest -Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 287.921 sec -Running org.glassfish.admingui.devtests.IiopListenerTest -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 35.33 sec -Running org.glassfish.admingui.devtests.AvailabilityServiceTest -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 71.37 sec -Running org.glassfish.admingui.devtests.LifecycleModulesTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 37.97 sec -Running org.glassfish.admingui.devtests.WorkSecurityMapTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.743 sec -Running org.glassfish.admingui.devtests.ResourceAdapterConfigsTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 29.406 sec -Running org.glassfish.admingui.devtests.SecurityTest -Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 409.77 sec -Running org.glassfish.admingui.devtests.EjbContainerTest -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 69.753 sec -Running org.glassfish.admingui.devtests.ClusterTest -Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 682.688 sec -Running org.glassfish.admingui.devtests.JVMReportTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.918 sec -Running org.glassfish.admingui.devtests.ThreadPoolsTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.128 sec -Running org.glassfish.admingui.devtests.LogViewerTest -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 20.652 sec -Running org.glassfish.admingui.devtests.NetworkConfigTest -Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 290.336 sec -Running org.glassfish.admingui.devtests.JavaMessageServiceTest -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 205.226 sec -Running org.glassfish.admingui.devtests.HttpServiceTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.261 sec -Running org.glassfish.admingui.devtests.MsgSecurityTest -Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 207.506 sec -Running org.glassfish.admingui.devtests.NodeTest -Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 172.599 sec -Running org.glassfish.admingui.devtests.JndiTest -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 237.862 sec -Running org.glassfish.admingui.devtests.ConfigTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.896 sec -Running org.glassfish.admingui.devtests.VirtualServerTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.864 sec -Running org.glassfish.admingui.devtests.LoggerSettingsTest -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 45.194 sec -Running org.glassfish.admingui.devtests.AdminServiceTest -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.46 sec -Running org.glassfish.admingui.devtests.GMSTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.883 sec -Running org.glassfish.admingui.devtests.EnterpriseServerTest -Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 171.996 sec -Running org.glassfish.admingui.devtests.JmsResourcesTest -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 321.187 sec -Running org.glassfish.admingui.devtests.AppScopedResourcesTest -Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 179.081 sec -Running org.glassfish.admingui.devtests.TransactionServiceTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.639 sec -Running org.glassfish.admingui.devtests.ConnectorServiceTest -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.829 sec - -Results : - -Tests run: 110, Failures: 0, Errors: 0, Skipped: 0 - diff --git a/appserver/tests/amx/amx-unit-tests.html b/appserver/tests/amx/amx-unit-tests.html deleted file mode 100644 index c3a4a730825..00000000000 --- a/appserver/tests/amx/amx-unit-tests.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - AMX Unit Tests - - - -
AMX Unit Tests FAQ
-
-
-Questions?  lloyd.chambers@sun.com
-Last updated: 23 June 2005
-
-NOTE: some of the links in this document refer to an internal sun -server and thus may not work.  This will be fixed.
-
-1. Introduction
-
-
When developing for AMX, please also refer to the  AMX - Internal Developer's Guide (glassfish/admin-core/mbeanapi/src/java/com/sun/enterprise/management
-/doc-files/amx-internal-developer-guide.html
).
-
-The unit tests for AMX are written using JUnit as the framework.  -When you introduce a new AMX - MBean, or modify an existing one, you must write - a new unit test and/or add/change existing unit tests to correspond -to the changes you've made.  This is a requirement before you check in -changes to the AMX interfaces or implementation.  Code should also -be reviewed by amx-dev@sun.com.
-
-
-2.  Checkin procedure
-
-
-See the procedure in admin-core/mbeanapi/src/java/com/sun/enterpise/management/doc-files/amx-internal-developer-guide.html.
-
-

-
-3. Reference
-
-
-
- - - - - - - - - - - - - - - - - - - -
Item
-
Discussion
-
AddingAMXUnitTests.html - How to modify an existing unit - test and/or add a new unit test for AMX or its support code.
-
- glassfish/admin/mbeanapi-impl/tests/
- com/sun/enterprise/management/doc-files/AddingAMXUnitTests.html
-
RunningUnitTests.html - How to run the AMX unit tests..
-
- glassfish/admin/mbeanapi-impl/tests/
- com/sun/enterprise/management/doc-files/RunningUnitTests.html
-
AMX - Internal Developer's GuideHow to write new AMX MBeans.
-
- glassfish/admin-core/mbeanapi/src/java/com/sun/enterprise/management/doc-files/
- amx-internal-developer-guide.html
-
- -
-
-
-

-
-
-
-
-
-
-
-
- - diff --git a/appserver/tests/amx/pom.xml b/appserver/tests/amx/pom.xml deleted file mode 100755 index 75d2bcd8d1c..00000000000 --- a/appserver/tests/amx/pom.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - org.glassfish.tests - tests - 4.1-SNAPSHOT - - 4.0.0 - amx-tests - amx-tests - AMX end to end tests - - - - llc - Lloyd Chambers - http://blogs.sun.com/lchambers - Oracle, Inc. - - lead - developer - - - - - - src - - - - - org.apache.maven.plugins - maven-compiler-plugin - - -Xlint:all - - - - - maven-assembly-plugin - - - jar-with-dependencies - - - - - - - - - - - - - - - - javax.management.j2ee - management-api - ${management-api.version} - - - - org.glassfish.external - jmxremote_optional-repackaged - ${project.version} - - - - org.glassfish.common - amx-core - ${project.version} - - - - org.glassfish.common - amx-javaee - ${project.version} - provided - - - - - - junit - junit - - - - diff --git a/appserver/tests/amx/resources/amxtest.classes b/appserver/tests/amx/resources/amxtest.classes deleted file mode 100644 index 406aa151bee..00000000000 --- a/appserver/tests/amx/resources/amxtest.classes +++ /dev/null @@ -1,156 +0,0 @@ -# -# The list of classes to be tested when the AMX unit tests are run. -# -# BE SURE TO ADD NEW TESTS TO Tests.java -# - -# -# tests that are *standalone*; no server connection required, run these first -# since implementation (server and client) depend on them. -# -org.glassfish.admin.amxtest.support.CoverageInfoTest - -# Run this before doing any tests against AMX MBeans -org.glassfish.admin.amxtest.RunMeFirstTest -org.glassfish.admin.amxtest.config.ConfigRunMeFirstTest - - -# -# Tests for client specific code -# -org.glassfish.admin.amxtest.client.ProxyTest -org.glassfish.admin.amxtest.client.ProxyFactoryTest - - -# -# Logging -# -#org.glassfish.admin.amxtest.ext.logging.LogMBeanTest -org.glassfish.admin.amxtest.ext.logging.LoggingTest -org.glassfish.admin.amxtest.ext.logging.LoggingHelperTest -org.glassfish.admin.amxtest.ext.logging.StatefulLoggingHelperTest - -# -# Top level tests -# -org.glassfish.admin.amxtest.TestTemplateTest -org.glassfish.admin.amxtest.DomainRootTest - -# -# Tests for Deployment. Do this before other generic tests -# because they deploy a number of apps that will then be -# subsequently tested. -# -#org.glassfish.admin.amxtest.deploy.DeploymentProgressTest -#org.glassfish.admin.amxtest.deploy.DeploymentSourceTest -#org.glassfish.admin.amxtest.deploy.DeploymentStatusTest -#org.glassfish.admin.amxtest.deploy.DeploymentMgrTest - -# -# Tests for interfaces defined in com.sun.appserv.management.base -# -org.glassfish.admin.amxtest.base.AMXTest -org.glassfish.admin.amxtest.base.GetSetAttributeTest -org.glassfish.admin.amxtest.base.ContainerTest -org.glassfish.admin.amxtest.base.GenericTest -org.glassfish.admin.amxtest.config.PropertiesAccessTest -org.glassfish.admin.amxtest.config.SystemPropertiesAccessTest -org.glassfish.admin.amxtest.base.UploadDownloadMgrTest -org.glassfish.admin.amxtest.base.BulkAccessTest -org.glassfish.admin.amxtest.base.QueryMgrTest -org.glassfish.admin.amxtest.base.NotificationEmitterServiceTest -org.glassfish.admin.amxtest.base.NotificationServiceMgrTest -org.glassfish.admin.amxtest.base.NotificationServiceTest -org.glassfish.admin.amxtest.base.ListenerTest -org.glassfish.admin.amxtest.client.MiscTest - -# -# Tests for Monitoring -# -#org.glassfish.admin.amxtest.monitor.ComSunAppservMonitorTest -org.glassfish.admin.amxtest.monitor.StatisticTest -org.glassfish.admin.amxtest.monitor.MonitorTest -org.glassfish.admin.amxtest.monitor.JMXMonitorMgrTest - -# -# Tests for JSR 77 -# -org.glassfish.admin.amxtest.j2ee.J2EETest -org.glassfish.admin.amxtest.j2ee.ServletTest - - - -# -# Tests for configuration -# -org.glassfish.admin.amxtest.config.DanglingRefsTest -org.glassfish.admin.amxtest.helper.RefHelperTest -#org.glassfish.admin.amxtest.config.ComSunAppservConfigTest -org.glassfish.admin.amxtest.config.EnabledTest -org.glassfish.admin.amxtest.config.DescriptionTest -org.glassfish.admin.amxtest.config.LibrariesTest -org.glassfish.admin.amxtest.config.DomainConfigTest -org.glassfish.admin.amxtest.config.ConfigConfigTest -org.glassfish.admin.amxtest.config.SecurityServiceConfigTest -org.glassfish.admin.amxtest.config.MessageSecurityConfigTest -org.glassfish.admin.amxtest.config.StandaloneServerConfigTest -org.glassfish.admin.amxtest.config.ClusteredServerConfigTest -org.glassfish.admin.amxtest.config.CustomMBeanConfigTest -org.glassfish.admin.amxtest.config.ConnectorResourceConfigTest -org.glassfish.admin.amxtest.config.ReferencesTest -org.glassfish.admin.amxtest.config.HTTPServiceConfigTest -org.glassfish.admin.amxtest.config.HTTPListenerConfigTest -org.glassfish.admin.amxtest.config.ClusterConfigTest -org.glassfish.admin.amxtest.config.SSLConfigTest -org.glassfish.admin.amxtest.config.JMXConnectorConfigTest -org.glassfish.admin.amxtest.config.IIOPListenerConfigTest -org.glassfish.admin.amxtest.config.HTTPListenerConfigTest -org.glassfish.admin.amxtest.config.AuditModuleConfigTest -org.glassfish.admin.amxtest.config.AuthRealmConfigTest -org.glassfish.admin.amxtest.config.JavaConfigTest -org.glassfish.admin.amxtest.config.ProfilerConfigTest -org.glassfish.admin.amxtest.config.VirtualServerConfigTest -org.glassfish.admin.amxtest.config.JACCProviderConfigTest -org.glassfish.admin.amxtest.config.AdminObjectResourceConfigTest -org.glassfish.admin.amxtest.config.JDBCResourceConfigTest -org.glassfish.admin.amxtest.config.MailResourceConfigTest -org.glassfish.admin.amxtest.config.ConnectorConnectionPoolConfigTest -org.glassfish.admin.amxtest.config.JDBCConnectionPoolConfigTest -org.glassfish.admin.amxtest.config.PersistenceManagerFactoryResourceConfigTest -org.glassfish.admin.amxtest.config.JNDIResourceConfigTest -org.glassfish.admin.amxtest.config.ThreadPoolConfigTest -org.glassfish.admin.amxtest.config.AvailabilityServiceConfigTest -org.glassfish.admin.amxtest.config.LBTest -org.glassfish.admin.amxtest.config.ResourceAdapterConfigTest -org.glassfish.admin.amxtest.config.ConnectorConnectionPoolConfigTest -org.glassfish.admin.amxtest.config.SecurityMapConfigTest -org.glassfish.admin.amxtest.config.CustomResourceConfigTest -org.glassfish.admin.amxtest.config.ConnectorServiceConfigTest -org.glassfish.admin.amxtest.config.DiagnosticServiceConfigTest -org.glassfish.admin.amxtest.config.NodeAgentConfigTest - - -# -# Tests for client performance -# -org.glassfish.admin.amxtest.client.PerformanceTest - - -# -# Test for callflow -# -#org.glassfish.admin.amxtest.monitor.CallFlowMonitorTest - -# run again, to hit any MBeans created during testing -org.glassfish.admin.amxtest.base.GenericTest -org.glassfish.admin.amxtest.base.AMXTest -org.glassfish.admin.amxtest.base.GetSetAttributeTest - - -# do this last!!! -org.glassfish.admin.amxtest.RunMeLastTest - - - - - diff --git a/appserver/tests/amx/resources/amxtest.properties b/appserver/tests/amx/resources/amxtest.properties deleted file mode 100644 index cb40c5ecf02..00000000000 --- a/appserver/tests/amx/resources/amxtest.properties +++ /dev/null @@ -1,174 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# -# By default a conneciton is made to the server specified by: -# amxtext.connect.host, amxtext.connect.port, -# amxtest.connect.user, amxtest.connect.password, -# amxtest.connect.useTLS, -# [amxtest.connect.truststore, amxtest.connect.truststorePassword] -# -# Some unit tests are standalone and do not require a connection. You -# may set amxtest.connect=false and no connection will be made. You will -# want to remove any tests requiring a connection from the list of classes -# in the file given by amxtest.testClasses because without a connection -# such tests will always fail. -# -amxtest.connect=true - -# Name of host that is running the rmi server -amxtest.connect.host=localhost - -# this is the rmi port -amxtest.connect.port=8888 - -# the name of the admin -amxtest.connect.user=admin - -# the admin's password -amxtest.connect.password=adminadmin - -# -# amxtest.connect.useTLS must match the TLS setting of the server's -# JMX RMI connector. -# -# Defaults: -# EE build: set to true -# PE build: set to false -amxtest.connect.useTLS=false - -# -# The name of the truststore and its password to be used if TLS is enabled -# These may be left alone, even if TLS is not used. -# There is no need to pre-create the truststore. -# -amxtest.connect.truststore=./amx-test-truststore -amxtest.connect.truststorePassword=changeme - -# -# Enabling threading is a more rigorous test, -# since related tests are run in parallel. -# If major changes are made, be sure to set this to true. -# -# NOTE: HTTPListenerConfigTest tends to hang -# some kind of internal infrastructure bug (non-AMX). -amxtest.threaded=false - -# when amxtest.verbose is true, timings are emitted for most tests -# as well an anything output from printVerbose() -amxtest.verbose=true - - -# The location of a list of the classes to be tested. -# If all classes are to be tested then this line can be commented -# out. All of the tests to be tested are always listed when -# the tests are run, so its -# possible to recreate this file with the full list simply by -# executing the tests! -amxtest.testClasses=amxtest.classes - - -# -# Some tests have been known to fail on a 2nd try -# due to bugs in not properly removing artifacts -# -amxtest.iterations=1 - - -# -# The DeploymentMgr unit test looks for a common-separated -# list of archives to deploy in the propery 'amxtest.deploy.files' -# Comma-delimited list of archives or directories -# -amxtest.deploy.files=tests/deploy - - -# -# Node agents to included in testing. -# -amxtest.nodeAgents=ALL - -# -# The name of the node agent running on the same machine as the DAS -# (optional, but create a node agent and set this value if you -# want tests that require a node agent to run). -# -amxtest.dasNodeAgent=HOSTNAME - - -# -# Whether expanded testing is to be done. This means things -# such as creating extra servers, clusters, etc. -# -amxtest.expandedTesting=true - - -######################### Offline Testing ########################### -### These parameters control testing of AMX in "Offline" mode. ### -### In offline mode, only certain utility MBeans and ### -### config MBeans are tested ### -### ### -##################################################################### - -# -# Whether to test the offline config implementation as opposed -# to the DAS. -# amxtest.connect.* is ignored if this is true -# -amxtest.testOffline=false - -# -# If amxtest.testOffline=true, set this to a valid file path -# for a domain.xml. -# -amxtest.testOffline.domainXML=G:/run/domains/domain1/config/domain.xml - - - - - - - - - - - - - diff --git a/appserver/tests/amx/run.sh b/appserver/tests/amx/run.sh deleted file mode 100755 index f34161ce809..00000000000 --- a/appserver/tests/amx/run.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# should be done already -# mvn clean; mvn install; mvn assembly:assembly -echo "" -echo "===> YOU MUST HAVE ALREADY DONE 'mvn install; mvn assembly:assembly' <==" -echo "" - -export CP=target/amx-tests-10.0-SNAPSHOT-jar-with-dependencies.jar -export MAIN=org.glassfish.admin.amxtest.TestMain -export PROPS=resources/amxtest.properties - -java -cp $CP -ea $MAIN $PROPS - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/AMXTestBase.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/AMXTestBase.java deleted file mode 100644 index be143a75aae..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/AMXTestBase.java +++ /dev/null @@ -1,689 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.BulkAccess; -import com.sun.appserv.management.base.NotificationServiceMgr; -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.SystemInfo; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.client.AppserverConnectionSource; -import com.sun.appserv.management.client.ConnectionSource; -import com.sun.appserv.management.client.ProxyFactory; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.ModuleMonitoringLevelValues; -import com.sun.appserv.management.config.ModuleMonitoringLevelsConfig; -import com.sun.appserv.management.config.NodeAgentConfig; -import com.sun.appserv.management.config.ServerConfig; -import com.sun.appserv.management.config.ServersConfig; -import com.sun.appserv.management.j2ee.J2EEDomain; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.jmx.MBeanServerConnectionConnectionSource; -import com.sun.appserv.management.util.misc.ClassUtil; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.TypeCast; -import com.sun.appserv.management.base.AMXDebugSupportMBean; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.management.Attribute; -import javax.management.AttributeList; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.Collection; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.HashMap; - -/** - Base class for testing the AMX API - */ -public class AMXTestBase - extends JMXTestBase { - private ConnectionSource mConnectionSource; - private final DomainRoot mDomainRoot; - private final ProxyFactory mProxyFactory; - private final Set mNotTested; - private final TestUtil mTestUtil; - - /** - config name for PE (non-EE) configuration - */ - protected static final String PE_CONFIG_NAME = "server-config"; - - private final static boolean WEB_MODULE_MONITOR_BROKEN = true; - - private static boolean MONITORING_ENABLED = false; - - protected static final String NEWLINE = System.getProperty("line.separator"); - - - public AMXTestBase() { - checkConnection(getConnection()); - - mNotTested = new HashSet(); - try { - mConnectionSource = - new MBeanServerConnectionConnectionSource(getConnection()); - - mProxyFactory = ProxyFactory.getInstance(mConnectionSource, true); - mDomainRoot = mProxyFactory.getDomainRoot(); - } - catch (Exception e) { - throw new RuntimeException(e.toString(), e); - } - - mTestUtil = new TestUtil(getDomainRoot()); - } - - - protected Map - getServerConfigMap( final ServersConfig sc ) - { - final Map all = new HashMap(); - - all.putAll( sc.getStandaloneServerConfigMap() ); - all.putAll( sc.getClusteredServerConfigMap() ); - return all; - } - - - protected Set - getAllAMX() { - return getTestUtil().getAllAMX(); - } - - protected ModuleMonitoringLevelsConfig - getModuleMonitoringLevelsConfig(final String configName) { - final ConfigConfig cc = configName == null ? getConfigConfig() : getConfigConfig(configName); - assert (cc != null); - - final ModuleMonitoringLevelsConfig mon = - cc.getMonitoringServiceConfig().getModuleMonitoringLevelsConfig(); - - return (mon); - } - - protected ModuleMonitoringLevelsConfig - getModuleMonitoringLevelsConfig() { - return getModuleMonitoringLevelsConfig(null); - } - - - private void changeAllLevels( final ModuleMonitoringLevelsConfig config, final String value ) - { - final Set names = ModuleMonitoringLevelsConfig.ALL_LEVEL_NAMES; - - final AttributeList attrs = new AttributeList(); - for( final String name : names ) - { - attrs.add( new Attribute( name, value ) ); - } - try { - Util.getExtra(config).setAttributes( attrs ); - } catch ( Exception e ) { - // ignore - } - } - - /** - Ensure that monitoring is enabled so that unit tests don't miss anything - */ - protected synchronized void - setMonitoring( final String value ) { - synchronized (AMXTestBase.class) { - final String[] configNames = getConfigNames(); - for (int i = 0; i < configNames.length; ++i) { - final ModuleMonitoringLevelsConfig mml = getModuleMonitoringLevelsConfig(configNames[i] ); - changeAllLevels( mml, value ); - } - } - } - - protected void - turnOffMonitoring() { - setMonitoring( ModuleMonitoringLevelValues.OFF ); - MONITORING_ENABLED = false; - } - - protected void - turnOnMonitoring() { - setMonitoring( ModuleMonitoringLevelValues.HIGH ); - MONITORING_ENABLED = true; - } - - private static final Set EXPECTED_REMOTE_INCOMPLETE_TYPES = - GSetUtil.newUnmodifiableStringSet(XTypes.CALL_FLOW_MONITOR, XTypes.LOGGING); - - protected boolean - isRemoteIncomplete(final ObjectName objectName) { - final AMX amx = getProxyFactory().getProxy(objectName, AMX.class); - final String j2eeType = amx.getJ2EEType(); - - final boolean isRemote = !amx.isDAS(); - - if (isRemote && - !EXPECTED_REMOTE_INCOMPLETE_TYPES.contains(j2eeType)) { - warning("isRemoteIncomplete: not expecting j2eeType=" + j2eeType + - ", has the implementation changed?"); - } - - return isRemote; - } - - - protected boolean - shouldTest(final ObjectName objectName) { - boolean shouldTest = !isRemoteIncomplete(objectName); - - return (shouldTest); - } - - protected void - waitUnregistered(final ObjectName objectName) - throws IOException { - final MBeanServerConnection conn = getConnection(); - if (conn.isRegistered(objectName)) { - mySleep(100); - } - - while (conn.isRegistered(objectName)) { - trace("waitUnregistered: " + objectName); - mySleep(100); - } - } - - - /** - Because proxies are cleaned up asynchronously, it's possible for one - to remain in the factory until the factory processes the Notification - that it's MBean has been unregistered. - */ - protected void - waitProxyGone( - final ProxyFactory factory, - final ObjectName objectName) { - long millis = 1; - - while (factory.getProxy(objectName, AMX.class, false) != null) { - mySleep(millis); - millis *= 2; - trace("waitProxyGone: waiting for proxy to disappear: " + objectName); - } - } - - protected final void - notTested(final ObjectName objectName) { - if (isRemoteIncomplete(objectName)) { - trace("remoteIncomplete (this is OK): " + objectName); - } else { - mNotTested.add(objectName); - } - } - - protected final Set - getNotTestedSet() { - return (mNotTested); - } - - public static void - mySleep(final long millis) { - try { - Thread.sleep(millis); - } - catch (InterruptedException e) { - } - } - - protected final void - warnNotTested() { - final Set notTested = getNotTestedSet(); - - if (notTested.size() != 0) { - final Set j2eeTypes = - JMXUtil.getKeyPropertySet(AMX.J2EE_TYPE_KEY, notTested); - - trace("WARNING: DID NOT TEST: " + notTested.size() + " MBeans of types {" + - toString(j2eeTypes) + "}"); - } - } - - - protected void - checkConnection(final MBeanServerConnection conn) { - assert (getConnection() != null); - - try { - conn.isRegistered(JMXUtil.getMBeanServerDelegateObjectName()); - } - catch (Exception e) { - fail("Connection failed:\n" + - ExceptionUtil.getStackTrace(getRootCause(e))); - } - } - - protected void - checkConnection() { - checkConnection(getConnection()); - } - - protected TestUtil - getTestUtil() { - return mTestUtil; - } - - - protected final AMX - getProxy(final ObjectName objectName) { - final ProxyFactory factory = ProxyFactory.getInstance(getConnectionSource(), true); - - final AMX proxy = factory.getProxy(objectName, AMX.class); - - return (proxy); - } - - /** - We don't have T extend AMX because not all mixin interfaces extend AMX. - */ - protected final T - getProxy( - final ObjectName objectName, - final Class theClass) { - return (theClass.cast(getProxy(objectName))); - } - - - protected final DomainRoot - getDomainRoot() { - assert (mDomainRoot != null) : "mDomainRoot is null"; - return (mDomainRoot); - } - - protected final DomainConfig - getDomainConfig() { - return (getDomainRoot().getDomainConfig()); - } - - protected final J2EEDomain - getJ2EEDomain() { - return (getDomainRoot().getJ2EEDomain()); - } - - protected String[] - getConfigNames() { - final Map configMap = - getDomainConfig().getConfigsConfig().getConfigConfigMap(); - - return (GSetUtil.toStringArray(configMap.keySet())); - } - - protected ConfigConfig - getConfigConfig(final String name) { - final Map configs = getDomainConfig().getConfigsConfig().getConfigConfigMap(); - - return configs.get(name == null ? PE_CONFIG_NAME : name); - } - - protected static ConfigConfig - getConfigConfig(final AMXConfig any) { - final ObjectName objectName = Util.getObjectName(any); - final String configName = objectName.getKeyProperty(XTypes.CONFIG_CONFIG); - - return any.getDomainRoot().getDomainConfig().getConfigsConfig().getConfigConfigMap().get(configName); - } - - protected ConfigConfig - getConfigConfig() { - return (getConfigConfig(PE_CONFIG_NAME)); - } - - - protected QueryMgr - getQueryMgr() { - assert (mDomainRoot != null); - final QueryMgr proxy = getDomainRoot().getQueryMgr(); - assert (proxy != null); - return (proxy); - } - - - protected NotificationServiceMgr - getNotificationServiceMgr() { - return (getDomainRoot().getNotificationServiceMgr()); - } - - protected BulkAccess - getBulkAccess() { - return (getDomainRoot().getBulkAccess()); - } - - protected ConnectionSource - getConnectionSource() { - assert (mConnectionSource != null); - return (mConnectionSource); - } - - protected MBeanServerConnection - getConnection() { - return (getGlobalMBeanServerConnection()); - } - - protected ProxyFactory - getProxyFactory() { - return (mProxyFactory); - } - - - protected Class - getInterfaceClass(AMX proxy) - throws ClassNotFoundException { - final String name = Util.getExtra(proxy).getInterfaceName(); - return (ClassUtil.getClassFromName(name)); - } - - protected boolean - testOnProxies( - final Collection proxies, - final Method method) - throws Exception { - final long start = now(); - - boolean failed = false; - - int testCount = 0; - - final Object[] args = new Object[1]; - for (final T proxy : proxies) { - final ObjectName objectName = Util.getExtra(proxy).getObjectName(); - - if (!shouldTest(objectName)) { - notTested(objectName); - continue; - } - - ++testCount; - try { - args[0] = proxy; - method.invoke(this, args); - } - catch (Exception e) { - trace(method.getName() + " failed for proxy: " + - quote(JMXUtil.toString(objectName))); - failed = true; - trace(ExceptionUtil.toString(e)); - } - } - - - final long elapsed = now() - start; - printVerbose("Ran test method " + method.getName() + " on " + testCount + - " candidates in " + elapsed + "ms"); - warnNotTested(); - - warnNotTested(); - - return (!failed); - } - - - protected boolean - testOnObjectNames( - final Collection objectNames, - final Method method) - throws Exception { - boolean failed = false; - - final Object[] args = new Object[1]; - - int testCount = 0; - final long start = now(); - - for (final ObjectName objectName : objectNames) { - if (!shouldTest(objectName)) { - notTested(objectName); - continue; - } - - ++testCount; - try { - args[0] = objectName; - method.invoke(this, args); - } - catch (Exception e) { - final Throwable rootCause = getRootCause(e); - trace(method.getName() + " failed for: " + - quote(JMXUtil.toString(objectName)) + " with Exception of type " + - rootCause.getClass().getName() + ", msg = " + rootCause.getMessage()); - failed = true; - } - } - - final long elapsed = now() - start; - printVerbose("Ran test method " + method.getName() + " on " + testCount + - " candidates in " + elapsed + "ms"); - warnNotTested(); - - return (!failed); - } - - - protected final static Class[] OBJECTNAME_SIG = new Class[]{ObjectName.class}; - protected final static Class[] PROXY_SIG = new Class[]{AMX.class}; - - protected void - testAll( - final Collection objectNames, - final String methodName) - throws Exception { - final boolean success = testOnObjectNames(objectNames, - this.getClass().getMethod(methodName, OBJECTNAME_SIG)); - - assert (success); - } - - protected void - testAllProxies( - final Collection proxies, - final String methodName) - throws Exception { - final boolean success = testOnProxies(proxies, - this.getClass().getMethod(methodName, PROXY_SIG)); - - assert (success); - } - - protected void - testAll(String methodName) - throws Exception { - final Set names = getTestUtil().getAllObjectNames(); - - testAll(names, methodName); - } - - public void - setUp() - throws Exception { - super.setUp(); - - turnOnMonitoring(); - } - - public void - testAssertsOn() { - checkAssertsOn(); - } - - private static final String DEFAULT_INSTANCE_NAME = "test"; - - protected static String - getDefaultInstanceName(final String qualifier) { - String name = null; - - if (qualifier == null) { - name = DEFAULT_INSTANCE_NAME; - } else { - name = qualifier + "." + DEFAULT_INSTANCE_NAME; - } - return name; - } - - protected Throwable - getRootCause(Throwable t) { - return ExceptionUtil.getRootCause(t); - } - - protected String - getStackTrace(Throwable t) { - return ExceptionUtil.getStackTrace(t); - } - - protected String - getRootCauseStackTrace(Throwable t) { - return getStackTrace(getRootCause(t)); - } - - protected Map - getNodeAgents() { - final Map m = Map.class.cast(getEnvValue(PropertyKeys.NODE_AGENTS_KEY)); - return TypeCast.checkedMap(m, - String.class, AppserverConnectionSource.class); - } - - - protected String - getDASNodeAgentName() { - return getEnvString(PropertyKeys.DAS_NODE_AGENT_NAME, null); - } - - protected NodeAgentConfig - getDASNodeAgentConfig() { - final String name = getDASNodeAgentName(); - - NodeAgentConfig config = null; - if (name != null) { - config = getDomainConfig().getNodeAgentsConfig().getNodeAgentConfigMap().get(name); - } - - return config; - } - - protected boolean - getTestOffline() { - return getEnvBoolean(PropertyKeys.TEST_OFFLINE_KEY, false); - } - - /** - Check if we're testing in Offline mode, which means that - Config MBeans are loaded in-process. If so, issue a warning. - - @return true if test should be run, false if in offline mode - */ - protected boolean - checkNotOffline(final String testName) { - boolean offline = getTestOffline(); - - if (offline) { - //warning( "amxtest.testOffline=true, skipping test " + testName + "()" ); - } - - return !offline; - } - - - public static Capabilities - getDefaultCapabilities() { - return getOfflineCapableCapabilities(true); - } - - protected static Capabilities - getOfflineCapableCapabilities(boolean offlineCapable) { - final Capabilities c = new Capabilities(); - c.setOfflineCapable(offlineCapable); - - return c; - } - - AMXDebugSupportMBean - getAMXDebugSupportMBean() { - final ObjectName objectName = Util.newObjectName(AMXDebugSupportMBean.OBJECT_NAME); - - try { - return (AMXDebugSupportMBean) newProxy(objectName, AMXDebugSupportMBean.class); - } - catch (Exception e) { - assert false : "Can't get proxy to " + objectName; - } - return null; - } - - protected boolean - supportsMultipleServers() { - return supportsMultipleServers(getDomainRoot()); - } - - public static boolean - supportsMultipleServers(final DomainRoot domainRoot) { - return domainRoot.getSystemInfo().supportsFeature(SystemInfo.MULTIPLE_SERVERS_FEATURE); - } - - - protected boolean - supportsClusters() { - return getDomainRoot().getSystemInfo().supportsFeature(SystemInfo.CLUSTERS_FEATURE); - } -} - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/Capabilities.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/Capabilities.java deleted file mode 100644 index c1abfc67d4c..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/Capabilities.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - - -/** - */ -public final class Capabilities { - private final HashMap mItems; - - public static final String OFFLINE_KEY = "Offline"; - - public Capabilities() { - mItems = new HashMap(); - } - - public Capabilities(final Object[] pairs) { - this(); - for (int i = 0; i < pairs.length; i += 2) { - add((String) pairs[i], pairs[i + 1]); - } - } - - public Map - getAll() { - return Collections.unmodifiableMap(mItems); - } - - - public boolean getOfflineCapable() { - return "true".equals("" + mItems.get(OFFLINE_KEY)); - } - - public void setOfflineCapable(boolean value) { - add(OFFLINE_KEY, "" + value); - } - - public void - add( - final String key, - final Object value) { - assert (!mItems.containsKey(key)); - mItems.put(key, value); - } -}; - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ClusterSupportRequired.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ClusterSupportRequired.java deleted file mode 100644 index 2c30e6e41dc..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ClusterSupportRequired.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - - -/** - Marker interface denoting the fact that the implementing class - requires cluster support to function eg EE instead of PE. - */ -public interface ClusterSupportRequired { -} - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/CoverageInfoAnalyzer.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/CoverageInfoAnalyzer.java deleted file mode 100644 index 23e12de11e3..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/CoverageInfoAnalyzer.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import org.glassfish.admin.amx.util.AMXDebugStuff; -import com.sun.appserv.management.ext.coverage.CoverageInfo; -import com.sun.appserv.management.ext.coverage.CoverageInfoDummy; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - - -/** - Analyze the CoverageInfo for AMX MBeans. Use only after tests - have been run. - */ -public final class CoverageInfoAnalyzer { - private final DomainRoot mDomainRoot; - private final QueryMgr mQueryMgr; - private final TestUtil mTestUtil; - - private final String NEWLINE; - - public CoverageInfoAnalyzer(final DomainRoot domainRoot) { - mDomainRoot = domainRoot; - mQueryMgr = domainRoot.getQueryMgr(); - mTestUtil = new TestUtil(domainRoot); - - final AMXDebugStuff debugRoot = mTestUtil.asAMXDebugStuff(mDomainRoot); - if (debugRoot == null) { - throw new RuntimeException("AMX-DEBUG/CoverageInfo is not enabled"); - } - - final CoverageInfo coverageInfo = debugRoot.getCoverageInfo(); - - if (coverageInfo instanceof CoverageInfoDummy) { - throw new IllegalArgumentException("Coverage disabled--add system property " + - "'-DAMX-DEBUG=true', then restart server"); - } - - NEWLINE = System.getProperty("line.separator"); - } - - private static final Set IGNORE_METHODS = - GSetUtil.newUnmodifiableStringSet( - "addNotificationListener(javax.management.NotificationListener", - "removeNotificationListener(javax.management.NotificationListener", - "getAMXDebug", - "setAMXDebug", - "enableAMXDebug", - "getImplString", - "enableCoverageInfo", - "clearCoverageInfo" - ); - - private static final Set IGNORE_UNKNOWN = - GSetUtil.newUnmodifiableStringSet( - "ContaineeJ2EETypes", - "eventProvider" - ); - - /** - Certain methods will never be called via remote access due to - the JMX implementation. removeNotificationListener() in particular - is only invoked in one way by the MBeanServer in response to - remote clients registering listeners. Omit these cases, since - they will never be invoked. - */ - private void - handleSpecialCases(final CoverageInfo coverageInfo) { - final Set notInvoked = coverageInfo.getOperationsNotInvoked(); - - for (final String op : notInvoked) { - for (final String prefix : IGNORE_METHODS) { - if (op.startsWith(prefix)) { - coverageInfo.markAsInvoked(op); - } - } - } - - // make a copy, we'll be modifying it - final Set unknown = coverageInfo.getUnknownAttributes().keySet(); - for (final String s : unknown) { - if (s.startsWith("bogus") || - IGNORE_UNKNOWN.contains(s)) { - coverageInfo.ignoreUnknownAttribute(s); - } - } - } - - - public Map - getCoverage(final Set candidates) { - final Map coverageMap = new HashMap(); - - for (final AMX amx : candidates) { - final AMXDebugStuff debug = mTestUtil.asAMXDebugStuff(amx); - final CoverageInfo coverageInfo = debug.getCoverageInfo(); - assert (coverageInfo != null); - handleSpecialCases(coverageInfo); - - final String j2eeType = amx.getJ2EEType(); - final CoverageInfo existing = coverageMap.get(j2eeType); - if (existing != null) { - existing.merge(coverageInfo); - } else { - coverageMap.put(j2eeType, coverageInfo); - } - } - - return coverageMap; - } - - public String - getCoverageSummary() { - final Set amx = mTestUtil.getAllAMX(); - final Map coverage = getCoverage(amx); - - final String[] j2eeTypes = GSetUtil.toStringArray(coverage.keySet()); - Arrays.sort(j2eeTypes); - - final String LINE_SEP = System.getProperty("line.separator"); - - final StringBuilder builder = new StringBuilder(); - for (final String j2eeType : j2eeTypes) { - final CoverageInfo info = coverage.get(j2eeType); - - final String infoString = - "Coverage for j2eeType = " + j2eeType + - ": " + (info.getFullCoverage() ? "100%" : "INCOMPLETE COVERAGE") + - LINE_SEP + - info.toString(false) + LINE_SEP + LINE_SEP; - - builder.append(infoString); - } - - final String msg = - "No AMX MBeans having the following types " + - "were ever present, and so were NEVER TESTED:" + NEWLINE; - builder.append(createMissingString(msg)); - - return builder.toString(); - } - - - /** - @return Set of j2eeTypes for which no MBeans exist - */ - protected Set - findMissingJ2EETypes() { - final Set missing = new HashSet(); -/* - missing.addAll( XTypesMapper.getInstance().getJ2EETypes() ); - missing.addAll( J2EETypesMapper.getInstance().getJ2EETypes() ); - - missing.removeAll( mTestUtil.findRegisteredJ2EETypes() ); - - final Set registered = - Observer.getInstance().getRegistrationListener().getRegistered(); - for( final ObjectName objectName : registered ) - { - final String j2eeType = Util.getJ2EEType( objectName ); - if ( j2eeType != null ) - { - missing.remove( j2eeType ); - } - } -*/ - - return missing; - } - - protected void - groupMissingJ2EETypes( - final Set allMissing, - final Set missingConfigs, - final Set missingMonitors, - final Set missingOthers - ) { - for (final String j2eeType : allMissing) { - if (j2eeType.endsWith("Config")) { - missingConfigs.add(j2eeType); - } else if (j2eeType.endsWith("Monitor")) { - missingMonitors.add(j2eeType); - } else { - missingOthers.add(j2eeType); - } - } - } - - private String - setToSortedString( - final Set s, - final String delim) { - final String[] a = GSetUtil.toStringArray(s); - Arrays.sort(a); - - return StringUtil.toString(NEWLINE, (Object[]) a); - } - - - protected String - createMissingString(final String msg) { - String result = ""; - - final Set missing = findMissingJ2EETypes(); - if (missing.size() != 0) { - final Set missingConfig = new HashSet(); - final Set missingMonitors = new HashSet(); - final Set missingOthers = new HashSet(); - - groupMissingJ2EETypes(missing, missingConfig, missingMonitors, missingOthers); - - result = msg + NEWLINE + - "Config: " + NEWLINE + - setToSortedString(missingConfig, NEWLINE) + NEWLINE + NEWLINE + - "Monitor: " + NEWLINE + - setToSortedString(missingMonitors, NEWLINE) + NEWLINE + NEWLINE + - "J2EE/Other: " + NEWLINE + - setToSortedString(missingOthers, NEWLINE); - } - - return result; - } -} - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/DomainRootTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/DomainRootTest.java deleted file mode 100644 index 32cd6f24f5a..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/DomainRootTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/DomainRootTest.java,v 1.6 2007/05/05 05:23:50 tcfujii Exp $ -* $Revision: 1.6 $ -* $Date: 2007/05/05 05:23:50 $ -*/ -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.NotificationEmitterService; - -import java.io.IOException; -import java.util.Map; - -/** - */ -public final class DomainRootTest - extends AMXTestBase { - - public DomainRootTest() - throws IOException { - } - - public void - testGetDomain() { - getDomainRoot(); - } - - public void - testGetDottedNames() { - if (checkNotOffline("testGetDottedNames")) { - assert (getDomainRoot().getDottedNames() != null); - } - } - - - public void - testGetDomainNotificationEmitterService() { - assert (getDomainRoot().getDomainNotificationEmitterService() != null); - } - - - public void - testGetDomainNotificationEmitterServiceMap() { - final Map services = - getDomainRoot().getNotificationEmitterServiceMap(); - assert (services != null); - - for (NotificationEmitterService s : services.values()) { - s.getListenerCount(); - } - } - - - public void - testAMXReady() { - final DomainRoot domainRoot = getDomainRoot(); - - while (!domainRoot.getAMXReady()) { - mySleep(10); - } - } - - public void - testWaitAMXReady() { - final DomainRoot domainRoot = getDomainRoot(); - - domainRoot.waitAMXReady(); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/JMXTestBase.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/JMXTestBase.java deleted file mode 100644 index 45d00a63244..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/JMXTestBase.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.CollectionUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import com.sun.appserv.management.util.stringifier.SmartStringifier; - -import javax.management.InstanceAlreadyExistsException; -import javax.management.MBeanRegistrationException; -import javax.management.MBeanServer; -import javax.management.MBeanServerFactory; -import javax.management.MBeanServerConnection; -import javax.management.MBeanServerInvocationHandler; -import javax.management.MalformedObjectNameException; -import javax.management.NotCompliantMBeanException; -import javax.management.ObjectName; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -/** - Base class for AMX unit tests. - */ -public class JMXTestBase - extends junit.framework.TestCase { - private static MBeanServerConnection _GlobalMBeanServerConnection; - private static Map sEnv; - protected final String NEWLINE; - - private static final MBeanServer TEST_MBEAN_SERVER = MBeanServerFactory.newMBeanServer("JMXTestBase_temp"); - /** - Get an in-JVM MBeanServer for testing. - */ - protected MBeanServer - getTestMBeanServer() - { - return TEST_MBEAN_SERVER; - } - - /** - Set the global MBeanServerConnection. This is to support testing to a - remote host. - */ - public static synchronized void setGlobalConnection(final MBeanServerConnection conn) { - _GlobalMBeanServerConnection = conn; - } - - public static synchronized MBeanServerConnection - getGlobalMBeanServerConnection() { - return _GlobalMBeanServerConnection; - } - - public static MBeanServerConnection - getMBeanServerConnection() { - return getGlobalMBeanServerConnection(); - } - - protected T - newProxy( - final ObjectName target, - final Class interfaceClass) { - try { - assert getGlobalMBeanServerConnection().isRegistered(target); - } - catch (java.io.IOException e) { - throw new RuntimeException(e); - } - - return interfaceClass.cast(MBeanServerInvocationHandler.newProxyInstance( - getGlobalMBeanServerConnection(), target, interfaceClass, true)); - } - - public static synchronized Object - getEnvValue(final String key) { - return (sEnv == null ? null : sEnv.get(key)); - } - - public static Integer - getEnvInteger( - final String key, - Integer defaultValue) { - final String s = getEnvString(key, null); - Integer result = defaultValue; - if (s != null) { - result = new Integer(s.trim()); - } - - return (result); - } - - public static String - getEnvString( - final String key, - final String defaultValue) { - final String s = (String) getEnvValue(key); - - return (s == null ? defaultValue : s); - } - - - public static Boolean - getEnvBoolean( - final String key, - final Boolean defaultValue) { - Boolean result = defaultValue; - final String s = getEnvString(key, null); - if (s != null) { - result = Boolean.valueOf(s); - } - - return (result); - } - - - private static synchronized void - initEnv() { - if (sEnv == null) { - sEnv = new HashMap(); - } - } - - public static synchronized void - setEnvValue( - final String key, - final Object value) { - initEnv(); - sEnv.put(key, value); - } - - public static synchronized void - setEnvValues(final Map m) { - initEnv(); - sEnv.putAll(m); - } - - - public JMXTestBase() { - super("JMXTestBase"); - - NEWLINE = StringUtil.NEWLINE(); - - checkAssertsOn(); - } - - public JMXTestBase(String name) { - super(name); - NEWLINE = StringUtil.NEWLINE(); - checkAssertsOn(); - } - - - protected String - toString(final ObjectName objectName) { - return JMXUtil.toString(objectName); - } - - protected String - toString(final Object o) { - String result = null; - - if (o instanceof Collection) { - result = CollectionUtil.toString((Collection) o, "\n"); - } else { - result = SmartStringifier.toString(o); - } - - return (result); - } - - - protected static void - trace(final Object o) { - System.out.println(SmartStringifier.toString(o)); - } - - protected void - println(final Object o) { - System.out.println(SmartStringifier.toString(o)); - } - - protected long - now() { - return (System.currentTimeMillis()); - } - - protected final void - printElapsed( - final String msg, - final long start) { - printVerbose(msg + ": " + (now() - start) + "ms"); - } - - protected final void - printElapsedIter( - final String msg, - final long start, - final long iterations) { - printVerbose(msg + "(" + iterations + " iterations): " + (now() - start) + "ms"); - } - - protected final void - printElapsed( - final String msg, - final int numItems, - final long start) { - printVerbose(msg + ", " + numItems + " MBeans: " + (now() - start) + "ms"); - } - - - protected final String - quote(final Object o) { - return (StringUtil.quote(SmartStringifier.toString(o))); - } - - - protected boolean - getVerbose() { - /* - final String value = (String) getEnvValue(PropertyKeys.VERBOSE_KEY); - - return (value != null && Boolean.valueOf(value).booleanValue()); - */ - return false; - } - - protected void - printVerbose(final Object o) { - if (getVerbose()) { - trace(o); - } - } - - - protected void - warning(final String msg) { - trace("\nWARNING: " + msg + "\n"); - } - - protected void - failure(final String msg) { - trace("\nFAILURE: " + msg + "\n"); - assert (false) : msg; - throw new Error(msg); - } - - protected void - checkAssertsOn() { - try { - assert (false); - throw new Error("Assertions must be enabled for unit tests"); - } - catch (AssertionError a) { - } - } - - - protected void - registerMBean( - Object mbean, - String name) - throws MalformedObjectNameException, InstanceAlreadyExistsException, - NotCompliantMBeanException, MBeanRegistrationException { - getTestMBeanServer().registerMBean(mbean, new ObjectName(name)); - } -}; - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/MultipleServerSupportRequired.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/MultipleServerSupportRequired.java deleted file mode 100644 index e8574a12f5e..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/MultipleServerSupportRequired.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - - -/** - Marker interface denoting the fact that the implementing class - requires multiple server support to function eg EE instead of PE. - */ -public interface MultipleServerSupportRequired { -} - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/Observer.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/Observer.java deleted file mode 100644 index 8f2079f73a8..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/Observer.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.client.ConnectionSource; - -import javax.management.ObjectName; -import java.util.Set; - - -/** - Observes various things as tests are run. - */ -public final class Observer { - private static Observer INSTANCE = null; - - private final RegistrationListener mListener; - - private final DomainRoot mDomainRoot; - - private Observer(final DomainRoot domainRoot) { - mDomainRoot = domainRoot; - - final ConnectionSource connSource = - Util.getExtra(domainRoot).getConnectionSource(); - - try { - mListener = RegistrationListener.createInstance("Observer", - connSource.getExistingMBeanServerConnection()); - } - catch (Exception e) { - throw new RuntimeException(e); - } - } - - public static synchronized Observer - create(final DomainRoot domainRoot) { - if (INSTANCE == null) { - INSTANCE = new Observer(domainRoot); - } else { - throw new IllegalArgumentException(); - } - return INSTANCE; - } - - public static Observer - getInstance() { - return INSTANCE; - } - - public RegistrationListener - getRegistrationListener() { - return mListener; - } - - public Set - getCurrentlyRegisteredAMX() { - return mListener.getCurrentlyRegistered(); - } - - public void - notifsLost() { - mListener.notifsLost(); - } - -} - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/PropertyKeys.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/PropertyKeys.java deleted file mode 100644 index bd5b2315f85..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/PropertyKeys.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import java.util.HashMap; -import java.util.Map; - -/** - Property keys used to configure the unit tests. - - @see TestMain - @see TestRunner */ -public final class PropertyKeys { - private PropertyKeys() {} - - - private final static String BASE = "amxtest"; - public static final String DEFAULT_PROPERTIES_FILE = BASE + ".properties"; - - public static final String CONNECT_KEY = BASE + ".connect"; - public static final String HOST_KEY = CONNECT_KEY + ".host"; - public static final String PORT_KEY = CONNECT_KEY + ".port"; - public static final String USER_KEY = CONNECT_KEY + ".user"; - public static final String PASSWORD_KEY = CONNECT_KEY + ".password"; - public static final String TRUSTSTORE_KEY = CONNECT_KEY + ".truststore"; - public static final String TRUSTSTORE_PASSWORD_KEY = CONNECT_KEY + ".truststorePassword"; - public static final String USE_TLS_KEY = CONNECT_KEY + ".useTLS"; - public static final String RUN_THREADED_KEY = BASE + ".threaded"; - public static final String VERBOSE_KEY = BASE + ".verbose"; - public static final String ITERATIONS_KEY = BASE + ".iterations"; - - /** - Whether testing is for offline config utilizing - com.sun.appserv.management.config.OfflineConfigIniter. - You must also supply a value for the {@link #DOMAIN_XML_KEY}. - */ - public static final String TEST_OFFLINE_KEY = BASE + ".testOffline"; - - /** - A valid file path for domain.xml. - */ - public static final String DOMAIN_XML_KEY = TEST_OFFLINE_KEY + ".domainXML"; - - - /** - A boolean specifying whether expanded testing is to be used. When specified, - tests that involve clusters, multiple standalone servers, etc are run - (if possible). - */ - public static final String EXPANDED_TESTING_KEY = BASE + ".expandedTesting"; - - /** - Comma-separated list of node-agent names to be used during testing. - The special name {@link #ALL_NODE_AGENTS} may be used to specify all configured node agents. -

- At runtime, the environment contains a Map available - via this key, where the key is the node agent name. - */ - public static final String NODE_AGENTS_KEY = BASE + ".nodeAgents"; - - public static final String ALL_NODE_AGENTS = "ALL"; - - - /** - Name of the node agent that the DAS uses. - */ - public static final String DAS_NODE_AGENT_NAME = BASE + ".dasNodeAgent"; - - /** - Comma-separated list of files. - */ - public static final String ARCHIVES_TO_DEPLOY_KEY = BASE + ".deploy.files"; - /** - Delimiter between files contained in the value for {@link #ARCHIVES_TO_DEPLOY_KEY}. - */ - public static final String ARCHIVES_DELIM = ","; - - /** - The number of threads to run for DeploymentMgrTest.testDeployHeavilyThreaded() - */ - public static final String DEPLOY_NUM_THREADS = BASE + ".deploy.numThreads"; - - - /** - The number of threads to run for UploadDownloadMgrTest.testHeavilyThreaded() - */ - public static final String UPLOAD_DOWNLOAD_MGR_TEST_THREADS = BASE + ".UploadDownloadMgrTest.numThreads"; - /** - The size, in KB, of UploadDownloadMgrTest.testDownloadBigFile() - */ - public static final String UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB = BASE + ".UploadDownloadMgrTest.bigFileKB"; - - - /** - File consisting of names of tests, one per line - */ - public static final String TEST_CLASSES_FILE_KEY = BASE + ".testClasses"; - - public static final String DEFAULT_HOST = "localhost"; - public static final String DEFAULT_PORT = "8686"; - public static final String DEFAULT_USER = "admin"; - public static final String DEFAULT_PASSWORD = "admin123"; - public static final String DEFAULT_TRUSTSTORE = "~/" + BASE + ".truststore"; - public static final String DEFAULT_TRUSTSTORE_PASSWORD = "changeme"; - public static final String DEFAULT_USE_TLS = "true"; - public static final String DEFAULT_RUN_THREADED = "true"; - public static final String DEFAULT_TEST_CLASSES_FILE_KEY = BASE + ".test-classes"; - public static final String DEFAULT_VERBOSE = "false"; - public static final String DEFAULT_ITERATIONS = "2"; - public static final String DEFAULT_CONNECT = "true"; - public static final String DEFAULT_NODE_AGENT_NAMES = ALL_NODE_AGENTS; - public static final String DEFAULT_EXPANDED_TESTING = "false"; - public static final String DEFAULT_TEST_OFFLINE = "false"; - - public static final String DEFAULT_ARCHIVES_TO_DEPLOY = ""; - public static final String DEFAULT_DEPLOY_NUM_THREADS = "10"; - - public static final String DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_THREADS = "10"; - public static final String DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB = "1536"; - - - public static Map - getDefaults() { - final Map props = new HashMap(); - - props.put(HOST_KEY, DEFAULT_HOST); - props.put(PORT_KEY, DEFAULT_PORT); - props.put(USER_KEY, DEFAULT_USER); - props.put(PASSWORD_KEY, DEFAULT_PASSWORD); - props.put(TRUSTSTORE_KEY, DEFAULT_TRUSTSTORE); - props.put(TRUSTSTORE_PASSWORD_KEY, DEFAULT_TRUSTSTORE_PASSWORD); - props.put(USE_TLS_KEY, DEFAULT_USE_TLS); - props.put(CONNECT_KEY, DEFAULT_CONNECT); - props.put(TEST_OFFLINE_KEY, DEFAULT_TEST_OFFLINE); - props.put(DOMAIN_XML_KEY, "./domain.xml"); - - props.put(NODE_AGENTS_KEY, ALL_NODE_AGENTS); - props.put(EXPANDED_TESTING_KEY, DEFAULT_EXPANDED_TESTING); - - props.put(RUN_THREADED_KEY, DEFAULT_RUN_THREADED); - props.put(VERBOSE_KEY, DEFAULT_VERBOSE); - props.put(TEST_CLASSES_FILE_KEY, DEFAULT_TEST_CLASSES_FILE_KEY); - props.put(ITERATIONS_KEY, DEFAULT_ITERATIONS); - - props.put(ARCHIVES_TO_DEPLOY_KEY, DEFAULT_ARCHIVES_TO_DEPLOY); - props.put(DEPLOY_NUM_THREADS, DEFAULT_DEPLOY_NUM_THREADS); - - props.put(UPLOAD_DOWNLOAD_MGR_TEST_THREADS, DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_THREADS); - props.put(UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB, DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB); - - props.put( DEFAULT_PROPERTIES_FILE, DEFAULT_PROPERTIES_FILE ); - return( props ); - } -}; - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/RegistrationListener.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/RegistrationListener.java deleted file mode 100644 index b4a40fdc6b0..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/RegistrationListener.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.jmx.MBeanRegistrationListener; - -import javax.management.InstanceNotFoundException; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.io.IOException; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; - -/** - A NotificationListener which tracks registration of MBeans. - */ -public final class RegistrationListener - extends MBeanRegistrationListener { - private final MBeanServerConnection mConn; - - private final Set mRegistered; - private final Set mUnregistered; - private final Set mCurrentlyRegistered; - - private RegistrationListener( - final String name, - final MBeanServerConnection conn) - throws InstanceNotFoundException, java.io.IOException { - super("RegistrationListener", conn, null); - - mConn = conn; - - mRegistered = new HashSet(); - mUnregistered = new HashSet(); - mCurrentlyRegistered = new HashSet(); - - queryAllAMX(); - } - - public static RegistrationListener - createInstance( - final String name, - final MBeanServerConnection conn) - throws InstanceNotFoundException, java.io.IOException { - final RegistrationListener listener = new RegistrationListener(name, conn); - - JMXUtil.listenToMBeanServerDelegate(conn, listener, null, null); - - return listener; - } - - - private void - queryAllAMX() { - try { - final ObjectName pat = Util.newObjectNamePattern(AMX.JMX_DOMAIN, "*"); - final Set all = JMXUtil.queryNames(mConn, pat, null); - - mCurrentlyRegistered.addAll(all); - } - catch (IOException e) { - } - } - - public void - notifsLost() { - queryAllAMX(); - } - - private boolean - isAMX(final ObjectName objectName) { - return objectName.getDomain().equals(AMX.JMX_DOMAIN); - } - - protected synchronized void - mbeanRegistered(final ObjectName objectName) { - if (isAMX(objectName)) { - mRegistered.add(objectName); - mCurrentlyRegistered.add(objectName); - } - } - - protected synchronized void - mbeanUnregistered(final ObjectName objectName) { - if (isAMX(objectName)) { - mUnregistered.add(objectName); - mCurrentlyRegistered.remove(objectName); - } - } - - public Set - getRegistered() { - return Collections.unmodifiableSet(mRegistered); - } - - public Set - getUnregistered() { - return Collections.unmodifiableSet(mUnregistered); - } - - public synchronized Set - getCurrentlyRegistered() { - final Set all = new HashSet(mCurrentlyRegistered); - - return all; - } - -} - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/RunMeFirstTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/RunMeFirstTest.java deleted file mode 100644 index 9dd2baa7462..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/RunMeFirstTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.JavaConfig; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.base.AMXDebugSupportMBean; -import org.glassfish.admin.amx.util.AMXDebugStuff; - -import java.util.Map; -import java.util.Set; - - -/** - This test run prior to testing any AMX MBeans. - */ -public final class RunMeFirstTest - extends AMXTestBase { - public RunMeFirstTest() { - initCoverageInfos(); - } - - private void - initCoverageInfos() { - final Set all = getAllAMX(); - - // set the AMX-DEBUG flags on - final String AMX_DEBUG = "-DAMX-DEBUG.enabled=true"; - final String AMX_DEBUG2 = "-DAMX-DEBUG=true"; - - // set AMX-DEBUG.enabled=true in all ConfigConfig JVM options - final Map configs = getDomainConfig().getConfigsConfig().getConfigConfigMap(); - for (final ConfigConfig config : configs.values()) { - final JavaConfig jc = config.getJavaConfig(); - final String[] opt = jc.getJVMOptions(); - final Set jvmOptions = GSetUtil.newStringSet(opt == null ? new String[0] : opt ); - - if (!(jvmOptions.contains(AMX_DEBUG) || jvmOptions.contains(AMX_DEBUG2))) { - jvmOptions.add(AMX_DEBUG); - jc.setJVMOptions(GSetUtil.toStringArray(jvmOptions)); - - // don't warn for default-config; it's not used by a running server - if (!config.getName().equals("default-config")) { - warning("Enabled AMX-DEBUG for config " + config.getName() + - " (restart required)"); - } - } - } - - // setup default stuff - final AMXDebugSupportMBean debug = getAMXDebugSupportMBean(); - debug.setAll(true); - debug.setDefaultDebug(true); - debug.getOutputIDs(); - - for (final AMX amx : all) { - final AMXDebugStuff debugStuff = getTestUtil().asAMXDebugStuff(amx); - - if (debugStuff == null) { - continue; - } - - try { - debugStuff.enableAMXDebug(true); - } - catch (Throwable t) { - warning("Couldn't enableAMXDebug() for " + amx.getJ2EEType()); - } - - try { - debugStuff.enableCoverageInfo(true); - debugStuff.clearCoverageInfo(); - } - catch (Throwable t) { - warning("Couldn't enableCoverageInfo for " + amx.getJ2EEType()); - } - } - } -} - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/RunMeLastTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/RunMeLastTest.java deleted file mode 100644 index 9aa5241c062..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/RunMeLastTest.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.util.misc.StringUtil; -import org.glassfish.admin.amxtest.config.DanglingRefsTest; - -import java.io.File; -import java.io.PrintStream; - - -/** - This test should normally be run before the generic tests - so that it can set up default items for many of the config elements - so that the generic tests will actually test them. Otherwise, - when the generic tests are run, they won't see any instances - of many of the AMXConfig MBeans. -

- If there are errors doing this, disable this test in amxtest.classes, - fix the error in the specific place it's occurring, then re-enabled - this test. - */ -public final class RunMeLastTest - extends AMXTestBase { - public RunMeLastTest() { - } - - private void - emitCoverage() - throws java.io.IOException { - final CoverageInfoAnalyzer analyzer = - new CoverageInfoAnalyzer(getDomainRoot()); - - final String summary = analyzer.getCoverageSummary(); - - final File dataFile = new File("amx-tests.coverage"); - final PrintStream out = new PrintStream(dataFile); - out.println(summary); - out.close(); - - if (getVerbose()) { - trace("NOTE: code coverage data save in file " + - StringUtil.quote("" + dataFile)); - } - } - - public void - testLast() - throws Exception { - emitDanglingRefs(); - - if (getTestUtil().asAMXDebugStuff(getDomainRoot()) != null) { - emitCoverage(); - } - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - - public void - emitDanglingRefs() - throws ClassNotFoundException { - new DanglingRefsTest().testAllDangling(); - } -} - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestClientTrustStoreTrustManager.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestClientTrustStoreTrustManager.java deleted file mode 100644 index b00f48e0820..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestClientTrustStoreTrustManager.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.client.TrustStoreTrustManager; - -import java.io.File; -import java.io.IOException; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; - - -public final class TestClientTrustStoreTrustManager - extends TrustStoreTrustManager { - public TestClientTrustStoreTrustManager() { - this(new File("./TestClient-TrustStore"), "changeme".toCharArray()); - } - - public TestClientTrustStoreTrustManager( - final File trustStore, - final char[] password) { - super(trustStore, password); - } - - protected boolean - shouldAddToTrustStore(final Certificate c) { - // we are testing; don't bother the user - return (true); - } - - protected void - addCertificateToTrustStore( - final String alias, - final Certificate c) - throws IOException, - KeyStoreException, NoSuchAlgorithmException, CertificateException { - super.addCertificateToTrustStore(alias, c); - System.out.println("added certificate to truststore: " + c); - } -} diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestMain.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestMain.java deleted file mode 100644 index eb502011a00..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestMain.java +++ /dev/null @@ -1,875 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.AMXDebug; -import com.sun.appserv.management.base.SystemInfo; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.client.AppserverConnectionSource; -import com.sun.appserv.management.client.ConnectionSource; -import com.sun.appserv.management.client.HandshakeCompletedListenerImpl; -import com.sun.appserv.management.client.TLSParams; -import com.sun.appserv.management.config.JMXConnectorConfig; -import com.sun.appserv.management.config.NodeAgentConfig; -import com.sun.appserv.management.config.NodeAgentsConfig; -import com.sun.appserv.management.config.OfflineConfigIniter; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.jmx.MBeanServerConnectionSource; -import com.sun.appserv.management.util.jmx.stringifier.StringifierRegistryIniter; -import com.sun.appserv.management.util.misc.ClassUtil; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import com.sun.appserv.management.util.misc.FileUtils; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.MapUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import com.sun.appserv.management.util.misc.TypeCast; -import com.sun.appserv.management.util.stringifier.ArrayStringifier; -import com.sun.appserv.management.util.stringifier.SmartStringifier; -import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl; -import com.sun.appserv.management.helper.AttributeResolverHelper; - - -import static org.glassfish.admin.amxtest.PropertyKeys.*; -import org.glassfish.admin.amxtest.monitor.AMXMonitorTestBase; - -import javax.management.MBeanServer; -import javax.management.MBeanServerConnection; -import javax.management.MBeanServerFactory; -import javax.management.Notification; -import javax.management.NotificationListener; -import javax.management.ObjectName; -import javax.management.remote.JMXConnectionNotification; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; - -import junit.framework.TestCase; - -/** - Main class that runs all the unit tests - */ -public final class TestMain - implements NotificationListener { - private final DomainRoot mDomainRoot; - private HandshakeCompletedListenerImpl mHandshakeCompletedListener; - - - private static void - printUsage() { - println("USAGE: java " + TestMain.class.getName() + " [name=value [name=value]*]"); - - final String example = MapUtil.toString(PropertyKeys.getDefaults(), "\n") + - "\n\nAdditional properties may be included and will be placed into a Map " + - "for use by any unit test."; - println("Properties file format:\n" + example); - println(""); - println("The optional property " + StringUtil.quote(TEST_CLASSES_FILE_KEY) + - " may contain the name of a file which specifies which test classes to run. " + - "Files should be listed with fully-qualified classnames, one per line. " + - "The # character may be used to comment-out classnames." - ); - println(""); - println("Additional properties may also be passed directly on the command line."); - println("These override any properties found in the specified properties file."); - println("[all properties intended for permanent use should be defined in PropertyKeys.java]"); - println("EXAMPLE:"); - println("java TestMain amxtest.properties amxtest.verbose=true my-temp=true"); - } - - - private static boolean - isHelp(final String s) { - return (s.equals("help") || s.equals("--help") || s.equals("-?")); - } - - protected static void - checkAssertsOn() { - try { - assert (false); - throw new Error("TestMain(): Assertions must be enabled for unit tests!"); - } - catch (AssertionError a) { - } - } - - - private static Map - argsToMap(final String[] args) { - final Map params = new HashMap(); - - params.put(DEFAULT_PROPERTIES_FILE, args[0]); - - for (int i = 1; i < args.length; ++i) { - final String pair = args[i]; - final int delimIndex = pair.indexOf('='); - String name = null; - String value = null; - if (delimIndex < 0) { - name = pair; - value = null; - } else { - name = pair.substring(0, delimIndex); - value = pair.substring(name.length() + 1, pair.length()); - - } - params.put(name, value); - } - - return params; - } - - private static DomainRoot - initOffline(final File domainXML) { - final MBeanServer server = MBeanServerFactory.createMBeanServer("test"); - assert (domainXML.exists() && domainXML.length() != 0); - - final OfflineConfigIniter initer = new OfflineConfigIniter(server, domainXML); - final DomainRoot domainRoot = initer.getDomainRoot(); - - return domainRoot; - } - - public static void - main(final String[] args) - throws Exception { - checkAssertsOn(); - // for friendlier output via Stringifiers - new StringifierRegistryIniter(StringifierRegistryImpl.DEFAULT); - - - if (args.length == 0 || - (args.length == 1 && isHelp(args[0]))) { - printUsage(); - System.exit(255); - } - - final Map cmdLineParams = argsToMap(args); - - try { - new TestMain(args.length == 0 ? null : args[0], cmdLineParams); - } - catch (Throwable t) { - final Throwable rootCause = ExceptionUtil.getRootCause(t); - - if (rootCause instanceof java.net.ConnectException) { - System.err.println("\nERROR: The connection to the server could not be made"); - } else { - System.err.println("\nERROR: exception of type: " + rootCause.getClass().getName()); - rootCause.printStackTrace(); - } - System.exit(-1); - } - } - - private static void println(Object o) { - System.out.println(o); - } - - public static String - toString(Object o) { - return (SmartStringifier.toString(o)); - } - - - private final DomainRoot - getDomainRoot() { - return (mDomainRoot); - } - - - private TLSParams - createTLSParams( - final File trustStoreFile, - final String password) { - final char[] trustStorePassword = password.toCharArray(); - - mHandshakeCompletedListener = new HandshakeCompletedListenerImpl(); - final TestClientTrustStoreTrustManager trustMgr = - new TestClientTrustStoreTrustManager(trustStoreFile, trustStorePassword); - - final TLSParams tlsParams = new TLSParams(trustMgr, mHandshakeCompletedListener); - - return (tlsParams); - } - - /** - Read connect properties from a file. - */ - private final Map - getProperties(final String file) - throws IOException { - Map props = PropertyKeys.getDefaults(); - - props.remove(TEST_CLASSES_FILE_KEY); - - if (file != null) { - println("Reading properties from: " + StringUtil.quote(file)); - - final String propsString = FileUtils.fileToString(new File(file)); - final Properties fromFile = new Properties(); - fromFile.load(new ByteArrayInputStream(propsString.getBytes())); - - props = MapUtil.toStringStringMap(fromFile); - } else { - println("Using default properties."); - } - - return (props); - } - - /** - @param host hostname or IP address of Domain Admin Server - @param port RMI administrative port - @param user admin user - @param password admin user password - @param tlsParams TLS parameters, may be null - @return AppserverConnectionSource - */ - public static AppserverConnectionSource - connect( - final String host, - final int port, - final String user, - final String password, - final TLSParams tlsParams) - throws IOException { - final String info = "host=" + host + ", port=" + port + - ", user=" + user + ", password=" + password + - ", tls=" + (tlsParams != null); - - println("Connecting: " + info + "..."); - - final AppserverConnectionSource conn = - new AppserverConnectionSource(AppserverConnectionSource.PROTOCOL_JMXMP, - host, port, user, password, tlsParams, null); - - conn.getJMXConnector(false); - //println( "Connected: " + info ); - - return (conn); - } - - private final class PropertyGetter { - final Map mItems; - - public PropertyGetter(final Map props) { - mItems = new HashMap(); - mItems.putAll(props); - } - - public Object - get(final String key) { - Object result = System.getProperty(key); - if (result == null) { - result = mItems.get(key); - } - - return (result); - } - - public String getString(final String key) { return ((String) get(key)); } - - public File getFile(final String key) { - final String value = getString(key); - - return (value == null ? null : new File(value)); - } - - public int getint(final String key) { return (Integer.parseInt(getString(key))); } - - public Integer getInteger(final String key) { return (new Integer(getString(key))); } - - public boolean getboolean(final String key) { return (Boolean.valueOf(getString(key)).booleanValue()); } - - public Boolean getBoolean(final String key) { return (Boolean.valueOf(getString(key))); } - } - - ; - - - private AppserverConnectionSource - _getConnectionSource( - final PropertyGetter getter, - final String host, - final int port) - throws IOException { - final String user = getter.getString(USER_KEY); - final String password = getter.getString(PASSWORD_KEY); - final File trustStore = getter.getFile(TRUSTSTORE_KEY); - final String trustStorePassword = getter.getString(TRUSTSTORE_PASSWORD_KEY); - final boolean useTLS = getter.getboolean(USE_TLS_KEY); - - final TLSParams tlsParams = useTLS ? - createTLSParams(trustStore, trustStorePassword) : null; - - AppserverConnectionSource conn = null; - - try { - conn = connect(host, port, user, password, tlsParams); - if (mHandshakeCompletedListener != null) { - assert (mHandshakeCompletedListener.getLastEvent() != null); - println("HandshakeCompletedEvent: " + - toString(mHandshakeCompletedListener.getLastEvent())); - } - } - catch (IOException e) { - if (useTLS) { - // try without TLS - println("Attempting connection without TLS..."); - conn = connect(host, port, user, password, null); - } - } - - if (conn != null) { - conn.getJMXConnector(false).addConnectionNotificationListener(this, null, conn); - } - - return (conn); - } - - private AppserverConnectionSource - _getConnectionSource(final PropertyGetter getter) - throws IOException { - final String host = getter.getString(HOST_KEY); - final int port = getter.getint(PORT_KEY); - - return _getConnectionSource(getter, host, port); - } - - - private AppserverConnectionSource - getConnectionSource( - final PropertyGetter getter, - boolean retry) - throws Exception { - AppserverConnectionSource conn = null; - - final long PAUSE_MILLIS = 3 * 1000; - - for (int i = 0; i < 5; ++i) { - try { - conn = _getConnectionSource(getter); - break; - } - catch (Exception e) { - final Throwable rootCause = ExceptionUtil.getRootCause(e); - - if (rootCause instanceof java.net.ConnectException) { - println("ConnectException: " + rootCause.getMessage() + - "...retry..."); - Thread.sleep(PAUSE_MILLIS); - continue; - } - throw e; - } - } - - return (conn); - } - - - public void - handleNotification( - final Notification notifIn, - final Object handback) { - if (notifIn instanceof JMXConnectionNotification) { - final String type = notifIn.getType(); - if (type.equals(JMXConnectionNotification.FAILED)) { - System.err.println("\n\n### JMXConnection FAILED: " + handback + "\n\n"); - } else if (type.equals(JMXConnectionNotification.CLOSED)) { - System.err.println("\n\n### JMXConnection CLOSED: " + handback + "\n\n"); - } else if (type.equals(JMXConnectionNotification.OPENED)) { - System.err.println("\n\n### JMXConnection OPENED: " + handback + "\n\n"); - } else if (type.equals(JMXConnectionNotification.NOTIFS_LOST)) { - System.err.println("\n\n### JMXConnection NOTIFS_LOST: " + handback + "\n\n" + notifIn); - Observer.getInstance().notifsLost(); - } - } - } - - private void - printItems( - final String[] items, - final String prefix) { - for (int i = 0; i < items.length; ++i) { - println(prefix + items[i]); - } - } - - private String[] - classesToStrings(final Set> classes) { - final String[] names = new String[classes.size()]; - - int i = 0; - for (final Class c : classes) { - names[i] = c.getName(); - ++i; - } - return names; - } - - private void - warnUntestedClasses(final List> actual) { - final Set> actualSet = GSetUtil.newSet(actual); - final Set> allSet = GSetUtil.newSet(Tests.getTestClasses()); - - final Set> untested = GSetUtil.newSet(allSet); - untested.removeAll(actualSet); - if (untested.size() != 0) { - println("\nWARNING: the following tests WILL NOT BE RUN:"); - final String[] names = classesToStrings(untested); - for (int i = 0; i < names.length; ++i) { - names[i] = "!" + names[i] + "!"; // indicate not being run - } - - println(ArrayStringifier.stringify(names, "\n")); - println(""); - } - - final Set> extras = GSetUtil.newSet(actualSet); - extras.removeAll(actualSet); - if (extras.size() != 0) { - println("\nNOTE: the following non-default tests WILL BE RUN:"); - final String[] names = classesToStrings(extras); - - println(ArrayStringifier.stringify(names, "\n")); - println(""); - } - } - - private void - warnDisabledTests() { - final String WARNING = - "----------------------------------------\n" + - "- -\n" + - "- NOTE: -\n" + - "- Generic tests currently disabled for -\n" + - "- AMX MBeans which reside in non-DAS -\n" + - "- server instances eg Logging, CallFlow.-\n" + - "- Denoted by 'remoteIncomplete' -\n" + - "- -\n" + - "- -\n" + - "----------------------------------------"; - - println(WARNING); - } - - private List> - getTestClasses(final File testsFile) - throws FileNotFoundException, IOException { - List> testClasses = null; - - if (testsFile == null) { - testClasses = Tests.getTestClasses(); - println("NO TEST FILE SPECIFIED--TESTING ALL CLASSES in " + Tests.class.getName()); - } else { - println("Reading test classes from: " + StringUtil.quote(testsFile.toString())); - - String fileString = null; - - try - { - fileString = FileUtils.fileToString(testsFile); - } - catch( final IOException e ) - { - println( "Unable to open file " + testsFile.getAbsolutePath() ); - throw e; - } - - final String temp = fileString.replaceAll("\r\n", "\n").replaceAll("\r", "\n"); - final String[] classnames = temp.split("\n"); - - testClasses = new ArrayList>(); - - for (int i = 0; i < classnames.length; ++i) { - final String classname = classnames[i].trim(); - - if (classname.length() != 0 && !classname.startsWith("#")) { - try { - // println( "Looking for class " + StringUtil.quote(classname) ); - final Class theClass = TypeCast.asClass(ClassUtil.getClassFromName(classname)); - - testClasses.add(theClass); - } - catch (Throwable t) { - final String msg = "Can't load test class " + StringUtil.quote(classname); - println( msg ); - throw new Error(msg, t); - } - } - } - - warnUntestedClasses(testClasses); - warnDisabledTests(); - } - - return (testClasses); - } - - - private void - warnUnknownProperties(final Map props) { - final Map known = new HashMap(getDefaults()); - final Map unknown = new HashMap(props); - - unknown.keySet().removeAll(known.keySet()); - if (unknown.keySet().size() != 0) { - println("\nNOTE: the following properties are not recognized but " + - "will be included in the environment for use by unit tests:"); - println(MapUtil.toString(unknown, "\n")); - println(""); - } - } - - private static final String RMI_PROTOCOL_IN_CONFIG = "rmi_jrmp"; - - public Map - getNodeAgentConnections( - final DomainRoot domainRoot, - final PropertyGetter getter) { - final NodeAgentsConfig nacs = domainRoot.getDomainConfig().getNodeAgentsConfig(); - if ( nacs == null ) return null; - final Map nodeAgentConfigs = nacs.getNodeAgentConfigMap(); - - final Map nodeAgentConnections = - new HashMap(); - - println(""); - println("Contacting node agents..."); - - for (final NodeAgentConfig nodeAgentConfig : nodeAgentConfigs.values()) { - final String nodeAgentName = nodeAgentConfig.getName(); - - final JMXConnectorConfig connConfig = nodeAgentConfig.getJMXConnectorConfig(); - - final AttributeResolverHelper r = new AttributeResolverHelper(connConfig); - - if (! r.resolveBoolean("Enabled") ) { - println(nodeAgentName + ": DISABLED CONNECTOR"); - continue; - } - - final String address = connConfig.getAddress(); - final int port = r.resolveInt("Port"); - final boolean tlsEnabled = r.resolveBoolean( "SecurityEnabled" ); - final String protocol = connConfig.getProtocol(); - - if (!RMI_PROTOCOL_IN_CONFIG.equals(protocol)) { - println(nodeAgentName + ": UNSUPPORTED CONNECTOR PROTOCOL: " + protocol); - continue; - } - - // See if we can connect - try { - final AppserverConnectionSource asConn = - _getConnectionSource(getter, address, port); - final MBeanServerConnection conn = asConn.getMBeanServerConnection(false); - final boolean alive = - conn.isRegistered(JMXUtil.getMBeanServerDelegateObjectName()); - assert (alive); - - nodeAgentConnections.put(nodeAgentName, asConn); - println(nodeAgentName + ": ALIVE"); - } - catch (Exception e) { - println("Node agent " + nodeAgentConfig.getName() + - " could not be contacted: " + e.getClass().getName()); - println(nodeAgentName + ": COULD NOT BE CONTACTED"); - continue; - } - } - - println(""); - - return nodeAgentConnections; - } - - private Capabilities - getCapabilities(final Class c) { - Capabilities capabilities = AMXTestBase.getDefaultCapabilities(); - - try { - final Method getCapabilities = c.getDeclaredMethod("getCapabilities", (Class[]) null); - - capabilities = (Capabilities) getCapabilities.invoke(null, (Object[]) null); - } - catch (Exception e) { - } - - return capabilities; - } - - private List> - filterTestClasses( - final DomainRoot domainRoot, - final PropertyGetter getter, - final List> classes) { - final boolean offline = getter.getboolean(TEST_OFFLINE_KEY); - - final SystemInfo systemInfo = domainRoot == null ? null : domainRoot.getSystemInfo(); - - final boolean clustersSupported = systemInfo == null ? - false : systemInfo.supportsFeature(SystemInfo.CLUSTERS_FEATURE); - - final boolean multipleServersSupported = systemInfo == null ? - false : systemInfo.supportsFeature(SystemInfo.MULTIPLE_SERVERS_FEATURE); - - final boolean monitorsSupported = !offline; - - final List> included = new ArrayList>(); - final List> omitted = new ArrayList>(); - for (final Class c : classes) { - boolean include = true; - - Capabilities capabilities = null; - - try { - capabilities = getCapabilities(c); - } - catch( Throwable t ) - { - println( "WARNING: cannot getCapabilities() from " + c.getClass().getName() + ": " + t ); - continue; - } - - if ((!monitorsSupported) && - AMXMonitorTestBase.class.isAssignableFrom(c)) { - include = false; - } else if (offline && !capabilities.getOfflineCapable()) { - include = false; - } else if (ClusterSupportRequired.class.isAssignableFrom(c) && - !clustersSupported) { - include = false; - } else if (MultipleServerSupportRequired.class.isAssignableFrom(c) && - !multipleServersSupported) { - include = false; - } - - if (include) { - included.add(c); - } else { - omitted.add(c); - } - } - - return included; - } - - private File mDefaultDir; - - static File getDefaultDir( final String propsFile ) - { - File dir = null; - - if ( propsFile != null ) - { - final File pf = new File(propsFile).getAbsoluteFile(); - dir = pf.getParentFile().getAbsoluteFile(); - } - else - { - dir = new File(System.getProperty("user.dir")); - } - - return dir; - } - - /** - */ - public TestMain( - final String optionalPropertiesFile, - final Map cmdLineParams) - throws Exception { - AMXDebug.getInstance().setAll(true); - - checkAssertsOn(); - - mDefaultDir = getDefaultDir(optionalPropertiesFile); - - final Map props = getProperties(optionalPropertiesFile); - - final Map envIn = new HashMap(props); - envIn.putAll(cmdLineParams); - warnUnknownProperties(envIn); - - final Map env = new HashMap(); - env.putAll(envIn); - - println(""); - println("ENVIRONMENT:\n" + MapUtil.toString(env, "\n")); - println(""); - - final PropertyGetter getter = new PropertyGetter(env); - - ConnectionSource conn = null; - - final boolean testOffline = getter.getboolean(TEST_OFFLINE_KEY); - if (testOffline) { - final String domainXML = getter.getString(DOMAIN_XML_KEY); - mDomainRoot = initOffline(new File(domainXML)); - - final MBeanServer server = (MBeanServer) - Util.getExtra(mDomainRoot).getConnectionSource().getExistingMBeanServerConnection(); - - final Set mbeans = - JMXUtil.queryNames(server, Util.newObjectName("*:*"), null); - //println( "\n\n------------------------------------------" ); - //println( "MBeans registered:" ); - //println( CollectionUtil.toString( mbeans, "\n" ) ); - //println( "\n\n" ); - - conn = new MBeanServerConnectionSource(server); - } else { - if (getter.getboolean(CONNECT_KEY)) { - final AppserverConnectionSource acs = getConnectionSource(getter, true); - - if (acs == null) { - throw new IOException("Can't connect to server"); - } - - mDomainRoot = acs.getDomainRoot(); - - conn = acs; - } else { - mDomainRoot = null; - conn = null; - } - } - - if (mDomainRoot != null) { - Observer.create(mDomainRoot); - } - - final boolean expandedTesting = testOffline ? - false : getter.getboolean(EXPANDED_TESTING_KEY); - - if (mDomainRoot != null && expandedTesting) { - final Map connections = - getNodeAgentConnections(mDomainRoot, getter); - - env.put(NODE_AGENTS_KEY, connections); - } - - - final boolean threaded = getter.getboolean(RUN_THREADED_KEY); - - if (getter.getboolean(VERBOSE_KEY)) { - println("VERBOSE mode enabled"); - if (threaded) { - println("NOTE: timings displayed when running " + - "threaded tests will be impacted by other concurrent tests."); - } - } - - final File temp = new File(TEST_CLASSES_FILE_KEY); - final File classesFile = temp.isAbsolute() ? - temp : new File( mDefaultDir, getter.getString(TEST_CLASSES_FILE_KEY)); - - println( "Default directory: " + mDefaultDir ); - println( "Classes file: " + classesFile ); - final List> specifiedClasses = getTestClasses(classesFile); - - final List> testClasses = - filterTestClasses(mDomainRoot, getter, specifiedClasses); - - final int iterations = getter.getInteger(ITERATIONS_KEY).intValue(); - iterateTests( - testClasses, - iterations, - conn, - threaded, - Collections.unmodifiableMap(env)); - - - println(""); - println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"); - println(">>>> Please inspect amxtest.coverage <<<<"); - println(" ^ "); - println(" ^ "); - println(" ^ "); - println(" ^ "); - } - - private void - iterateTests( - final List> testClasses, - final int iterations, - final ConnectionSource conn, - final boolean threaded, - final Map env) - throws Exception { - for (int i = 0; i < iterations; ++i) { - if (iterations != 1) { - println("#########################################################"); - println("\n### ITERATION " + (i + 1)); - println("#########################################################"); - } - - final long start = System.currentTimeMillis(); - - final TestRunner runner = new TestRunner(conn); - runner.runAll(testClasses, threaded, env); - - final long elapsed = System.currentTimeMillis() - start; - println("Time to run tests: " + (elapsed / 1000) + " seconds" ); - } - } -} - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestRunner.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestRunner.java deleted file mode 100644 index 46d15425d1d..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestRunner.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -*/ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.client.AppserverConnectionSource; -import com.sun.appserv.management.client.ConnectionSource; -import com.sun.appserv.management.client.HandshakeCompletedListenerImpl; -import com.sun.appserv.management.client.ProxyFactory; -import com.sun.appserv.management.client.TLSParams; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.jmx.ObjectNameComparator; -import com.sun.appserv.management.util.stringifier.SmartStringifier; -import junit.extensions.ActiveTestSuite; -import junit.framework.TestSuite; -import org.glassfish.admin.amxtest.JMXTestBase; - -import javax.management.JMException; -import javax.management.MBeanInfo; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.net.ssl.X509TrustManager; -import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; - - -/** - Class that supports running all the unit tests for AMX - */ -public final class TestRunner { - final ConnectionSource mConn; - boolean mVerbose; - - public TestRunner(final ConnectionSource conn) { - mConn = conn; - mVerbose = false; - } - - - public int - runSuite( - String name, - TestSuite suite) { - System.out.println("*** testing " + name + " ***"); - - junit.textui.TestRunner runner = new junit.textui.TestRunner(); - junit.framework.TestResult result = runner.doRun(suite, false); - - return (result.failureCount()); - } - - public int - testClass(final Class theClass) { - final TestSuite suite = new TestSuite(theClass); - return (runSuite(theClass.getName(), suite)); - } - - - public int - testClassThreaded(final Class theClass) { - final TestSuite suite = new ActiveTestSuite(theClass); - - return (runSuite(theClass.getName(), suite)); - } - - - public void - runTests( - List> testClasses, - boolean threaded) - throws Exception { - for (final Class theClass : testClasses) { - final int failureCount = threaded ? - testClassThreaded(theClass) : - testClass(theClass); - - if (failureCount != 0) { - println("Test " + theClass.getName() + " had failures: " + failureCount); - } - } - } - - public long - elapsed(final long start) { - return (System.currentTimeMillis() - start); - } - - private long - testGetMBeanInfoSpeed( - final MBeanServerConnection conn, - final ObjectName[] objectNames) - throws IOException, JMException { - // sorting provides consistent, ordered output - Arrays.sort(objectNames, ObjectNameComparator.INSTANCE); - - final long startAll = System.currentTimeMillis(); - for (int i = 0; i < objectNames.length; ++i) { - final ObjectName objectName = objectNames[i]; - - final long start = System.currentTimeMillis(); - - final MBeanInfo mbeanInfo = conn.getMBeanInfo(objectName); - - final long elapsed = elapsed(start); - - String id = objectName.toString(); - String value; - - if ((value = objectName.getKeyProperty("type")) != null) { - id = value; - } else if ((value = objectName.getKeyProperty("j2eeType")) != null) { - id = value; - } - - if ((value = objectName.getKeyProperty("name")) != null) { - id = Util.concatenateProps(id, Util.makeNameProp(value)); - } - - //printVerbose( "GetMBeanInfo time for " + id + " = " + elapsed ); - } - - final long elapsed = System.currentTimeMillis() - startAll; - return (elapsed); - } - - - protected void - printVerbose(final Object o) { - if (mVerbose) { - println(o); - } - } - - private void - println(final Object o) { - System.out.println(toString(o)); - } - - private void - print(final Object o) { - System.out.print(toString(o)); - } - - private void - testGetMBeanInfoSpeed( - final MBeanServerConnection conn, - final String domain, - final String props) - throws IOException, JMException { - final ObjectName pattern = Util.newObjectNamePattern(domain, props); - final Set objectNameSet = JMXUtil.queryNames(conn, pattern, null); - - final ObjectName[] objectNames = new ObjectName[objectNameSet.size()]; - objectNameSet.toArray(objectNames); - - final long elapsed = testGetMBeanInfoSpeed(conn, objectNames); - - println("Time to getMBeanInfo on " + domain + ":" + props + " (" + objectNames.length + " MBeans)" + - " = " + elapsed + "ms"); - } - - public MBeanServerConnection - getMBeanServerConnection() - throws IOException { - return (mConn == null ? null : mConn.getMBeanServerConnection(false)); - } - - public void - testSpeed() - throws IOException, JMException { - final DomainRoot domainRootProxy = ProxyFactory.getInstance(mConn). - createDomainRoot(); - - final MBeanServerConnection conn = getMBeanServerConnection(); - - testGetMBeanInfoSpeed(conn, Util.getObjectName(domainRootProxy).getDomain(), JMXUtil.WILD_ALL); - } - - - /** - Comment in call to this for hard-coded test. - */ - private void - testAppserverConnectionSource( - final String host, - final String user, - final String password) - throws IOException { - MBeanServerConnection conn = null; - - final TestClientTrustStoreTrustManager tm = new TestClientTrustStoreTrustManager(); - final HandshakeCompletedListenerImpl hcl = new HandshakeCompletedListenerImpl(); - tm.setPrompt(true); - final TLSParams tlsParams = - new TLSParams(new X509TrustManager[]{tm}, hcl); - - println("\ntestAppserverConnectionSource: testing: " + AppserverConnectionSource.PROTOCOL_RMI); - - final ConnectionSource rmiSource = - new AppserverConnectionSource(AppserverConnectionSource.PROTOCOL_RMI, - host, 8686, user, password, null); - conn = rmiSource.getMBeanServerConnection(true); - conn.isRegistered(JMXUtil.getMBeanServerDelegateObjectName()); - - println(AppserverConnectionSource.PROTOCOL_RMI + " OK using " + rmiSource); - - - println("\ntestAppserverConnectionSource: testing: " + AppserverConnectionSource.PROTOCOL_HTTP); - final Map env = Collections.emptyMap(); - - final ConnectionSource httpSource = - new AppserverConnectionSource(AppserverConnectionSource.PROTOCOL_HTTP, - host, 1234, user, password, tlsParams, env); - conn = httpSource.getMBeanServerConnection(true); - assert conn.isRegistered(JMXUtil.getMBeanServerDelegateObjectName()); - - println(AppserverConnectionSource.PROTOCOL_HTTP + " OK using " + httpSource); - - } - - - public static String - toString(Object o) { - return (SmartStringifier.toString(o)); - } - - /** - @param threaded if true, run the tests from each TestCase in separate threads - @param env arbitrary environment values for JMXTestBase - */ - protected void - runAll( - final List> testClasses, - final boolean threaded, - final Map env) - throws Exception { - mVerbose = Boolean.valueOf((String) env.get(PropertyKeys.VERBOSE_KEY)).booleanValue(); - - //testSpeed(); - - // use the current connection which must contain the AMX MBeans - final MBeanServerConnection conn = getMBeanServerConnection(); - - JMXTestBase.setGlobalConnection(conn); - JMXTestBase.setEnvValues(env); - - println("\n--- " + testClasses.size() + " TEST CLASSES ---"); - - for (final Class theClass : testClasses) { - println(theClass.getName()); - } - - println("\n--- BEGIN TESTS ---"); - runTests(testClasses, threaded); - } -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestTemplateTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestTemplateTest.java deleted file mode 100644 index 567cd19ef78..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestTemplateTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -// - -/** - A sample skeleton unit test. -

- Change the class name to Test (don't forget) - to change the constructor also. - */ -public final class TestTemplateTest - extends junit.framework.TestCase - // or extends JMXTestBase - // or extends AMXTestBase -{ - public TestTemplateTest() { - // generally nothing to do here - } - - /** - Change the method name to something appropriate - and add explanatory javadoc of what the test does - unless it's totally obvious. - */ - public void - testMethodA() { - // chan - } - - // repeat for as many tests as needed--fine grained is better -} - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestUtil.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestUtil.java deleted file mode 100644 index ce08ef9e5df..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/TestUtil.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.client.ProxyFactory; -import com.sun.appserv.management.util.jmx.ObjectNameComparator; -import com.sun.appserv.management.util.misc.ClassUtil; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import com.sun.appserv.management.util.misc.TypeCast; -import org.glassfish.admin.amx.util.AMXDebugStuff; - -import org.glassfish.admin.amxtest.support.AMXComparator; - -import javax.management.ObjectName; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -/** - Observes various things as tests are run. - */ -public final class TestUtil { - private final DomainRoot mDomainRoot; - private final String NEWLINE; - - public TestUtil(final DomainRoot domainRoot) { - mDomainRoot = domainRoot; - NEWLINE = System.getProperty("line.separator"); - } - - private void - trace(final Object o) { - System.out.println("" + o); - } - - public AMXDebugStuff - asAMXDebugStuff(final AMX amx) { - final String[] attrNames = Util.getExtra(amx).getAttributeNames(); - - AMXDebugStuff result = null; - if (GSetUtil.newUnmodifiableStringSet(attrNames).contains("AMXDebug")) { - final ProxyFactory factory = Util.getExtra(amx).getProxyFactory(); - - try { - final Class amxClass = - ClassUtil.getClassFromName(Util.getExtra(amx).getInterfaceName()); - final Class[] interfaces = new Class[]{amxClass, AMXDebugStuff.class}; - - final ObjectName objectName = Util.getObjectName(amx); - - return (AMXDebugStuff) - factory.newProxyInstance(objectName, interfaces); - } - catch (Exception e) { - trace(ExceptionUtil.toString(e)); - throw new RuntimeException(e); - } - } - - return result; - } - - - /** - @return Set of j2eeTypes found in Set - */ - public Set - getJ2EETypes(final Set amxs) { - final Set registered = new HashSet(); - - for (final AMX amx : amxs) { - registered.add(amx.getJ2EEType()); - } - - return registered; - } - - /** - @return Set of j2eeTypes for which no MBeans exist - */ - public Set - findRegisteredJ2EETypes() { - return getJ2EETypes(mDomainRoot.getQueryMgr().queryAllSet()); - } - - public String - setToSortedString( - final Set s, - final String delim) { - final String[] a = GSetUtil.toStringArray(s); - Arrays.sort(a); - - return StringUtil.toString(NEWLINE, (Object[]) a); - } - - - public static SortedSet - newSortedSet(final ObjectName[] objectNames) { - final SortedSet s = new TreeSet(ObjectNameComparator.INSTANCE); - - for (final ObjectName objectName : objectNames) { - s.add(objectName); - } - - return s; - } - - public static SortedSet - newSortedSet(final Collection c) { - final ObjectName[] objectNames = new ObjectName[c.size()]; - c.toArray(objectNames); - - return newSortedSet(objectNames); - } - - /** - As an optimization to speed up testing, we always get the Set of AMX - ObjectNames using Observer, which maintains such a list. - */ - public SortedSet - getAllObjectNames() { - final Set s = - Observer.getInstance().getCurrentlyRegisteredAMX(); - - return newSortedSet(s); - } - - - /** - @return all AMX, sorted by ObjectName - */ - public SortedSet - getAllAMX() { - final SortedSet all = getAllObjectNames(); - - final SortedSet allAMX = new TreeSet(new AMXComparator()); - final ProxyFactory proxyFactory = Util.getExtra(mDomainRoot).getProxyFactory(); - for (final ObjectName objectName : all) { - try { - final AMX amx = proxyFactory.getProxy(objectName, AMX.class); - - allAMX.add(amx); - } - catch (Exception e) { - trace(ExceptionUtil.toString(e)); - } - } - - return allAMX; - } - - public SortedSet - getAllAMX(final Class theInterface) { - final SortedSet all = getAllAMX(); - final TreeSet allOfInterface = new TreeSet(new AMXComparator()); - - for (final AMX amx : all) { - if (theInterface.isAssignableFrom(amx.getClass())) { - allOfInterface.add(amx); - } - } - - return TypeCast.asSortedSet(allOfInterface); - - } - - public ObjectName[] - getAllAMXArray() { - final SortedSet s = getAllObjectNames(); - final ObjectName[] objectNames = new ObjectName[s.size()]; - s.toArray(objectNames); - - return (objectNames); - } - - public Set - getAvailJ2EETypes() { - final SortedSet allObjectNames = getAllObjectNames(); - final Set j2eeTypes = new HashSet(); - - for (final ObjectName objectName : allObjectNames) { - final String value = Util.getJ2EEType(objectName); - - j2eeTypes.add(value); - } - return (j2eeTypes); - } - -} - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/Tests.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/Tests.java deleted file mode 100644 index eb7e99f2f4e..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/Tests.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest; - - -import com.sun.appserv.management.util.misc.TypeCast; -import org.glassfish.admin.amxtest.base.*; -import org.glassfish.admin.amxtest.client.MiscTest; -import org.glassfish.admin.amxtest.client.PerformanceTest; -import org.glassfish.admin.amxtest.client.ProxyFactoryTest; -import org.glassfish.admin.amxtest.client.ProxyTest; -import org.glassfish.admin.amxtest.config.*; -import org.glassfish.admin.amxtest.ext.logging.LoggingHelperTest; -import org.glassfish.admin.amxtest.ext.logging.LoggingTest; -import org.glassfish.admin.amxtest.ext.logging.StatefulLoggingHelperTest; -import org.glassfish.admin.amxtest.helper.RefHelperTest; -import org.glassfish.admin.amxtest.j2ee.J2EETest; -import org.glassfish.admin.amxtest.j2ee.ServletTest; -import org.glassfish.admin.amxtest.monitor.CallFlowMonitorTest; -import org.glassfish.admin.amxtest.monitor.JMXMonitorMgrTest; -import org.glassfish.admin.amxtest.monitor.MonitorTest; -import org.glassfish.admin.amxtest.support.CoverageInfoTest; - -import java.util.ArrayList; -import java.util.List; - - -/** - The place to put list any new test; the official list - of tests. The file amxtest.classes is also used, but since - it may be inadvertantly modified, this is the official list - of tests. - */ -public class Tests { - private Tests() {} - - private static final Class[] TestClasses = - TypeCast.asArray(new Class[] - { - TestTemplateTest.class, // ensure that the template one works OK, too! - - // these tests are standalone and do not require a - // server connection - CoverageInfoTest.class, - - // Tests that follow require a server connection - //AppserverConnectionSourceTest.class, - RunMeFirstTest.class, - - ProxyTest.class, - ProxyFactoryTest.class, - AMXTest.class, - GetSetAttributeTest.class, - ContainerTest.class, - GenericTest.class, - PropertiesAccessTest.class, - SystemPropertiesAccessTest.class, - - LoggingTest.class, - LoggingHelperTest.class, - StatefulLoggingHelperTest.class, - - DomainRootTest.class, - UploadDownloadMgrTest.class, - BulkAccessTest.class, - QueryMgrTest.class, - NotificationEmitterServiceTest.class, - NotificationServiceMgrTest.class, - NotificationServiceTest.class, - MiscTest.class, - - MonitorTest.class, - JMXMonitorMgrTest.class, - - J2EETest.class, - ServletTest.class, - - DanglingRefsTest.class, - ConfigRunMeFirstTest.class, - DescriptionTest.class, - EnabledTest.class, - LibrariesTest.class, - RefHelperTest.class, - ListenerTest.class, - DomainConfigTest.class, - ConfigConfigTest.class, - SecurityServiceConfigTest.class, - MessageSecurityConfigTest.class, - StandaloneServerConfigTest.class, - ClusteredServerConfigTest.class, - NodeAgentConfigTest.class, - CustomMBeanConfigTest.class, - ReferencesTest.class, - HTTPServiceConfigTest.class, - HTTPListenerConfigTest.class, - ClusterConfigTest.class, - SSLConfigTest.class, - JMXConnectorConfigTest.class, - IIOPListenerConfigTest.class, - HTTPListenerConfigTest.class, - AuditModuleConfigTest.class, - AuthRealmConfigTest.class, - JavaConfigTest.class, - ProfilerConfigTest.class, - VirtualServerConfigTest.class, - JACCProviderConfigTest.class, - AdminObjectResourceConfigTest.class, - JDBCResourceConfigTest.class, - MailResourceConfigTest.class, - ConnectorConnectionPoolConfigTest.class, - JDBCConnectionPoolConfigTest.class, - PersistenceManagerFactoryResourceConfigTest.class, - JNDIResourceConfigTest.class, - ThreadPoolConfigTest.class, - LBTest.class, - SecurityMapConfigTest.class, - ConnectorConnectionPoolConfigTest.class, - ResourceAdapterConfigTest.class, - CustomResourceConfigTest.class, - ConnectorServiceConfigTest.class, - DiagnosticServiceConfigTest.class, - - PerformanceTest.class, - CallFlowMonitorTest.class, - RunMeLastTest.class, - }); - - public static List> - getTestClasses() { - final List> classes = - new ArrayList>(); - - for (int i = 0; i < TestClasses.length; ++i) { - final Class testClass = TestClasses[i]; - - classes.add(testClass); - } - - return (classes); - } - -}; - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/AMXDebugTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/AMXDebugTest.java deleted file mode 100644 index 45871d73240..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/AMXDebugTest.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/base/AMXDebugTest.java,v 1.5 2007/05/05 05:23:53 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:23:53 $ -*/ -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.AMXDebug; -import com.sun.appserv.management.util.misc.Output; - -import java.io.File; - -/** - */ -public final class AMXDebugTest - extends junit.framework.TestCase { - public AMXDebugTest() { - getAMXDebug().setDefaultDebug(true); - getAMXDebug().setAll(true); - } - - private String - getID(final String uniquifier) { - return this.getClass().getName() + "." + uniquifier; - } - - private Output - getOutput(final String id) { - return getAMXDebug().getOutput(id); - } - - private AMXDebug - getAMXDebug() { - return AMXDebug.getInstance(); - } - - public synchronized void - testCreateFile() { - // multiple iterations require that we choose a new file each time - final String id = getID("testCreateFile" + System.currentTimeMillis()); - final Output output = getOutput(id); - - final File outputFile = getAMXDebug().getOutputFile(id); - outputFile.delete(); - assert (!outputFile.exists()); - - output.printDebug("test"); - assert (outputFile.exists()); - } - - public synchronized void - testToggleDebug() { - final String id = getID("testToggleDebug"); - final Output output = getOutput(id); - - getAMXDebug().setDebug(id, false); - assert (!getAMXDebug().getDebug(id)); - getAMXDebug().setDebug(id, true); - assert (getAMXDebug().getDebug(id)); - } - - public synchronized void - testReset() { - final String id = getID("testReset"); - final Output output = getOutput(id); - - getAMXDebug().reset(id); - final File outputFile = getAMXDebug().getOutputFile(id); - outputFile.delete(); - assert (!outputFile.exists()); - output.printDebug("test"); - assert (outputFile.exists()); - - // make sure we can call it repeatedly - getAMXDebug().reset(id); - getAMXDebug().reset(id); - getAMXDebug().reset(id); - } - - - public synchronized void - testPrint() { - final String id = getID("testPrint"); - final Output output = getOutput(id); - - output.printDebug("printDebug"); - output.printError("printError"); - output.println("println"); - output.print("print"); - output.print("..."); - output.print("END"); - } - - - public synchronized void - testClose() { - final String id = getID("testClose"); - final Output output = getOutput(id); - final File outputFile = getAMXDebug().getOutputFile(id); - - output.println("hello"); - assert (outputFile.exists()); - - output.close(); - outputFile.delete(); - assert (!outputFile.exists()); - - output.println("hello"); - assert (outputFile.exists()); - } - - public synchronized void - testToggleDefaultDebug() { - final String id = getID("testToggleDefaultDebug"); - final Output output = getOutput(id); - - getAMXDebug().setDefaultDebug(false); - assert (!getAMXDebug().getDefaultDebug()); - - getAMXDebug().setDefaultDebug(true); - assert (getAMXDebug().getDefaultDebug()); - } - - - public synchronized void - testSetAll() { - final String id = getID("testSetAll"); - final Output output = getOutput(id); - - getAMXDebug().setAll(false); - getAMXDebug().setAll(false); - getAMXDebug().setAll(true); - getAMXDebug().setAll(true); - getAMXDebug().setAll(false); - getAMXDebug().setAll(true); - getAMXDebug().setAll(true); - } - - - public synchronized void - testMark() { - final String id = getID("testMark"); - final Output output = getOutput(id); - - getAMXDebug().mark(id); - getAMXDebug().mark(id, null); - getAMXDebug().mark(id, "marker 1"); - getAMXDebug().mark(id, "marker 2"); - getAMXDebug().mark(output, null); - getAMXDebug().mark(output, "marker 3"); - } -} - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/AMXTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/AMXTest.java deleted file mode 100644 index 15b59190fe2..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/AMXTest.java +++ /dev/null @@ -1,991 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.AMXAttributes; -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.Extra; -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.NamedConfigElement; -import com.sun.appserv.management.config.SecurityMapConfig; -import com.sun.appserv.management.ext.logging.LogQueryResult; -import com.sun.appserv.management.ext.wsmgmt.MessageTrace; -import com.sun.appserv.management.ext.wsmgmt.WebServiceEndpointInfo; -import com.sun.appserv.management.monitor.AMXCounterMonitor; -import com.sun.appserv.management.monitor.AMXGaugeMonitor; -import com.sun.appserv.management.monitor.AMXStringMonitor; -import com.sun.appserv.management.monitor.ApplicationMonitor; -import com.sun.appserv.management.monitor.EJBModuleMonitor; -import com.sun.appserv.management.monitor.HTTPServiceMonitor; -import com.sun.appserv.management.monitor.JMXMonitorMgr; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.ClassUtil; -import com.sun.appserv.management.util.misc.CollectionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import org.glassfish.admin.amx.util.AMXDebugStuff; -import com.sun.appserv.management.ext.coverage.CoverageInfo; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.AttributeNotFoundException; -import javax.management.JMException; -import javax.management.MBeanAttributeInfo; -import javax.management.MBeanFeatureInfo; -import javax.management.MBeanInfo; -import javax.management.MBeanOperationInfo; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.io.IOException; -import java.io.Serializable; -import java.lang.reflect.Method; -import java.util.Date; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - - -/** - */ -public final class AMXTest - extends AMXTestBase { - public AMXTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - /** - Verify that the ObjectName returned from the ATTR_CONTAINER_OBJECT_NAME is the same - as the ObjectName obtained from the getContainer() proxy. - */ - public void - checkContainerObjectName(final ObjectName objectName) - throws Exception { - final ObjectName containerObjectName = (ObjectName) - getConnection().getAttribute(objectName, AMXAttributes.ATTR_CONTAINER_OBJECT_NAME); - - if (Util.getJ2EEType(objectName).equals(XTypes.DOMAIN_ROOT)) { - assert (containerObjectName == null); - } else { - assert (containerObjectName != null); - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - assert (Util.getObjectName(proxy.getContainer()).equals(containerObjectName)); - } - - } - - public void - testContainerObjectName() - throws Exception { - testAll("checkContainerObjectName"); - } - - - /** - Look for Attributes that probably should be String and not int/long - due to our template facility ${...} - */ - public void - checkTemplateAttributes(final ObjectName objectName) { - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - - if (proxy instanceof AMXConfig) { - final AMXConfig config = (AMXConfig) proxy; - - final Set s = new HashSet(); - - final MBeanInfo mbeanInfo = Util.getExtra(config).getMBeanInfo(); - final MBeanAttributeInfo[] attrInfos = mbeanInfo.getAttributes(); - for (int i = 0; i < attrInfos.length; ++i) { - final MBeanAttributeInfo info = attrInfos[i]; - - final String type = info.getType(); - if (type.equals("int") || type.equals("long")) { - s.add(info.getName()); - } - } - - if (s.size() != 0) { - trace("\n" + objectName + - " contains the following int/long Attributes which perhaps ought to be String" + - " due to the templatizing of config: " + toString(s) + "\n"); - } - } - } - - public void - testTemplateAttributes() - throws Exception { - testAll("checkTemplateAttributes"); - } - - - /** - Verify that the ObjectName returned from the MBean is in fact itself. - */ - public void - checkSelfObjectName(final ObjectName obj) - throws Exception { - final ObjectName selfName = (ObjectName) - getConnection().getAttribute(obj, AMXAttributes.ATTR_OBJECT_NAME); - - assert (selfName.equals(obj)); - } - - public void - testSelfObjectName() - throws Exception { - testAll("checkSelfObjectName"); - } - - - /** - Verify that the MBean has an ATTR_INTERFACE_NAME Attribute - */ - public void - checkInterface(final ObjectName src) - throws Exception { - final String interfaceName = (String) - getConnection().getAttribute(src, AMXAttributes.ATTR_INTERFACE_NAME); - - assert (interfaceName != null); - } - - - public void - testInterface() - throws Exception { - testAll("checkInterface"); - } - - /** - Verify that the MBean has j2eeType and name. - */ - public void - checkJ2EETypeAndName(final ObjectName src) - throws Exception { - assert (src.getKeyProperty(AMX.J2EE_TYPE_KEY) != null); - assert (src.getKeyProperty(AMX.NAME_KEY) != null); - } - - - public void - testJ2EETypeAndName() - throws Exception { - testAll("checkJ2EETypeAndName"); - } - - - /** - Verify that all j2eeTypes have a proper Container that does actually hold them. - */ - public void - testContainerChild() { -/* - final TypeInfos infos = TypeInfos.getInstance(); - final Set j2eeTypesSet = infos.getJ2EETypes(); - - for( final String j2eeType : j2eeTypesSet ) - { - checkContainerChild( j2eeType ); - } -*/ - } - - /** - Verify that each child's Container actually claims the child as a child. - */ - public void - checkContainerChild(final String childJ2EEType) { - final QueryMgr queryMgr = getQueryMgr(); - final Set children = queryMgr.queryJ2EETypeSet(childJ2EEType); - - final Iterator iter = children.iterator(); - while (iter.hasNext()) { - final AMX containee = Util.asAMX(iter.next()); - Container container = null; - - final ObjectName objectName = Util.getObjectName(containee); - if (!shouldTest(objectName)) { - continue; - } - - try { - container = (Container) containee.getContainer(); - } - catch (Exception e) { - trace("Can't get container for: " + objectName); - } - - if (container == null) { - assert (containee.getJ2EEType().equals(XTypes.DOMAIN_ROOT)) : - "container is null for: " + objectName; - continue; - } - - final Set containeeSet = container.getContaineeSet(childJ2EEType); - final Set containeeObjectNameSet = Util.toObjectNames(containeeSet); - - assert (containeeObjectNameSet.contains(Util.getExtra(containee).getObjectName())); - } - } - - - /** - Statically verify that the interface for each proxy has a J2EE_TYPE field. - */ - public void - testHaveJ2EE_TYPE() { -/* final TypeInfos infos = TypeInfos.getInstance(); - final Set j2eeTypes = infos.getJ2EETypes(); - - boolean success = true; - final Iterator iter = j2eeTypes.iterator(); - while ( iter.hasNext() ) - { - final String j2eeType = (String)iter.next(); - final TypeInfo info = infos.getInfo( j2eeType ); - - final Class theInterface = info.getInterface(); - try - { - final String value = - (String)ClassUtil.getFieldValue( theInterface, "J2EE_TYPE" ); - assert( value.equals( j2eeType ) ) : - "info and J2EE_TYPE don't match: " + j2eeType + " != " + value; - } - catch( Exception e ) - { - trace( "no J2EE_TYPE field found for proxy of type: " + theInterface.getName() ); - success = false; - } - } - assert( success );*/ - } - - - /** - Verify that getName() is the same as the 'name' property in the ObjectName. - */ - public void - checkNameMatchesJ2EEName(final ObjectName childObjectName) - throws Exception { - final AMX childProxy = getProxyFactory().getProxy(childObjectName, AMX.class); - if (childProxy instanceof NamedConfigElement) { - final String j2eeName = childProxy.getName(); - - assertEquals(j2eeName, childProxy.getName()); - } - } - - public void - testNameMatchesJ2EEName() - throws Exception { - testAll("checkNameMatchesJ2EEName"); - } - - - private static final String MAP_SUFFIX = "Map"; - private static final String OBJECTNAME_MAP_SUFFIX = "ObjectName" + MAP_SUFFIX; - - private static boolean - isMapGetterName(final String methodName) { - return ( - methodName.startsWith(JMXUtil.GET) && - methodName.endsWith(MAP_SUFFIX)); - } - - private static boolean - isMapGetter(final Method method) { - return ( - Map.class.isAssignableFrom(method.getReturnType()) && - isMapGetterName(method.getName())); - } - - /** - Verify that a proxy getAbcMap(...) Attribute or operation has an appropriate - MBean getAbcObjectNameMap() method. - */ - public void - checkMaps(final ObjectName objectName) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - if (proxy instanceof Container) { - final Method[] methods = getInterfaceClass(proxy).getMethods(); - final MBeanInfo mbeanInfo = Util.getExtra(proxy).getMBeanInfo(); - - for (int methodIdx = 0; methodIdx < methods.length; ++methodIdx) { - final Method method = methods[methodIdx]; - final String methodName = method.getName(); - - if (isMapGetter(method)) { - if (methodName.endsWith(OBJECTNAME_MAP_SUFFIX)) { - warning("method should exist in MBeanInfo, not interface: " + methodName); - continue; - } - - // verify that a corresponding peer method exists and - // has the right return type and same number and type of parameters - final String peerMethodName = - StringUtil.replaceSuffix(methodName, MAP_SUFFIX, OBJECTNAME_MAP_SUFFIX); - - checkCompatibleOperationExists(Util.getObjectName(proxy), - method, - peerMethodName, - mbeanInfo); - } else if (isMapGetterName(methodName)) { - warning("operation " + methodName + " does not return a Map!"); - } - } - } - } - - /** - Verify that the proxy method has a compatible Attribute or operation. -

    -
  • a proxy getter must have a corresponding Attribute returning an ObjectName
  • -
  • a proxy operation must have a corresponding operation with matching signature
  • -
  • a proxy operation must have a corresponding operation with compatible return type
  • - m = JMXUtil.attributeInfosToMap(mbeanInfo.getAttributes()); - - final String attrName = StringUtil.stripPrefix(mbeanMethodName, JMXUtil.GET); - final MBeanAttributeInfo attrInfo = (MBeanAttributeInfo) m.get(attrName); - if (attrInfo != null) { - mbeanReturnType = attrInfo.getType(); - } - } else { - // look for an operation that matches - final MBeanOperationInfo[] operations = mbeanInfo.getOperations(); - - final String[] stringSig = ClassUtil.classnamesFromSignature(parameterTypes); - final MBeanOperationInfo opInfo = JMXUtil.findOperation(operations, mbeanMethodName, stringSig); - if (opInfo != null) { - mbeanReturnType = opInfo.getReturnType(); - } - } - - boolean hasPeer = mbeanReturnType != null; - if (hasPeer) { - // a proxy return type of AMX should have an Attribute type of ObjectName - if (AMX.class.isAssignableFrom(proxyReturnType)) { - assert (mbeanReturnType.equals(ObjectName.class.getName())); - } else // return types must match - { - assert (mbeanReturnType.equals(proxyReturnType.getName())); - } - hasPeer = true; - } - - - if (!hasPeer) { - trace("MBean " + objectName + " has operation " + proxyMethodName + - " without corresponding peer Attribute/operation " + mbeanMethodName); - } - } - - public void - testMaps() - throws Exception { - testAll("checkMaps"); - } - - private static final Set SUITABLE_TYPES = GSetUtil.newUnmodifiableStringSet( - Void.class.getName(), - Object.class.getName(), - - // these are quick checks--other classes may be OK too - "boolean", "byte", "char", "short", "int", "long", "void", - - boolean[].class.getName(), - char[].class.getName(), - byte[].class.getName(), - short[].class.getName(), - int[].class.getName(), - long[].class.getName(), - Object[].class.getName(), - - Boolean.class.getName(), - Character.class.getName(), - Byte.class.getName(), - Short.class.getName(), - Integer.class.getName(), - Long.class.getName(), - - String.class.getName(), - String[].class.getName(), - - Date.class.getName(), - - ObjectName.class.getName(), - ObjectName[].class.getName(), - - Set.class.getName(), - List.class.getName(), - Map.class.getName(), - - java.util.logging.Level.class.getName(), - java.io.File.class.getName(), - - // these are passed as Maps, but declared as their proper types - // in the interface - WebServiceEndpointInfo.class.getName(), - LogQueryResult.class.getName(), - MessageTrace.class.getName() - ); - - - /** - Verify that the type is suitable for the API. It must meet the following constraints -
      -
    • that it is an OpenType or a standard Java type or a JMX type
    • -
    • that it is Serializable or an interface
    • -
    • or that it is an array whose elements meet the above constraints
    • -
    • or that it is one of our specific Stats types
    • -
    - */ - private boolean - isSuitableReturnTypeForAPI(final String type) { - boolean isSuitable = SUITABLE_TYPES.contains(type); - - if (!isSuitable) { - final boolean isArray = ClassUtil.classnameIsArray(type); - - if (isArray || - type.startsWith("java.") || type.startsWith("javax.management.")) { - Class c = null; - try { - c = ClassUtil.getClassFromName(type); - isSuitable = c.isInterface() || Serializable.class.isAssignableFrom(c) || - c == Object.class; - } - catch (ClassNotFoundException e) { - trace("WARNING: can't find class for type: " + type); - isSuitable = false; - } - - if (isArray) { - final Class elementClass = ClassUtil.getArrayElementClass(c); - isSuitable = isSuitableReturnTypeForAPI(elementClass.getName()); - } else if (isSuitable && - (!type.startsWith("javax.")) && - !c.isInterface()) { - // insist on an interface except for those types explicit in SUITABLE_TYPES - isSuitable = false; - } - } else if (type.endsWith("Stats")) { - isSuitable = type.startsWith("com.sun.appserv.management.monitor.statistics") || - type.startsWith("javax.management.j2ee.statistics"); - } - } - - return (isSuitable); - } - - - /** - Verify: -
      -
    • that all return types are suitable for the API
    • -
    - */ - public void - checkReturnTypes(final ObjectName objectName) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - final MBeanInfo info = Util.getExtra(proxy).getMBeanInfo(); - final MBeanOperationInfo[] operations = info.getOperations(); - - boolean emittedName = false; - - for (int i = 0; i < operations.length; ++i) { - final MBeanOperationInfo opInfo = operations[i]; - - final String returnType = opInfo.getReturnType(); - if (!isSuitableReturnTypeForAPI(returnType)) { - if (!emittedName) { - emittedName = true; - trace("\n" + objectName); - } - - trace("WARNING: unsuitable return type in API: " + - returnType + " " + opInfo.getName() + "(...)"); - } - } - } - - - public void - testReturnTypes() - throws Exception { - testAll("checkReturnTypes"); - } - - - /** - Verify: -
      -
    • that all Attributes are of standard types and Serializable
    • -
    - */ - public void - checkAttributeTypes(final ObjectName objectName) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - final MBeanInfo info = Util.getExtra(proxy).getMBeanInfo(); - final MBeanAttributeInfo[] attributes = info.getAttributes(); - - boolean emittedName = false; - - for (int i = 0; i < attributes.length; ++i) { - final MBeanAttributeInfo attrInfo = attributes[i]; - - final String type = attrInfo.getType(); - if (!isSuitableReturnTypeForAPI(type)) { - if (!emittedName) { - emittedName = true; - } - - if (!type.equals(CoverageInfo.class.getName())) { - trace("WARNING: unsuitable Attribute type in API: " + - type + " " + attrInfo.getName() + " in " + objectName); - } - } - } - } - - public void - testAttributeTypes() - throws Exception { - testAll("checkAttributeTypes"); - } - - /** - Verify: -
      -
    • each create() or createAbc() method ends in "Config" if it returns an AMXConfig subclass
    • -
    • each remove() or removeAbc() method ends in "Config"
    • -
    - */ - public void - checkCreateRemoveGet(final ObjectName objectName) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - if (proxy instanceof Container) { - final Method[] methods = getInterfaceClass(proxy).getMethods(); - final MBeanInfo mbeanInfo = Util.getExtra(proxy).getMBeanInfo(); - final MBeanOperationInfo[] operations = mbeanInfo.getOperations(); - - for (int methodIdx = 0; methodIdx < methods.length; ++methodIdx) { - final Method method = methods[methodIdx]; - final String methodName = method.getName(); - - if (methodName.startsWith("create") && !methodName.endsWith("Config")) { - if (AMXConfig.class.isAssignableFrom(method.getReturnType()) && - (!(proxy instanceof SecurityMapConfig))) { - trace("WARNING: method " + methodName + " does not end in 'Config': " + objectName); - } - } else if (methodName.startsWith("remove") && - !methodName.endsWith("Config") && - proxy instanceof AMXConfig) { - if ( //method.getReturnType() == Void.class && - method.getParameterTypes().length == 1 && - method.getParameterTypes()[0] == String.class && - !method.getName().equals("removeProperty") && - !method.getName().equals("removeSystemProperty") && - (!(proxy instanceof SecurityMapConfig))) { - trace("WARNING: method " + methodName + " does not end in 'Config': " + methodName); - } - } - } - } - } - - - public void - testCreateRemoveGet() - throws Exception { - testAll("checkCreateRemoveGet"); - } - - /** - Verify: -
      -
    • if the interface name ends in "Config" or "ConfigMgr", then is is an AMXConfig
    • -
    - */ - public void - checkImplementsAMXConfig(final ObjectName objectName) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - final String interfaceName = Util.getExtra(proxy).getInterfaceName(); - if (interfaceName.endsWith("Config") || interfaceName.endsWith("ConfigMgr")) { - if (!(proxy instanceof AMXConfig)) { - trace("WARNING: " + ClassUtil.stripPackageName(interfaceName) + " does not implement AMXConfig"); - } - } - } - - - /** - A few items supply Map of things, but have no corresponding create/remove routines. - */ - private boolean - ignoreCreateRemove( - final String j2eeType, - final String suggestedMethod) { - boolean ignore = false; - - if (j2eeType.equals(XTypes.DOMAIN_CONFIG)) { - if (suggestedMethod.equals("createServerConfig") || - suggestedMethod.equals("createWebModuleConfig") || - suggestedMethod.equals("createEJBModuleConfig") || - suggestedMethod.equals("createJ2EEApplicationConfig") || - suggestedMethod.equals("createRARModuleConfig") || - suggestedMethod.equals("createAppClientModuleConfig") || - suggestedMethod.equals("createNodeAgentConfig") || - false - ) { - ignore = true; - } - } else if (j2eeType.equals(XTypes.CLUSTERED_SERVER_CONFIG)) { - if (suggestedMethod.equals("createDeployedItemRefConfig") || - suggestedMethod.equals("createResourceRefConfig") - ) { - ignore = true; - } - } - - return (ignore); - } - - /** - Verify that all getAbcConfigMgr() calls return a non-null result. - */ - public void - checkMapsHaveCreateRemove(final ObjectName objectName) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - - if (proxy instanceof Container && proxy.getGroup().equals(AMX.GROUP_CONFIGURATION)) { - final Extra extra = Util.getExtra(proxy); - final String[] attrNames = extra.getAttributeNames(); - - for (int i = 0; i < attrNames.length; ++i) { - final String name = attrNames[i]; - - final String SUFFIX = "ObjectNameMap"; - final String PREFIX = JMXUtil.GET; - if (name.endsWith(SUFFIX)) { - final String base = StringUtil.stripPrefixAndSuffix(name, PREFIX, SUFFIX); - - if (base.endsWith("ConnectorModuleConfig")) { - // these are created via deployment not directly - continue; - } - - final String createName = "create" + base; - final String removeName = "remove" + base; - - final String j2eeType = proxy.getJ2EEType(); - if (ignoreCreateRemove(proxy.getJ2EEType(), createName)) { - continue; - } - - final MBeanOperationInfo[] creates = - JMXUtil.findOperations(extra.getMBeanInfo().getOperations(), createName); - boolean haveCreate = false; - for (int op = 0; op < creates.length; ++op) { - final MBeanOperationInfo info = creates[op]; - if (info.getReturnType().equals(ObjectName.class.getName())) { - haveCreate = true; - break; - } - } - assert (haveCreate) : - "Missing operation " + createName + "() for " + objectName; - - final MBeanOperationInfo[] removes = - JMXUtil.findOperations(extra.getMBeanInfo().getOperations(), removeName); - boolean haveRemove = false; - for (int op = 0; op < removes.length; ++op) { - final MBeanOperationInfo info = removes[op]; - if (info.getReturnType().equals("void") && - info.getSignature().length <= 2) { - haveRemove = true; - break; - } - } - assert (haveRemove) : - "Missing operation " + removeName + "() for " + objectName; - } - } - } - } - - public void - testMapsHaveCreateRemove() - throws Exception { - testAll("checkMapsHaveCreateRemove"); - } - - - public void - testImplementsAMXConfig() - throws Exception { - testAll("checkImplementsAMXConfig"); - } - - - private static Set MON_IGNORE = GSetUtil.newUnmodifiableSet(new Class[] - { - JMXMonitorMgr.class, - AMXStringMonitor.class, - AMXCounterMonitor.class, - AMXGaugeMonitor.class, - - EJBModuleMonitor.class, - HTTPServiceMonitor.class, - ApplicationMonitor.class, - }); - - /** - Verify: -
      -
    • verify that if the interface name ends in "Monitor", then it is an AMX, Monitoring
    • -
    • verify that if the interface name ends in "MonitorMgr", then it is an Container
    • -
    - */ - public void - testImplementsAMXMonitoring() - throws Exception { -/* - final TypeInfos infos = TypeInfos.getInstance(); - - final Iterator iter = infos.getJ2EETypes().iterator(); - while ( iter.hasNext() ) - { - final TypeInfo info = infos.getInfo( (String)iter.next() ); - final Class theInterface = info.getInterface(); - final String interfaceName = theInterface.getName(); - if ( ! MON_IGNORE.contains( theInterface ) ) - { - if ( interfaceName.endsWith( "Monitor" ) ) - { - if ( ! Monitoring.class.isAssignableFrom( theInterface ) ) - { - warning( ClassUtil.stripPackageName( interfaceName ) + " does not implement Monitoring" ); - } - } - else if ( interfaceName.endsWith( "MonitorMgr" ) ) - { - if ( ! Container.class.isAssignableFrom( theInterface ) ) - { - warning( ClassUtil.stripPackageName( interfaceName ) + " does not implement Container" ); - } - } - } - } -*/ - } - - public void - testGetInterfaceName() - throws IOException, JMException { - final Set all = getQueryMgr().queryAllObjectNameSet(); - - final MBeanServerConnection conn = - Util.getExtra(getDomainRoot()).getConnectionSource().getExistingMBeanServerConnection(); - - final Set failedSet = new HashSet(); - - for (final ObjectName objectName : all) { - try { - final String value = (String) - conn.getAttribute(objectName, AMXAttributes.ATTR_INTERFACE_NAME); - assert (value != null); - value.toString(); - } - catch (AttributeNotFoundException e) { - warning("Can't get InterfaceName for: " + objectName); - failedSet.add(objectName); - } - } - - if (failedSet.size() != 0) { - warning("The following MBeans did not return the Attribute InterfaceName:\n" + - CollectionUtil.toString(failedSet, "\n")); - assert (false); - throw new Error(); - } - } - - - public void - testInterfaceAgainstDelegate() - throws Exception { - final long start = now(); - final Set all = getAllAMX(); - - final MBeanServerConnection conn = getMBeanServerConnection(); - for (final AMX amx : all) { - - final String result = (String) - conn.invoke(Util.getObjectName(amx), - "checkInterfaceAgainstDelegate", null, null); - } - - printElapsed("testInterfaceAgainstDelegate", all.size(), start); - } - - public void - testMisc() { - final long start = now(); - final Set all = getAllAMX(); - - for (final AMX amx : all) { - amx.setMBeanLogLevel(amx.getMBeanLogLevel()); - - final ObjectName objectName = Util.getObjectName(amx); - assert (objectName.getKeyProperty(AMX.NAME_KEY) != null); - assert (objectName.getKeyProperty(AMX.J2EE_TYPE_KEY) != null); - } - - printElapsed("testMisc", all.size(), start); - } - - - public void - testNoGoofyNames( - final ObjectName objectName, - final MBeanFeatureInfo[] featureInfos) { - final Set goofy = new HashSet(); - - for (final MBeanFeatureInfo info : featureInfos) { - final String name = info.getName(); - - if (name.indexOf("ObjectNameObjectName") >= 0) { - goofy.add(name); - } - } - - if (goofy.size() != 0) { - assert (false) : NEWLINE + - "MBean " + objectName + " has the following goofy Attributes:" + NEWLINE + - CollectionUtil.toString(goofy, NEWLINE); - } - } - - public void - testNoGoofyNames() { - final long start = now(); - final Set all = getAllAMX(); - - for (final AMX amx : all) { - final ObjectName objectName = Util.getObjectName(amx); - final MBeanInfo mbeanInfo = Util.getExtra(amx).getMBeanInfo(); - - testNoGoofyNames(objectName, mbeanInfo.getAttributes()); - testNoGoofyNames(objectName, mbeanInfo.getOperations()); - } - - printElapsed("testNoGoofyNames", all.size(), start); - } - - - public void - testToString() { - final long start = now(); - final Set all = getAllAMX(); - - for (final AMX amx : all) { - final AMXDebugStuff debug = getTestUtil().asAMXDebugStuff(amx); - - if (debug != null) { - final String s = debug.getImplString( true ); - assert( s.length() != 0 ); - } - } - - printElapsed( "testToString", all.size(), start ); - } -} - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/BulkAccessTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/BulkAccessTest.java deleted file mode 100644 index 4c347d10772..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/BulkAccessTest.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.AMXAttributes; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.ArrayUtil; -import com.sun.appserv.management.util.misc.CollectionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.AttributeList; -import javax.management.MBeanAttributeInfo; -import javax.management.MBeanInfo; -import javax.management.MBeanOperationInfo; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.util.HashSet; -import java.util.Set; - -/** - */ -public final class BulkAccessTest - extends AMXTestBase { - public BulkAccessTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - - public void - testGetBulkAccess() { - assert (getBulkAccess() != null); - } - - public void - testBulkGetMBeanAttributeInfos() - throws Exception { - final long start = now(); - - final ObjectName[] objectNames = getTestUtil().getAllAMXArray(); - - // get everything in bulk.... - final Object[] infos = - getBulkAccess().bulkGetMBeanAttributeInfo(objectNames); - - // now verify that getting it singly yields the same result. - final MBeanServerConnection conn = getConnection(); - for (int i = 0; i < infos.length; ++i) { - - final MBeanAttributeInfo[] bulkAttributes = (MBeanAttributeInfo[]) infos[i]; - - final MBeanInfo info = conn.getMBeanInfo(objectNames[i]); - assert (ArrayUtil.arraysEqual(info.getAttributes(), bulkAttributes)); - } - printElapsed("testBulkGetMBeanAttributeInfos", objectNames.length, start); - } - - public void - testBulkGetMBeanOperationInfos() - throws Exception { - final long start = now(); - - final ObjectName[] objectNames = getTestUtil().getAllAMXArray(); - - final Object[] infos = - getBulkAccess().bulkGetMBeanOperationInfo(objectNames); - - // now verify that getting it singly yields the same result. - final MBeanServerConnection conn = getConnection(); - for (int i = 0; i < infos.length; ++i) { - - final MBeanOperationInfo[] bulkOperations = (MBeanOperationInfo[]) infos[i]; - - final MBeanInfo info = conn.getMBeanInfo(objectNames[i]); - assert (ArrayUtil.arraysEqual(info.getOperations(), bulkOperations)); - } - printElapsed("testBulkGetMBeanOperationInfos", objectNames.length, start); - } - - public void - testAttributeNamesAttributeCorrect() - throws Exception { - final long start = now(); - - final ObjectName[] objectNames = getTestUtil().getAllAMXArray(); - - final Object[] nameArrays = - getBulkAccess().bulkGetAttributeNames(objectNames); - - final Set failed = new HashSet(); - // now verify that getting it singly yields the same result. - for (int i = 0; i < nameArrays.length; ++i) { - final String[] bulkNames = (String[]) nameArrays[i]; - - // verify that the AttributeNames Attribute contains all the names - final String[] attrNames = (String[]) - getConnection().getAttribute(objectNames[i], "AttributeNames"); - - final Set bulkSet = GSetUtil.newStringSet(bulkNames); - final Set attrsSet = GSetUtil.newStringSet(attrNames); - if (!bulkSet.equals(attrsSet)) { - warning("testAttributeNamesAttributeCorrect failed for " + objectNames[i]); - failed.add(objectNames[i]); - } - } - - if (failed.size() != 0) { - assert false : "Failures: " + NEWLINE + CollectionUtil.toString(failed, NEWLINE); - } - - printElapsed("testAttributeNamesAttributeCorrect", objectNames.length, start); - } - - public void - testBulkGetMBeanAttributeNames() - throws Exception { - final long start = now(); - - final ObjectName[] objectNames = getTestUtil().getAllAMXArray(); - - final Object[] nameArrays = - getBulkAccess().bulkGetAttributeNames(objectNames); - - for (int i = 0; i < nameArrays.length; ++i) { - final String[] bulkNames = (String[]) nameArrays[i]; - - final MBeanInfo info = - getConnection().getMBeanInfo(objectNames[i]); - - final String[] names = - JMXUtil.getAttributeNames(info.getAttributes()); - - assert (ArrayUtil.arraysEqual(names, bulkNames)); - } - - printElapsed("testBulkGetMBeanAttributeNames", objectNames.length, start); - } - - public void - testBulkGetAttribute() - throws Exception { - final long start = now(); - - final String attrName = AMXAttributes.ATTR_OBJECT_NAME; - final ObjectName[] objectNames = getTestUtil().getAllAMXArray(); - - final Object[] values = - getBulkAccess().bulkGetAttribute(objectNames, attrName); - - final MBeanServerConnection conn = getConnection(); - for (int i = 0; i < objectNames.length; ++i) { - final Object value = conn.getAttribute(objectNames[i], attrName); - - assertEquals(values[i], value); - } - - printElapsed("testBulkGetAttribute", objectNames.length, start); - } - - - public void - testBulkGetAttributes() - throws Exception { - final long start = now(); - - final String[] attrNames = new String[]{ - "FullType", "Group", "Name", "DomainRootObjectName", "ContainerObjectName"}; - final ObjectName[] objectNames = getTestUtil().getAllAMXArray(); - - final Object[] values = - getBulkAccess().bulkGetAttributes(objectNames, attrNames); - - final MBeanServerConnection conn = getConnection(); - for (int i = 0; i < objectNames.length; ++i) { - final AttributeList bulkAttrs = (AttributeList) values[i]; - - final AttributeList attrs = (AttributeList) conn.getAttributes(objectNames[i], attrNames); - - assertEquals(bulkAttrs, attrs); - } - printElapsed("testBulkGetAttributes", objectNames.length, start); - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/ContainerTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/ContainerTest.java deleted file mode 100644 index 03415e1b18a..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/ContainerTest.java +++ /dev/null @@ -1,434 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/base/ContainerTest.java,v 1.7 2007/05/05 05:23:53 tcfujii Exp $ -* $Revision: 1.7 $ -* $Date: 2007/05/05 05:23:53 $ -*/ -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.MapUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import com.sun.appserv.management.util.misc.TypeCast; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.AttributeNotFoundException; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class ContainerTest - extends AMXTestBase { - public ContainerTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - public void - checkContainerContainsChild(final ObjectName containeeObjectName) - throws Exception { - final MBeanServerConnection conn = getMBeanServerConnection(); - - assert (containeeObjectName != null); - assert (conn.isRegistered(containeeObjectName)); - final AMX containedProxy = getProxyFactory().getProxy(containeeObjectName, AMX.class); - if (containedProxy instanceof DomainRoot) { - // DomainRoot has no Container - return; - } - - final ObjectName containerObjectName = (ObjectName) - conn.getAttribute(containeeObjectName, "ContainerObjectName"); - if (!conn.isRegistered(containerObjectName)) { - warning("Container " + StringUtil.quote(containerObjectName) + - " for " + StringUtil.quote(containeeObjectName) + - " is not registered."); - return; - } - - final AMX parentProxy = containedProxy.getContainer(); - - if (parentProxy instanceof Container) { - if (!(parentProxy instanceof Container)) { - trace("WARNING: proxy is instance of Container, but not Container: " + - Util.getExtra(parentProxy).getObjectName()); - } else { - final Container container = (Container) parentProxy; - - if (container != null) { - final Set containees = container.getContaineeSet(); - final Set containeeObjectNames = Util.toObjectNames(containees); - - if (!containeeObjectNames.contains(Util.getExtra(containedProxy).getObjectName())) { - trace("ERROR: Container " + Util.getExtra(parentProxy).getObjectName() + - " does not contain its child: " + containeeObjectName); - assertTrue(false); - } - } - } - } - } - - - public void - testContainersContainChildren() - throws Exception { - testAll("checkContainerContainsChild"); - } - - - public void - checkIsContainer(final ObjectName objectName) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(objectName, AMX.class); - - try { - final Set containedJ2EETypes = TypeCast.asSet( - Util.getExtra(proxy).getAttribute(Container.ATTR_CONTAINEE_J2EE_TYPES)); - - if (containedJ2EETypes != null && containedJ2EETypes.size() != 0) { - assert (proxy instanceof Container) : - "proxy has ContaineeJ2EETypes but is not a Container: " + objectName; - } - } - catch (AttributeNotFoundException e) { - } - - } - - public void - testIsContainer() - throws Exception { - testAll("checkIsContainer"); - } - - private void - checkMapAgreesWithSet(final Container container) - throws Exception { - final Set containedJ2EETypes = container.getContaineeJ2EETypes(); - - for (final String j2eeType : containedJ2EETypes) { - final Map containeeMap = - container.getContaineeMap(j2eeType); - - final Set containeeSet = - container.getContaineeSet(j2eeType); - - assert (containeeMap.keySet().size() == containeeSet.size()) : - "containeeMap has " + containeeMap.keySet().size() + - " = " + toString(containeeMap) + - " but containeeSet has " + containeeSet.size() + " = " + toString(containeeSet); - - final Set namesSet = Util.getNames(containeeSet); - assert (containeeMap.keySet().equals(namesSet)); - } - } - - public void - checkMapAgreesWithSet(final AMX container) - throws Exception { - checkMapAgreesWithSet((Container) container); - } - - private void - checkContaineeMap(final Container container) - throws Exception { - final Set containedJ2EETypes = container.getContaineeJ2EETypes(); - assert (containedJ2EETypes != null); - assert (!containedJ2EETypes.contains(null)); - - assert (container.getMultiContaineeMap((Set) null) != null); - assert (container.getMultiContaineeMap(containedJ2EETypes) != null); - - for (final String j2eeType : containedJ2EETypes) { - final Map containeeMap = - container.getContaineeMap(j2eeType); - assert (containeeMap != null) : - "getContaineeObjectNameMap failed for " + j2eeType; - final Set nullValueKeys = MapUtil.getNullValueKeys(containeeMap); - assert (nullValueKeys.size() == 0) : - "getContaineeObjectNameMap contains nulls for " + toString(nullValueKeys); - } - } - - public void - checkContaineeMap(final AMX container) - throws Exception { - checkContaineeMap((Container) container); - } - - - private void - checkContaineeSet(final Container container) - throws Exception { - final Set containedJ2EETypes = container.getContaineeJ2EETypes(); - assert (containedJ2EETypes != null); - assert (!containedJ2EETypes.contains(null)); - assert (container.getContaineeSet() != null); - - for (final String j2eeType : containedJ2EETypes) { - final Set containeeSet = - container.getContaineeSet(j2eeType); - assert (containeeSet != null) : - "getContaineeSet for " + j2eeType; - assert (!containeeSet.contains(null)) : - "getContaineeSet contains null for " + j2eeType; - - final Set fromSet = - container.getContaineeSet(GSetUtil.newStringSet(j2eeType)); - assert (fromSet.equals(containeeSet)); - - if (containeeSet.size() == 1) { - assert (container.getContainee(j2eeType) != null); - } - } - } - - public void - checkContaineeSet(final AMX container) - throws Exception { - checkContaineeSet((Container) container); - } - - - private void - checkGetByName(final Container container) - throws Exception { - final Set containedJ2EETypes = container.getContaineeJ2EETypes(); - - for (final String j2eeType : containedJ2EETypes) { - final Map containeeMap = - container.getContaineeMap(j2eeType); - - for (final String name : containeeMap.keySet()) { - final AMX containee = container.getContainee(j2eeType, name); - - assert (containee != null) : - "can't get containee of type " + j2eeType + ", name = " + name + - " in " + Util.getObjectName(container); - - assert (containee.getJ2EEType().equals(j2eeType)); - assert (containee.getName().equals(name)); - - final Set byName = - container.getByNameContaineeSet(GSetUtil.newStringSet(j2eeType), name); - assert (byName.size() == 1); - assert (byName.iterator().next() == containee); - } - } - } - - public void - checkGetByName(final AMX container) - throws Exception { - checkGetByName((Container) container); - } - - - public void - testMapAgreesWithSet() - throws Exception { - testAllProxies(getAllContainers(), "checkMapAgreesWithSet"); - } - - public void - testContaineeMap() - throws Exception { - testAllProxies(getAllContainers(), "checkContaineeMap"); - } - - public void - testContaineeSet() - throws Exception { - testAllProxies(getAllContainers(), "checkContaineeSet"); - } - - - private boolean - setsEqual( - final Set s1, - final Set s2) { - final Set t1 = Util.toObjectNames(s1); - final Set t2 = Util.toObjectNames(s2); - - return t1.equals(t2); - } - - private boolean - mapsEqual( - final Map m1, - final Map m2) { - final Map t1 = Util.toObjectNames(m1); - final Map t2 = Util.toObjectNames(m2); - - return t1.equals(t2); - } - - private boolean - mapsOfMapsEqual( - final Map> m1, - final Map> m2) { - boolean equals = false; - - if (m1.keySet().equals(m2.keySet())) { - equals = true; - for (final String key : m1.keySet()) { - final Map x1 = m1.get(key); - final Map x2 = m2.get(key); - if (!mapsEqual(x1, x2)) { - trace("x1: " + MapUtil.toString(x1)); - trace("x2: " + MapUtil.toString(x2)); - equals = false; - break; - } - } - } - - return equals; - } - - - private void - testContaineesOfType( - final Container c, - final String j2eeType) { - final Set j2eeTypes = c.getContaineeJ2EETypes(); - - final Map> all = c.getMultiContaineeMap(j2eeTypes); - final Map> allFromNull = c.getMultiContaineeMap(null); - assert (mapsOfMapsEqual(all, allFromNull)); - - final Map byType = c.getContaineeMap(j2eeType); - assert mapsEqual(byType, all.get(j2eeType)); - - if (byType.keySet().size() == 1) { - final AMX cc = c.getContainee(j2eeType); - assert cc == byType.values().iterator().next(); - } - - final Set s = c.getContaineeSet(j2eeType); - final Set sByType = new HashSet(byType.values()); - assert setsEqual(sByType, s); - - final Set nullSet = null; - - assert (setsEqual(c.getContaineeSet(nullSet), c.getContaineeSet(j2eeTypes))); - assert (setsEqual(c.getContaineeSet(), c.getContaineeSet(nullSet))); - - for (final AMX amx : byType.values()) { - final String itsName = amx.getName(); - final String itsType = amx.getJ2EEType(); - - final Set types = GSetUtil.newStringSet(itsType); - final Set x = c.getByNameContaineeSet(types, itsName); - - assert (x.size() == 1); - assert (amx == x.iterator().next()); - assert (c.getContainee(itsType, itsName) == amx); - } - } - - private void - testContainee(final Container c) { - final Map> all = c.getMultiContaineeMap(null); - - for (final String j2eeType : all.keySet()) { - testContaineesOfType(c, j2eeType); - } - } - - public void - testContainees() { - final Set containers = getAllContainers(); - - for (final Container c : containers) { - testContainee(c); - } - - } - - - public void - testGetByName() - throws Exception { - testAllProxies(getAllContainers(), "checkGetByName"); - } - - - private Set - getAllContainers() { - return getTestUtil().getAllAMX(Container.class); - } -} - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/GenericTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/GenericTest.java deleted file mode 100644 index 3d4d5c88768..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/GenericTest.java +++ /dev/null @@ -1,661 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/base/GenericTest.java,v 1.8 2007/05/05 05:23:53 tcfujii Exp $ -* $Revision: 1.8 $ -* $Date: 2007/05/05 05:23:53 $ -*/ -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.jmx.ReadWriteAttributeFilter; -import com.sun.appserv.management.util.misc.ArrayConversion; -import com.sun.appserv.management.util.misc.ArrayUtil; -import com.sun.appserv.management.util.misc.ClassUtil; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import com.sun.appserv.management.util.stringifier.ArrayStringifier; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.Attribute; -import javax.management.AttributeList; -import javax.management.InstanceNotFoundException; -import javax.management.MBeanAttributeInfo; -import javax.management.MBeanInfo; -import javax.management.MBeanOperationInfo; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.io.IOException; -import java.io.NotSerializableException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class GenericTest - extends AMXTestBase { - final boolean mDoInfo; - final boolean mDoAttributes; - final boolean mDoOperations; - final boolean mwarnings; - - public GenericTest() - throws IOException { - mDoInfo = true; - mDoAttributes = true; - mDoOperations = true; - mwarnings = true; - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - private Map - validateAttributesSingly( - final ObjectName objectName, - final String[] attrNames, - Map failures, - Map warnings) - throws Exception { - MBeanServerConnection conn = getConnection(); - - for (int i = 0; i < attrNames.length; ++i) { - final String attrName = attrNames[i]; - - try { - final Object a = conn.getAttribute(objectName, attrName); - - if (a == null) { - // null is legal, apparently - } - } - catch (NotSerializableException e) { - warnings.put(attrName, e); - } - catch (IOException e) { - failures.put(attrName, e); - } - catch (Exception e) { - failures.put(attrName, e); - } - } - - return (failures); - } - - - private String - getExceptionMsg(final Throwable e) { - String msg = null; - - if (e instanceof IOException) { - msg = "received an exception of class " + e.getClass().getName(); - - if (shouldPrintStackTraces()) { - msg = msg + "Stack trace = \n" + - ExceptionUtil.getStackTrace(ExceptionUtil.getRootCause(e)); - } - } else { - msg = "threw an Exception of type " + - e.getClass().getName() + ", message = " + e.getMessage(); - - if (shouldPrintStackTraces()) { - msg = msg + "\n" + ExceptionUtil.getStackTrace(e); - } - } - - final Throwable rootCause = ExceptionUtil.getRootCause(e); - - if (rootCause != e) { - msg = msg + "...\nRoot cause was exception of type " + e.getClass().getName() + ", message = " + - rootCause.getMessage(); - - - if (shouldPrintStackTraces()) { - msg = msg + "\n" + ExceptionUtil.getStackTrace(rootCause); - } - } - - return (msg); - } - - MBeanAttributeInfo - findAttributeInfo( - final MBeanAttributeInfo[] infos, - String attrName) { - MBeanAttributeInfo info = null; - - for (int i = 0; i < infos.length; ++i) { - if (infos[i] != null && infos[i].getName().equals(attrName)) { - info = infos[i]; - break; - } - } - - assert (info != null); - return (info); - } - - private void - displayAttributeFailuresOrWarnings( - final boolean failure, - final ObjectName objectName, - final MBeanAttributeInfo[] infos, - final Map problems) - throws Exception { - trace(""); - trace(problems.keySet().size() + (failure ? " Failures: " : " Warnings: ") + objectName); - - int i = 0; - for (final String attrName : problems.keySet()) { - final Throwable t = problems.get(attrName); - - final MBeanAttributeInfo info = findAttributeInfo(infos, attrName); - - final String prefix = "(" + (i + 1) + ")" + " getting Attribute \"" + attrName + "\" of type " + - info.getType() + " "; - - if (t == null) { - trace(prefix + "returned null"); - } else { - trace(prefix + getExceptionMsg(t)); - } - ++i; - } - } - - - private boolean - validateMBeanInfo( - final ObjectName objectName, - final MBeanInfo info) { - boolean valid = true; - - if (ArrayUtil.arrayContainsNulls(info.getAttributes())) { - warning("MBean has nulls in its MBeanAttributeInfo[]: " + objectName); - valid = false; - } - - if (ArrayUtil.arrayContainsNulls(info.getConstructors())) { - warning("MBean has nulls in its MBeanConstructorInfo[]: " + objectName); - valid = false; - } - - if (ArrayUtil.arrayContainsNulls(info.getOperations())) { - warning("MBean has nulls in its MBeanOperationInfo[]: " + objectName); - valid = false; - } - - if (ArrayUtil.arrayContainsNulls(info.getNotifications())) { - warning("MBean has nulls in its MBeanNotificationInfo[]: " + objectName); - valid = false; - } - - return (valid); - } - - static final private String SECTION_LINE = - "--------------------------------------------------------------------------------"; - - - private void - printDuplicateAttributes( - final ObjectName objectName, - MBeanAttributeInfo[] attrInfos, - String name) { - String msg = "MBean " + quote(objectName) + " has the same Attribute listed more than once:\n"; - - for (int i = 0; i < attrInfos.length; ++i) { - final MBeanAttributeInfo a = attrInfos[i]; - - if (a.getName().equals(name)) { - msg = msg + name + ": " + a.getType() + ", " + quote(a.getDescription()); - } - } - - warning(msg); - } - - private boolean - validateUniqueAttributeNames( - final ObjectName objectName, - MBeanAttributeInfo[] attrInfos) { - boolean valid = true; - final MBeanAttributeInfo[] infos = - JMXUtil.filterAttributeInfos(attrInfos, ReadWriteAttributeFilter.READABLE_FILTER); - final String[] names = JMXUtil.getAttributeNames(infos); - - if (ArrayConversion.arrayToSet(names).size() != attrInfos.length) { - final Set set = new HashSet(); - - for (int i = 0; i < names.length; ++i) { - final String name = names[i]; - - if (set.contains(name)) { - valid = false; - - printDuplicateAttributes(objectName, attrInfos, name); - } else { - set.add(name); - } - } - set.clear(); - } - - return (valid); - } - - private boolean - validateMissingAndEmptyAttributeNames(final ObjectName objectName) { - boolean valid = true; - final MBeanServerConnection conn = getConnection(); - - AttributeList attrs = null; - try { - attrs = conn.getAttributes(objectName, new String[0]); - if (attrs == null) { - warning("MBean " + quote(objectName) + - " returned NULL for an empty AttributeList"); - valid = false; - } else if (attrs.size() != 0) { - warning("MBean " + quote(objectName) + - " returned attributes for an empty AttributeList"); - valid = false; - } - } - catch (Exception e) { - valid = false; - - warning("MBean " + quote(objectName) + - " threw an exception getting an empty attribute list"); - } - - try { - final String notFoundName = "bogus." + System.currentTimeMillis(); - attrs = conn.getAttributes(objectName, new String[]{notFoundName}); - if (attrs == null) { - warning("MBean " + quote(objectName) + - " returned NULL for a missing Attribute"); - valid = false; - } else if (attrs.size() != 0) { - warning("MBean " + quote(objectName) + - " returned attributes for a non-existent name"); - valid = false; - } - } - catch (Exception e) { - valid = false; - - warning("MBean " + quote(objectName) + - " threw an exception when getAttributes() was called with a " + - "non-existent Attribute, exception class = " + - e.getClass().getName()); - } - - return (valid); - } - - private boolean - validateAttributeTypes( - final ObjectName objectName, - final AttributeList attrs, - final MBeanAttributeInfo[] attrInfos) - throws Exception { - boolean valid = true; - - final Map attrInfosMap = JMXUtil.attributeInfosToMap(attrInfos); - - final Iterator iter = attrs.iterator(); - while (iter.hasNext()) { - final Attribute attr = (Attribute) iter.next(); - - final String name = attr.getName(); - final Object value = attr.getValue(); - final MBeanAttributeInfo attrInfo = (MBeanAttributeInfo) attrInfosMap.get(name); - if (attrInfo == null) { - valid = false; - warning("MBean " + objectName + " returned an Attribute not " + - "declared in its MBeanInfo: " + name); - } else if (value != null) { - final String typeName = attrInfo.getType(); - final Class infoClass = ClassUtil.getClassFromName(typeName); - final Class valueClass = value.getClass(); - - if (infoClass == null) { - valid = false; - warning("Can't find class for: " + typeName); - } else if (!infoClass.isAssignableFrom(valueClass)) { - final Class objectClass = ClassUtil.PrimitiveClassToObjectClass(infoClass); - - if (!objectClass.isAssignableFrom(valueClass)) { - valid = false; - warning("MBean " + objectName + " returned Attribute " + - name + "=" + value + - " of class " + value.getClass().getName() + - " not matching its MBeanInfo: " + infoClass.getName()); - } - } - } - } - - return (valid); - } - - private boolean - validateAttributes( - final ObjectName objectName, - final MBeanAttributeInfo[] attrInfos) - throws Exception { - boolean valid = true; - - final MBeanAttributeInfo[] readableInfos = JMXUtil.filterAttributeInfos(attrInfos, - ReadWriteAttributeFilter.READABLE_FILTER); - final String[] attrNames = JMXUtil.getAttributeNames(readableInfos); - Arrays.sort(attrNames); - - if (attrNames.length != 0) { - // if we can fetch all the attributes, then the MBean is OK; - // try this first for efficiency - try { - //trace( objectName.getKeyProperty( "j2eeType" ) + ": " + attrNames.length ); - final AttributeList attrs = getConnection().getAttributes(objectName, attrNames); - - if (attrs == null) { - warning("MBean " + quote(objectName) + " returned NULL for its AttributeList"); - valid = false; - } else if (attrs.size() != readableInfos.length) { - // mismatch between claimed number of attributes and actual - final ArrayStringifier as = new ArrayStringifier(", ", true); - final String claimedString = as.stringify(attrNames); - - final Set actualSet = JMXUtil.attributeListToValueMap(attrs).keySet(); - final Set missingSet = ArrayConversion.arrayToSet(attrNames); - missingSet.removeAll(actualSet); - - final String[] missingNames = (String[]) ArrayConversion.setToArray(missingSet, true); - Arrays.sort(missingNames); - final String missingString = as.stringify(missingNames); - - warning("MBean " + quote(objectName) + - " did not supply the " + - missingNames.length + " attributes " + missingString); - } - - valid = validateAttributeTypes(objectName, attrs, readableInfos); - } - catch (Exception e) { - trace(SECTION_LINE); - final String msg = "getAttributes() failed on " + quote(objectName) + ", exception =\n" + e; - - if (e instanceof NotSerializableException) { - warning(msg); - } else { - warning(msg); - valid = false; - } - // do them one-at-a time to see where failure occurs - final Map failures = new HashMap(); - final Map warnings = new HashMap(); - - validateAttributesSingly(objectName, attrNames, failures, warnings); - - trace("Validating attributes one-at-a-time using getAttribute() for " + quote(objectName)); - if (failures.size() == 0 && warnings.size() == 0) { - warning(" during getAttributes(" + - ArrayStringifier.stringify(attrNames, ",") + ") for: " + objectName + - " (but Attributes work when queried one-at-a-time).\nIt " + - getExceptionMsg(e)); - } - - if (failures.size() != 0) { - displayAttributeFailuresOrWarnings(true, objectName, readableInfos, failures); - } - - if (warnings.size() != 0) { - displayAttributeFailuresOrWarnings(false, objectName, readableInfos, warnings); - } - - trace(SECTION_LINE); - } - } else { - valid = true; - } - - if (!validateUniqueAttributeNames(objectName, attrInfos)) { - valid = false; - } - - if (!validateMissingAndEmptyAttributeNames(objectName)) { - valid = false; - } - - return (valid); - } - - void - checkObjectNameReturnValue( - MBeanServerConnection conn, - ObjectName callee, - MBeanOperationInfo operationInfo, - ObjectName resultOfCall) - throws Exception { - try { - printVerbose("checking MBean info for: " + resultOfCall); - final MBeanInfo mbeanInfo = conn.getMBeanInfo(resultOfCall); - } - catch (InstanceNotFoundException e) { - trace("WARNING: MBean " + resultOfCall + " returned from " + - operationInfo.getReturnType() + " " + operationInfo.getName() + "() does not exist"); - - } - catch (Exception e) { - trace("WARNING: MBean " + resultOfCall + " returned from " + - operationInfo.getReturnType() + " " + operationInfo.getName() + - "() can't supply MBeanInfo: " + getExceptionMsg(e) - ); - - if (e instanceof IOException) { - throw (IOException) e; - } - } - } - - void - checkGetterResult( - MBeanServerConnection conn, - ObjectName callee, - MBeanOperationInfo operationInfo, - Object resultOfCall) - throws Exception { - if (resultOfCall instanceof ObjectName) { - final ObjectName name = (ObjectName) resultOfCall; - - checkObjectNameReturnValue(conn, callee, operationInfo, name); - } else if (resultOfCall instanceof ObjectName[]) { - final ObjectName[] names = (ObjectName[]) resultOfCall; - - for (int i = 0; i < names.length; ++i) { - checkObjectNameReturnValue(conn, callee, operationInfo, names[i]); - } - } - } - - private boolean - validateGetters( - final ObjectName objectName, - final MBeanOperationInfo[] operationInfos) - throws Exception { - boolean valid = true; - MBeanServerConnection conn = getConnection(); - - for (int i = 0; i < operationInfos.length; ++i) { - final MBeanOperationInfo info = operationInfos[i]; - - if (JMXUtil.isGetter(info)) { - boolean opValid = false; - - try { - printVerbose("invoking getter: " + info.getName() + "()"); - final Object result = conn.invoke(objectName, info.getName(), null, null); - - checkGetterResult(conn, - objectName, info, result); - } - catch (Exception e) { - warning("Failure: calling " + info.getName() + "() on " + objectName + - ": " + getExceptionMsg(e)); - - if (e instanceof IOException) { - throw ((IOException) e); - } - valid = false; - } - } - } - - return (valid); - } - - - boolean - shouldPrintStackTraces() { - return (true); - } - - - private boolean - validate(final ObjectName objectName) - throws Exception { - boolean valid = true; - - MBeanServerConnection conn = getConnection(); - - MBeanInfo info = null; - try { - info = conn.getMBeanInfo(objectName); - } - catch (Exception e) { - valid = false; - warning(" during getMBeanInfo() for: " + objectName + "\n" + - " message = " + e.getMessage()); - // abort--the connection has died - throw e; - } - - if (mDoInfo && !validateMBeanInfo(objectName, info)) { - trace("validateMBeanInfo failed for: " + objectName); - valid = false; - } - - - if (mDoAttributes && - !validateAttributes(objectName, info.getAttributes())) { - trace("validateAttributes failed for: " + objectName); - valid = false; - } - - if (mDoOperations && - !validateGetters(objectName, info.getOperations())) { - trace("validateGetters failed for: " + objectName); - valid = false; - } - - return (valid); - } - - - private void - validate(final ObjectName[] objectNames) - throws Exception { - int failureCount = 0; - - trace("Validating: "); - if (mDoInfo) { - trace("- MBeanInfo"); - } - if (mDoAttributes) { - trace("- Attributes"); - } - if (mDoOperations) { - trace("- Operations (getters)"); - } - - trace(""); - - for (int i = 0; i < objectNames.length; ++i) { - final ObjectName objectName = objectNames[i]; - - printVerbose("Validating: " + objectName); - - if (!shouldTest(objectName)) { - notTested(objectName); - continue; - } - - final boolean valid = validate(objectName); - if (!valid) { - ++failureCount; - } - } - - trace("Total mbeans failing: " + failureCount); - } - - - public void - testGenerically() - throws Exception { - final Set all = getTestUtil().getAllObjectNames(); - - final ObjectName[] allObjectNames = new ObjectName[all.size()]; - all.toArray(allObjectNames); - validate(allObjectNames); - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/GetSetAttributeTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/GetSetAttributeTest.java deleted file mode 100644 index 4889c1a17a1..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/GetSetAttributeTest.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.CollectionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.MapUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.Attribute; -import javax.management.AttributeList; -import javax.management.MBeanAttributeInfo; -import javax.management.MBeanInfo; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - - -/** - */ -public final class GetSetAttributeTest - extends AMXTestBase { - public GetSetAttributeTest() { - } - - - private static final Set SKIP_IDENTITY_SET_TEST = - Collections.unmodifiableSet(GSetUtil.newStringSet( - "DynamicReconfigurationEnabled" - )); - - private void - testGetSetAttributes(final AMX amx) - throws Exception { - final ObjectName objectName = Util.getObjectName(amx); - - boolean skipIdentitySet = false; - if (amx.getJ2EEType().equals(XTypes.CONFIG_DOTTED_NAMES)) { - skipIdentitySet = true; - trace("GetSetAttributeTest.testGetSetAttributes: skipping identity set for " + objectName + - " because too many Attributes misbehave."); - } - - final MBeanServerConnection conn = getMBeanServerConnection(); - final MBeanInfo mbeanInfo = Util.getExtra(amx).getMBeanInfo(); - - final Map attrInfos = - JMXUtil.attributeInfosToMap(mbeanInfo.getAttributes()); - final String[] attrNames = GSetUtil.toStringArray(attrInfos.keySet()); - - // get all the Attributes - final AttributeList values = conn.getAttributes(objectName, attrNames); - - final Map valuesMap = JMXUtil.attributeListToValueMap(values); - - final Set getFailed = new HashSet(); - final Map setFailed = new HashMap(); - - for (final MBeanAttributeInfo attrInfo : attrInfos.values()) { - final String name = attrInfo.getName(); - if (!valuesMap.keySet().contains(name)) { - getFailed.add(name); - continue; - } - - if (attrInfo.isReadable()) { - final Object value = valuesMap.get(name); - - if (attrInfo.isWritable() && (!skipIdentitySet)) { - if (SKIP_IDENTITY_SET_TEST.contains(name)) { - trace("Skipping identity-set check for known problem attribute " + - StringUtil.quote(name) + - " of MBean " + JMXUtil.toString(objectName)); - } else { - // set it to the same value as before - try { - final Attribute attr = new Attribute(name, value); - conn.setAttribute(objectName, attr); - } - catch (Exception e) { - setFailed.put(name, value); - - warning("Could not set Attribute " + name + " of MBean " + - StringUtil.quote(objectName) + - " to the same value: " + - StringUtil.quote("" + value)); - } - } - } - } - } - - if (getFailed.size() != 0) { - warning("(SUMMARY) Could not get Attributes for " + - StringUtil.quote(objectName) + NEWLINE + - CollectionUtil.toString(getFailed, NEWLINE)); - - for (final String attrName : getFailed) { - try { - final Object value = conn.getAttribute(objectName, attrName); - warning("Retry of Attribute " + - attrName + " succeed with value " + value); - } - catch (Exception e) { - warning("Attribute " + attrName + " failed with " + - e.getClass() + ": " + e.getMessage()); - } - } - } - - if (setFailed.size() != 0) { - warning("(SUMMARY) Could not identity-set Attributes for " + - StringUtil.quote(objectName) + NEWLINE + - MapUtil.toString(setFailed, NEWLINE)); - } - } - - - public void - testGetSetAttributes() - throws Exception { - final Set all = getAllAMX(); - - for (final AMX amx : all) { - testGetSetAttributes(amx); - } - } -} - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/ListenerTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/ListenerTest.java deleted file mode 100644 index ca2773f3e85..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/ListenerTest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.AMX; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.Notification; -import javax.management.NotificationFilter; -import javax.management.NotificationFilterSupport; -import javax.management.NotificationListener; -import java.util.Set; - - -/** - */ -public final class ListenerTest - extends AMXTestBase { - public ListenerTest() { - } - - private static class DummyListener - implements NotificationListener { - public DummyListener() {} - - public void - handleNotification( - final Notification notif, - final Object handback) { - } - } - - public void - testAddRemoveNotificationListener() - throws Exception { - final long start = now(); - final Set all = getAllAMX(); - - final NotificationListener listener1 = new DummyListener(); - final NotificationListener listener2 = new DummyListener(); - - final NotificationFilter filter = new NotificationFilterSupport(); - final Object handback = "handback"; - - for (final AMX amx : all) { - amx.getNotificationInfo(); - amx.addNotificationListener(listener1, null, null); - amx.addNotificationListener(listener2, filter, handback); - } - - for (final AMX amx : all) { - amx.removeNotificationListener(listener1); - amx.removeNotificationListener(listener2, filter, handback); - } - - printElapsed("Added/removed NotificationListener", all.size(), start); - } - - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationEmitterServiceTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationEmitterServiceTest.java deleted file mode 100644 index ca4de8188d3..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationEmitterServiceTest.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/base/NotificationEmitterServiceTest.java,v 1.5 2007/05/05 05:23:53 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:23:53 $ -*/ -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.NotificationEmitterService; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.util.jmx.NotificationBuilder; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.Notification; -import javax.management.NotificationListener; - - -/** - */ -public final class NotificationEmitterServiceTest - extends AMXTestBase { - public NotificationEmitterServiceTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - public NotificationEmitterService - getNotificationEmitterService() { - return getDomainRoot().getDomainNotificationEmitterService(); - } - - public void - testGet() { - assert getNotificationEmitterService() != null; - } - - - private final static class testEmitListener - implements NotificationListener { - static final String TEST_TYPE = "unittests.testEmitListener"; - private Notification mNotification; - private int mNumHeard; - - public testEmitListener() { - mNumHeard = 0; - mNotification = null; - } - - public void - handleNotification( - final Notification notif, - final Object handback) { - mNotification = notif; - ++mNumHeard; - } - - public Notification getLast() { return mNotification; } - - public int getNumHeard() { return mNumHeard; } - - public void clear() { - mNumHeard = 0; - mNotification = null; - } - } - - private static final String TEST_SOURCE = "NotificationEmitterServiceTest"; - private static final String TEST_MESSAGE = "Message"; - private static final String TEST_KEY = "TestKey"; - private static final String TEST_VALUE = "test value"; - - public void - testEmit() { - final NotificationEmitterService nes = getNotificationEmitterService(); - - final NotificationBuilder builder = - new NotificationBuilder(testEmitListener.TEST_TYPE, TEST_SOURCE); - - final testEmitListener listener = new testEmitListener(); - nes.addNotificationListener(listener, null, null); - final Notification notif = builder.buildNew(TEST_MESSAGE); - builder.putMapData(notif, TEST_KEY, TEST_VALUE); - - // call emitNotification() and verify it was emitted - nes.emitNotification(notif); - while (listener.getLast() == null) { - // wait... - mySleep(20); - } - final Notification retrieved = listener.getLast(); - assert (retrieved.getType().equals(notif.getType())); - assert (Util.getAMXNotificationValue(retrieved, TEST_KEY, String.class).equals(TEST_VALUE)); - assert (retrieved.getSource().equals(TEST_SOURCE)); - assert (retrieved.getMessage().equals(TEST_MESSAGE)); - - // now emit many Notifications. - listener.clear(); - long start = now(); - final int ITER = 200; - for (int i = 0; i < ITER; ++i) { - final Notification temp = builder.buildNew(TEST_MESSAGE); - builder.putMapData(notif, TEST_KEY, TEST_VALUE); - nes.emitNotification(temp); - } - printElapsedIter("Emitted Notifications", start, ITER); - start = now(); - while (listener.getNumHeard() < ITER) { - mySleep(10); - } - printElapsedIter("After sending, received emitted Notifications", start, ITER); - } -} - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationPerformanceTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationPerformanceTest.java deleted file mode 100644 index 6074c30e4ea..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationPerformanceTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.Util; -import org.glassfish.admin.amx.mbean.TestDummy; -import org.glassfish.admin.amx.mbean.TestDummyMBean; -import org.glassfish.admin.amxtest.JMXTestBase; - -import javax.management.JMException; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.io.IOException; - -import org.glassfish.admin.amxtest.JMXTestBase; - -/** - */ -public final class NotificationPerformanceTest - extends JMXTestBase { - // built-into server already - private static final String IMPL_CLASSNAME = TestDummy.class.getName(); - - public NotificationPerformanceTest() { - } - - private ObjectName - createTestDummy(final String name) - throws JMException, IOException { - ObjectName objectName = - Util.newObjectName("NotificationPerformanceTest:name=" + name); - - final MBeanServerConnection conn = getMBeanServerConnection(); - - if (!conn.isRegistered(objectName)) { - objectName = - conn.createMBean(IMPL_CLASSNAME, objectName).getObjectName(); - } - - return objectName; - } - - public void - testNotificationPerformance() - throws JMException, IOException { - final ObjectName objectName = createTestDummy("testNotificationPerformance"); - - final TestDummyMBean test = newProxy(objectName, TestDummyMBean.class); - - final int ITER = 10; - final int COUNT = 1024 * 1024; - - for (int iter = 0; iter < ITER; ++iter) { - final long elapsed = - test.emitNotifications("NotificationPerformanceTest.test", COUNT); - - final float rate = (elapsed == 0) ? (float) 0.0 : (1000 * ((float) COUNT / (float) elapsed)); - final String rateString = (elapsed == 0) ? "N/A" : "" + (int) rate; - - System.out.println("Millis to emit " + COUNT + " Notifications: " + elapsed + - " = " + rateString + " notifications/sec"); - } - } -} - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationServiceMgrTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationServiceMgrTest.java deleted file mode 100644 index 3ab38ade07e..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationServiceMgrTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/base/NotificationServiceMgrTest.java,v 1.4 2007/05/05 05:23:53 tcfujii Exp $ -* $Revision: 1.4 $ -* $Date: 2007/05/05 05:23:53 $ -*/ -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.NotificationService; -import com.sun.appserv.management.base.NotificationServiceMgr; -import com.sun.appserv.management.base.Util; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.ObjectName; - -/** - */ -public final class NotificationServiceMgrTest - extends AMXTestBase { - public NotificationServiceMgrTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - public void - testGet() { - assert (getNotificationServiceMgr() != null); - } - - public void - testCreateRemove() - throws Exception { - final NotificationServiceMgr proxy = getNotificationServiceMgr(); - - final NotificationService service = proxy.createNotificationService("test1", 512); - - final ObjectName objectName = Util.getObjectName(service); - - proxy.removeNotificationService(service.getName()); - assert (!getConnection().isRegistered(objectName)); - } - - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationServiceTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationServiceTest.java deleted file mode 100644 index 12347dda335..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/NotificationServiceTest.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.NotificationService; -import com.sun.appserv.management.base.NotificationServiceMgr; -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.helper.NotificationServiceHelper; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.AttributeChangeNotification; -import javax.management.InstanceNotFoundException; -import javax.management.Notification; -import javax.management.NotificationListener; -import javax.management.ObjectName; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -/** - */ -public final class NotificationServiceTest - extends AMXTestBase { - public NotificationServiceTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - public NotificationService - create() { - final NotificationServiceMgr proxy = getNotificationServiceMgr(); - - return (proxy.createNotificationService("test", 512)); - } - - public void - testCreate() - throws Exception { - final NotificationService proxy = create(); - - removeNotificationService(proxy); - } - - public void - testGetFromEmpty() - throws Exception { - final NotificationService proxy = create(); - - assert (proxy.getListeneeSet().size() == 0); - final Object id = proxy.createBuffer(10, null); - final Map result = proxy.getBufferNotifications(id, 0); - final Notification[] notifs = (Notification[]) result.get(proxy.NOTIFICATIONS_KEY); - assertEquals(0, notifs.length); - } - - private void - removeNotificationService(final NotificationService service) - throws InstanceNotFoundException { - getNotificationServiceMgr().removeNotificationService(service.getName()); - } - - - private static final class MyListener - implements NotificationListener { - private final List mReceived; - private final CountDownLatch mLatch; - - public MyListener( final int numNeeded ) { - mReceived = Collections.synchronizedList(new ArrayList()); - mLatch = new CountDownLatch(numNeeded); - } - - public void - handleNotification( - final Notification notif, - final Object handback) { - mReceived.add(notif); - mLatch.countDown(); - } - - public boolean await( final long amt, final TimeUnit units ) - throws InterruptedException - { - return mLatch.await( amt, units); - } - - public int - getCount() { - return (mReceived.size()); - } - } - - private static void - sleep(int duration) { - try { - Thread.sleep(duration); - } - catch (InterruptedException e) { - } - } - - public void - testListen() - throws Exception { - //trace( "testListen: START" ); - final NotificationService proxy = create(); - - final QueryMgr queryMgr = getQueryMgr(); - final ObjectName objectName = Util.getObjectName(queryMgr); - - final Object id = proxy.createBuffer(10, null); - final NotificationServiceHelper helper = new NotificationServiceHelper(proxy, id); - proxy.listenTo(objectName, null); - assert (proxy.getListeneeSet().size() == 1); - assert (Util.getObjectName((Util.asAMX(proxy.getListeneeSet().iterator().next()))).equals(objectName)); - - //trace( "testListen: NEWING" ); - final MyListener myListener = new MyListener(2); // we expect two changes, see below - proxy.addNotificationListener(myListener, null, null); - final String saveLevel = queryMgr.getMBeanLogLevel(); - queryMgr.setMBeanLogLevel("" + Level.FINEST); - queryMgr.setMBeanLogLevel(saveLevel); - - //trace( "testListen: WAITING" ); - // delivery may be asynchronous; wait until done - if ( ! myListener.await( 5, TimeUnit.SECONDS ) ) - { - //trace( "testListen: FAILED TIMEOUT" ); - assert false : "NotificationServiceTest.testListen(): TIMED OUT waiting for Notifications"; - } - - //trace( "testListen: NOT FAILED" ); - assert (myListener.getCount() == 2); - - Notification[] notifs = helper.getNotifications(); - - assertEquals(2, notifs.length); - assert (notifs[0].getType().equals(AttributeChangeNotification.ATTRIBUTE_CHANGE)); - assert (notifs[1].getType().equals(AttributeChangeNotification.ATTRIBUTE_CHANGE)); - notifs = helper.getNotifications(); - assert (notifs.length == 0); - - - proxy.dontListenTo(objectName); - assert (proxy.getListeneeSet().size() == 0); - - removeNotificationService(proxy); - //trace( "testListen: EXIT" ); - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/QueryMgrTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/QueryMgrTest.java deleted file mode 100644 index 32cdfd06414..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/QueryMgrTest.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AdminObjectResourceConfig; -import com.sun.appserv.management.config.ConnectorResourceConfig; -import com.sun.appserv.management.config.CustomResourceConfig; -import com.sun.appserv.management.config.JDBCResourceConfig; -import com.sun.appserv.management.config.JNDIResourceConfig; -import com.sun.appserv.management.config.MailResourceConfig; -import com.sun.appserv.management.config.ResourceConfig; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.CollectionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.ObjectName; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -/** - */ -public final class QueryMgrTest - extends AMXTestBase { - final QueryMgr mQM; - - public QueryMgrTest() { - mQM = getQueryMgr(); - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - - private void - checkSetsEqual( - final String msg, - final Set set1, - final Set set2) { - if (!set1.equals(set2)) { - final Set conflict = GSetUtil.newNotCommonSet(set1, set2); - final String values = CollectionUtil.toString(conflict, "\n"); - failure(msg + ", mismatch =\n" + values); - } - } - - - private void - checkAMXWithObjectNames( - final String msg, - final Set set1, - final Set set2) { - if (set1.size() != set2.size()) { - failure(msg + "set sizes don't match: " + set1.size() + " != " + set2.size()); - } - - final Set set1ObjectNames = new HashSet(); - for (final AMX item : set1) { - final ObjectName objectName = Util.getObjectName(item); - - if (set1ObjectNames.contains(objectName)) { - failure("set1 contains the same proxy twice with ObjectName: " + objectName); - } - set1ObjectNames.add(objectName); - } - - checkSetsEqual(msg, set1ObjectNames, set2); - } - - static final private Set RESOURCE_TYPES = GSetUtil.newUnmodifiableStringSet( - JDBCResourceConfig.J2EE_TYPE, - MailResourceConfig.J2EE_TYPE, - CustomResourceConfig.J2EE_TYPE, - JNDIResourceConfig.J2EE_TYPE, - ConnectorResourceConfig.J2EE_TYPE, - AdminObjectResourceConfig.J2EE_TYPE); - - public void - testQueryJ2EETypesSet() - throws ClassNotFoundException { - final long start = now(); - - final Set resources = mQM.queryJ2EETypesSet(RESOURCE_TYPES); - final Set resourcesObjectNames = mQM.queryJ2EETypesObjectNameSet(RESOURCE_TYPES); - - assert (resourcesObjectNames.size() >= 1) : "testQueryJ2EETypesSet: no resources found for " + CollectionUtil.toString(RESOURCE_TYPES, ", "); - assert (resources.size() >= 1) : "testQueryJ2EETypesSet: no resource ObjectNames found!"; - ; - - checkAMXWithObjectNames( - "queryJ2EETypesSet(...) != queryJ2EETypesObjectNameSet(...)", - resources, resourcesObjectNames); - - //println( resourcesObjectNames ); - - printElapsed("testQueryJ2EETypesSet", start); - } - - - public void - testQueryJ2EETypePvsON() - throws ClassNotFoundException { - final long start = now(); - - final String testType1 = XTypes.DOMAIN_CONFIG; - checkAMXWithObjectNames( - "queryJ2EETypeSet(XTypes.DOMAIN_CONFIG) != queryJ2EETypeObjectNameSet(XTypes.DOMAIN_CONFIG)", - mQM.queryJ2EETypeSet(testType1), - mQM.queryJ2EETypeObjectNameSet(testType1)); - printElapsed("testQueryJ2EETypePvsON", start); - } - - public void - testQueryJ2EENamePvsON() - throws ClassNotFoundException { - final long start = now(); - - final String name = getDomainRoot().getName(); - checkAMXWithObjectNames( - "queryJ2EENameSet() != queryJ2EENameObjectNameSet()", - mQM.queryJ2EENameSet(name), - mQM.queryJ2EENameObjectNameSet(name)); - printElapsed("testQueryJ2EENamePvsON", start); - } - - public void - testQueryPatternPvsON() - throws ClassNotFoundException { - final long start = now(); - - final String domain = Util.getObjectName(mQM).getDomain(); - final ObjectName pat = JMXUtil.newObjectNamePattern(domain, "*"); - checkAMXWithObjectNames( - "queryPatternSet() != queryPatternObjectNameSet()", - mQM.queryPatternSet(pat), - mQM.queryPatternObjectNameSet(pat)); - - checkAMXWithObjectNames( - "queryPatternSet() != queryPatternObjectNameSet()", - mQM.queryPatternSet(domain, "*"), - mQM.queryPatternObjectNameSet(domain, "*")); - printElapsed("testQueryPatternPvsON", start); - } - - public void - testQueryPropsPvsON() - throws ClassNotFoundException { - final long start = now(); - - final String domain = Util.getObjectName(mQM).getDomain(); - final String props = Util.makeRequiredProps(XTypes.DOMAIN_ROOT, domain); - checkAMXWithObjectNames( - "queryPropsSet() != queryPropsObjectNameSet()", - mQM.queryPropsSet(props), - mQM.queryPropsObjectNameSet(props)); - printElapsed("testQueryPropsPvsON", start); - } - - public void - testQueryWildPvsON() { - final long start = now(); - - final String[] wildNames = new String[]{"*"}; - final String[] wildValues = new String[]{"*"}; - checkAMXWithObjectNames( - "queryWildSet() != queryWildObjectNameSet()", - mQM.queryWildSet(wildNames, wildValues), - mQM.queryWildObjectNameSet(wildNames, wildValues)); - printElapsed("testQueryWildPvsON", start); - } - - public void - testQueryInterfacePvsON() - throws ClassNotFoundException { - final long start = now(); - - final Set candidates = mQM.queryAllSet(); - final Set candidateObjectNames = Util.toObjectNames(candidates); - final String interfaceName = DomainRoot.class.getName(); - checkAMXWithObjectNames( - "queryInterfaceSet() != queryInterfaceObjectNameSet()", - mQM.queryInterfaceSet(interfaceName, candidateObjectNames), - mQM.queryInterfaceObjectNameSet(interfaceName, candidateObjectNames)); - printElapsed("testQueryInterfacePvsON", start); - } - - public void - testQueryAll_AMXMatchesObjectName() - throws ClassNotFoundException { - final long start = now(); - - final Set allSet = mQM.queryAllSet(); - final Set allObjectNameSet = mQM.queryAllObjectNameSet(); - - assert (allSet.size() == allObjectNameSet.size()); - - checkAMXWithObjectNames( - "queryAllSet() != queryAllObjectNameSet()", - allSet, allObjectNameSet); - - printElapsed("testQueryAll_AMXMatchesObjectName", start); - } - - - public void - testGetQueryMgr() { - assert (getQueryMgr() != null); - } - - public void - testQueryAll() { - final long start = now(); - final Set result = getQueryMgr().queryAllSet(); - - assert (result.size() > 1); - - printElapsed("testQueryAll", start); - } - - public void - testGetJ2EETypeObjectNames() - throws Exception { - final long start = now(); - - final Set j2eeTypes = getTestUtil().getAvailJ2EETypes(); - for (final String j2eeType : j2eeTypes) { - final Set results = - getQueryMgr().queryJ2EETypeSet(j2eeType); - assert (results.size() >= 1); - } - - printElapsed("testGetJ2EETypeObjectNames", start); - } - - public void - testGetJ2EETypeProxies() - throws Exception { - final long start = now(); - final Set j2eeTypes = getTestUtil().getAvailJ2EETypes(); - - for (final String j2eeType : j2eeTypes) { - final Set proxies = - getQueryMgr().queryJ2EETypeSet(j2eeType); - - assert (proxies != null); - } - - printElapsed("testGetJ2EETypeProxies", start); - } - - public void - testQueryPatternProxies() - throws Exception { - final long start = now(); - - final Set proxies = getQueryMgr().queryPropsSet("*"); - - assert proxies != null; - - printElapsed("testQueryPatternProxies", start); - } - - private Set - getAllInterfaceNames(final Set amxSet) { - final Set interfaceNames = new HashSet(); - for (final T amx : amxSet) { - interfaceNames.add(Util.getExtra(amx).getInterfaceName()); - } - - return (interfaceNames); - } - - /** - Final all available interfaces, then for each type of interface, query - for all items that have the interface and verify that's the interface - they return from getInterfaceName(). - */ - public void - testQueryInterfaceObjectNames() - throws Exception { - final long start = now(); - - final QueryMgr queryMgr = getQueryMgr(); - final Set allAMX = getQueryMgr().queryAllSet(); - final Set allAMXObjectNames = Util.toObjectNames(allAMX); - final Set interfaceNames = getAllInterfaceNames(allAMX); - - for (final String interfaceName : interfaceNames) { - final Set amxs = queryMgr.queryInterfaceSet(interfaceName, allAMXObjectNames); - - final Iterator amxIter = amxs.iterator(); - while (amxIter.hasNext()) { - final AMX amx = Util.asAMX(amxIter.next()); - assert (interfaceName.equals(Util.getExtra(amx).getInterfaceName())); - } - } - - printElapsed("testQueryInterfaceObjectNames", start); - } - - -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/UploadDownloadMgrTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/UploadDownloadMgrTest.java deleted file mode 100644 index 8543639567e..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/base/UploadDownloadMgrTest.java +++ /dev/null @@ -1,374 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/base/UploadDownloadMgrTest.java,v 1.5 2007/05/05 05:23:53 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:23:53 $ -*/ -package org.glassfish.admin.amxtest.base; - -import com.sun.appserv.management.base.UploadDownloadMgr; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; -import org.glassfish.admin.amxtest.PropertyKeys; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; - - -/** - Tests {@link UploadDownloadMgr}. -

    - NOTE: multiple uploads and downloads are designed to test the thread-safeness - of the MBean. - */ -public final class UploadDownloadMgrTest - extends AMXTestBase { - public UploadDownloadMgrTest() - throws IOException { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - public UploadDownloadMgr - getUploadDownloadMgr() { - return (getDomainRoot().getUploadDownloadMgr()); - } - - - public Object - upload( - final String name, - final int totalSize) - throws IOException { - final UploadDownloadMgr mgr = getUploadDownloadMgr(); - //mgr.setTrace( true ); - - final int chunkSize = 32 * 1024; - - final long start = now(); - - final Object uploadID = mgr.initiateUpload(name, totalSize); - int remaining = totalSize; - boolean done = false; - while (remaining != 0) { - final int actual = remaining < chunkSize ? remaining : chunkSize; - - final byte[] bytes = new byte[actual]; - done = mgr.uploadBytes(uploadID, bytes); - remaining -= actual; - //trace( "uploaded: " + (totalSize - remaining) ); - } - assert (done); - - printElapsed("UploadDownloadMgr.upload: " + totalSize + " bytes", start); - return (uploadID); - } - - - private File - createTempFile(final long totalSize) - throws IOException { - final long start = now(); - - final File temp = File.createTempFile("UploadDownloadMgrTest", "junk"); - - temp.deleteOnExit(); - - final FileOutputStream os = new FileOutputStream(temp); - - try { - long remaining = totalSize; - - final byte[] junk = new byte[1024 * 1024]; - - while (remaining != 0) { - final long actual = remaining < junk.length ? remaining : junk.length; - - os.write(junk, 0, (int) actual); - remaining -= actual; - } - os.close(); - } - catch (IOException e) { - os.close(); - temp.delete(); - throw e; - } - - assert (temp.length() == totalSize); - - printElapsed("UploadDownloadMgr.createTempFile: " + - totalSize + " bytes", start); - return (temp); - } - - public File - testDownloadFile( - final int testSize, - final int chunkSize) - throws IOException { - final UploadDownloadMgr mgr = - getDomainRoot().getUploadDownloadMgr(); - - final File testFile = createTempFile(testSize); - - final long start = now(); - final Object id = mgr.initiateDownload(testFile, true); - - //trace( "initated download for: " + id + " file = " + testFile.toString() ); - final int maxChunkSize = mgr.getMaxDownloadChunkSize(); - final int actualChunkSize = chunkSize < maxChunkSize ? - chunkSize : maxChunkSize; - - final long length = mgr.getDownloadLength(id); - long doneSoFar = 0; - while (doneSoFar < length) { - final byte[] bytes = mgr.downloadBytes(id, actualChunkSize); - doneSoFar += bytes.length; - } - - printElapsed("UploadDownloadMgr.testDownloadFile: " + - testSize + " bytes" + " chunksize = " + actualChunkSize, start); - return (testFile); - } - - private final int K = 1024; - private final int MEGABYTE = K * K; - - public void - testDownloadFileBufferSameSizeSmallerThanDownload() - throws IOException { - final int size = 256 * K; - - testDownloadFile(size, size - 1); - } - - public void - testDownloadFileBufferSameSizeAsDownload() - throws IOException { - final int size = 256 * K; - testDownloadFile(size, size); - } - - public void - testDownloadFileBufferLargerThanDownload() - throws IOException { - final int size = 256 * K; - testDownloadFile(size, size + 1); - } - - public void - testDownloadSmallFile() - throws IOException { - final int size = 50 * K; - testDownloadFile(size, size + 1); - testDownloadFile(size, size); - } - - - public void - testDownloadTinyFile() - throws IOException { - final int size = 1; - testDownloadFile(size, size + 1); - testDownloadFile(size, size); - } - - public void - testDownloadBigFile() - throws IOException { - final long start = now(); - Integer def = new Integer(PropertyKeys.DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB); - final int kb = - getEnvInteger(PropertyKeys.UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB, def).intValue(); - assert (kb >= 1) : - "Test size must be positive, value for " + - PropertyKeys.UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB + - ": " + kb; - - testDownloadFile(kb * K, MEGABYTE); - - printElapsed("UploadDownloadMgrTest.testDownloadBigFile: " + kb + "kb", start); - } - - - private final class UploadDownloadTestThread - extends Thread { - Throwable mThrowable; - boolean mDone; - final int mLength; - long mElapsed; - - public UploadDownloadTestThread(final int length) { - mThrowable = null; - mDone = false; - mLength = length; - mElapsed = 0; - } - - public void - run() { - mDone = false; - try { - final long start = System.currentTimeMillis(); - - final File f = testDownloadFile(mLength, 1 * K); - upload(f.toString(), mLength); - - mElapsed = System.currentTimeMillis() - start; - } - catch (Throwable t) { - mThrowable = t; - } - mDone = true; - } - - long - getLength() { - return mLength; - } - - long - getElapsed() { - return mElapsed; - } - - Throwable - getThrowable() { - return (mThrowable); - } - - public boolean - done() { - return (mDone); - } - } - - /** - This test is an attempt to find any synchronization bugs. - */ - public void - testHeavilyThreaded() - throws IOException { - Integer def = new Integer(PropertyKeys.DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_THREADS); - - int numThreads = getEnvInteger(PropertyKeys.UPLOAD_DOWNLOAD_MGR_TEST_THREADS, def).intValue(); - if (numThreads <= 0) { - numThreads = 1; - } - - printVerbose("UploadDownloadMgrTest.testHeavilyThreaded: using " + numThreads + " threads."); - - final UploadDownloadTestThread[] threads = - new UploadDownloadTestThread[numThreads]; - - // create and start all the threads - for (int i = 0; i < numThreads; ++i) { - threads[i] = new UploadDownloadTestThread(i * K + 1); - threads[i].start(); - } - - // wait till done - boolean done = false; - while (true) { - int numDone = 0; - for (int i = 0; i < numThreads; ++i) { - if (threads[i].done()) { - ++numDone; - } - } - - if (numDone == numThreads) { - break; - } - - printVerbose("UploadDownloadMgrTest.testHeavilyThreaded: waiting for " + - (numThreads - numDone) + " of " + numThreads + " threads "); - mySleep(1000); - } - - // verify success - for (int i = 0; i < numThreads; ++i) { - assert (threads[i].done()); - assert (threads[i].getThrowable() == null) : - ExceptionUtil.getStackTrace(threads[i].getThrowable()); - } - - } - - public void - testUploadFile1() - throws IOException { - final Object id = upload("./deploy.temp1." + now(), 1024 * K); - } - - public void - testUploadFile2() - throws IOException { - final Object id = upload("./deploy.temp2." + now(), 1 + 100 * K); - } - - public void - testUploadFile3() - throws IOException { - final Object id = upload("./deploy.temp3." + now(), 1); - } - - public void - testUploadFile4() - throws IOException { - final Object id = upload("./deploy.temp4." + now(), K + 1); - } - - public void - testUploadFile5() - throws IOException { - final Object id = upload(null, 1 + 2048 * K); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/AppserverConnectionSourceTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/AppserverConnectionSourceTest.java deleted file mode 100644 index 5169d5f09e1..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/AppserverConnectionSourceTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/client/AppserverConnectionSourceTest.java,v 1.5 2007/05/05 05:23:53 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:23:53 $ -*/ -package org.glassfish.admin.amxtest.client; - -import com.sun.appserv.management.client.AppserverConnectionSource; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import java.io.IOException; - -/** - Tests AppserverConnectionSource. -

    - Note that no actual connect test can be done through normal junit tests since there - is no host/port available and no guarantee of a running server. All other aspects - can be tested. - */ -public final class AppserverConnectionSourceTest - extends AMXTestBase { - public AppserverConnectionSourceTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - private static void - testConnect( - final String host, - final int port, - final String protocol, - final String user, - final String password) - throws IOException { - final AppserverConnectionSource source = - new AppserverConnectionSource(protocol, host, port, user, password, null); - - source.getMBeanServerConnection(true); - - } - - public void - testConnect() - throws Exception { - final String host = (String) getEnvValue("HOST"); - final String port = (String) getEnvValue("PORT"); - final String protocol = (String) getEnvValue("PROTOCOL"); - final String user = (String) getEnvValue("USER"); - final String password = (String) getEnvValue("PASSWORD"); - - if (host == null || port == null || protocol == null || - user == null || password == null || - !AppserverConnectionSource.isSupportedProtocol(protocol)) { - trace("AppserverConnectionSourceTest: skipped connect test; missing config:" + - "host = " + host + - ", port = " + port + - ", protocol = " + protocol + - ", user = " + user + - ", password = " + password); - } else { - testConnect(host, new Integer(port).intValue(), protocol, user, password); - } - } - - private AppserverConnectionSource - create(final String protocol) { - return (new AppserverConnectionSource(protocol, "localhost", 9999, "admin", "admin123", null)); - } - - public void - testCreateS1ASHTTP() { - create(AppserverConnectionSource.PROTOCOL_HTTP); - } - - public void - testCreateRMI() { - create(AppserverConnectionSource.PROTOCOL_RMI); - } - - public void - testCreateIllegal() { - try { - create("jmxmp"); - } - catch (IllegalArgumentException e) { - // good - } - } - - public void - testToString() { - create(AppserverConnectionSource.PROTOCOL_RMI).toString(); - create(AppserverConnectionSource.PROTOCOL_HTTP).toString(); - } -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/MiscTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/MiscTest.java deleted file mode 100644 index f04ba998c85..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/MiscTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.client; - -import com.sun.appserv.management.base.NotificationService; -import com.sun.appserv.management.base.NotificationServiceMgr; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.InstanceNotFoundException; -import javax.management.MBeanInfo; -import javax.management.ObjectName; -import java.io.IOException; - - -/** - */ -public final class MiscTest - extends AMXTestBase { - public MiscTest() - throws IOException { - } - - public void - testMBeanInfo() { - final MBeanInfo info = new MBeanInfo( - "foo.bar", - null, - null, - null, - null, - null); - - assert (info.getNotifications() != null); - assert (info.getOperations() != null); - assert (info.getAttributes() != null); - assert (info.getConstructors() != null); - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - /** - Hangs were occuring in getPropertyNames(). Repeatedly invoke it to see if the hang - can be reproduced. - public void - testGetPropertyNames() - throws ClassNotFoundException - { - final Set s = getQueryMgr().queryInterfaceSet( PropertiesAccess.class.getName(), null ); - - for( int i = 0; i < 5000; ++i ) - { - final Iterator iter = s.iterator(); - while ( iter.hasNext() ) - { - final PropertiesAccess pa = (PropertiesAccess)iter.next(); - - pa.getPropertyNames(); - } - } - } - */ - - - /** - Verify that when an MBean is removed, the proxy - throws an InstanceNotFoundException. This test is included here because - it otherwise causes problems when running other unit tests that want to operate - on all MBeans--this test creates and removes one, which causes the other - tests to fail. - */ - public void - testProxyDetectsMBeanRemoved() - throws InstanceNotFoundException { - // use the NotificationServiceMgr as a convenient way of making - // an MBean (a NotificationService) come and go. - final NotificationServiceMgr mgr = getDomainRoot().getNotificationServiceMgr(); - - final NotificationService ns = mgr.createNotificationService("UserData", 10); - assert (ns.getUserData().equals("UserData")); - final ObjectName nsObjectName = Util.getObjectName(ns); - - mgr.removeNotificationService(ns.getName()); - try { - // all calls should fail - Util.getObjectName(ns); - ns.getName(); - ns.getUserData(); - failure("expecting exception due to missing MBean"); - } - catch (Exception e) { - // root cause should be an InstanceNotFoundException containing the ObjectName - final Throwable t = ExceptionUtil.getRootCause(e); - assert (t instanceof InstanceNotFoundException); - final InstanceNotFoundException inf = (InstanceNotFoundException) t; - - final String msg = inf.getMessage(); - final int objectNameStart = msg.indexOf("amx:"); - final String objectNameString = msg.substring(objectNameStart, msg.length()); - - final ObjectName on = Util.newObjectName(objectNameString); - - assert (on.equals(nsObjectName)); - } - } - - - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/PerformanceTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/PerformanceTest.java deleted file mode 100644 index e06f9215fd3..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/PerformanceTest.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/client/PerformanceTest.java,v 1.8 2007/05/05 05:23:53 tcfujii Exp $ -* $Revision: 1.8 $ -* $Date: 2007/05/05 05:23:53 $ -*/ -package org.glassfish.admin.amxtest.client; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.Sample; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.SSLConfig; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.ClassUtil; -import com.sun.appserv.management.util.stringifier.ArrayStringifier; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -/** - Note that the tests are synchronized so that the performance numbers - are not affected by concurrent tests. - */ -public final class PerformanceTest - extends AMXTestBase { - private static boolean BASELINE_DONE = false; - - private static final int K = 1024; - private static final int MB = K * K; - - private void - printPerf(final String s) { - trace(s); - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(true); - } - - public void - baselineTest(final MBeanServerConnection conn) - throws IOException { - if (!BASELINE_DONE) { - synchronized (PerformanceTest.class) { - BASELINE_DONE = true; - - printPerf("--- Baseline statistics for connection --- "); - - final ObjectName delegateObjectName = JMXUtil.getMBeanServerDelegateObjectName(); - final int ITER = 1000; - final long start = now(); - for (int i = 0; i < ITER; ++i) { - conn.isRegistered(delegateObjectName); - } - printPerf("Time to call MBeanServerConnection.isRegistered() " + ITER + " times: " + (now() - start) + " ms"); - - final Sample sample = (Sample) getDomainRoot().getContainee(XTypes.SAMPLE); - - final int BANDWIDTH_ITER = 3; - - for (int i = 0; i < BANDWIDTH_ITER; ++i) { - // test upload bandwidth - final byte[] uploadBytes = new byte[1 * MB]; - final long uploadStart = now(); - sample.uploadBytes(uploadBytes); - final long uploadElapsed = now() - uploadStart; - final int uploadKBPerSec = (int) ((uploadBytes.length / 1024.0) / (uploadElapsed / 1000.0)); - printPerf("Upload bandwidth (" + uploadBytes.length + " bytes): " + uploadKBPerSec + "kb/sec"); - - // test download bandwidth - final long downloadStart = now(); - final byte[] downloadedBytes = sample.downloadBytes(256 * K); - final long downloadElapsed = now() - downloadStart; - final int downloadKBPerSec = (int) ((downloadedBytes.length / 1024.0) / (downloadElapsed / 1000.0)); - printPerf("Download bandwidth (" + uploadBytes.length + " bytes): " + downloadKBPerSec + "kb/sec\n"); - } - - testTransferSizePerformance(conn); - } - } - } - - - private void - testTransferSizePerformance(final MBeanServerConnection conn) - throws IOException { - final Sample sample = (Sample) getDomainRoot().getContainee(XTypes.SAMPLE); - - final int ITER = 10; - final int TEST_SIZE = 4 * MB; - - printPerf("Upload bandwidth, test size = " + (TEST_SIZE / (float) (MB)) + "MB X " + ITER + " iterations."); - - for (int chunkSize = 8 * K; chunkSize <= TEST_SIZE; chunkSize *= 2) { - final byte[] chunk = new byte[chunkSize]; - - long totalElapsed = 0; - for (int iter = 0; iter < ITER; ++iter) { - final long uploadStart = now(); - int total = 0; - while (total < TEST_SIZE) { - sample.uploadBytes(chunk); - total += chunk.length; - } - final long uploadElapsed = now() - uploadStart; - totalElapsed += uploadElapsed; - } - - final int uploadKBPerSec = (int) ((ITER * TEST_SIZE / (float) K) / (totalElapsed / 1000.0)); - printPerf("Upload bandwidth (" + chunkSize / K + "K chunks): " + uploadKBPerSec + "kb/sec"); - } - } - - public PerformanceTest() { - try { - final MBeanServerConnection conn = - Util.getExtra(getDomainRoot()).getConnectionSource().getMBeanServerConnection(false); - - baselineTest(conn); - } - catch (IOException e) { - System.err.print("Caught exception: " + e); - } - } - - private Method - findMethod( - final Object target, - final String methodName, - final Object[] args) - throws IllegalAccessException, InvocationTargetException { - final Method[] methods = target.getClass().getDeclaredMethods(); - - final int numArgs = args == null ? 0 : args.length; - Method testMethod = null; - for (int i = 0; i < methods.length; ++i) { - final Method method = methods[i]; - - if (method.getName().equals(methodName) && - method.getParameterTypes().length == numArgs) { - testMethod = method; - break; - } - } - - if (testMethod == null) { - throw new IllegalArgumentException("Can't find method: " + methodName); - } - return (testMethod); - } - - private String - getMethodString( - final Method m, - final Object[] args) { - String result = null; - - if (args == null || args.length == 0) { - result = m.getName() + "()"; - } else { - result = m.getName() + "(" + ArrayStringifier.stringify(args, ", ") + ")"; - } - - return result; - } - - private void - testMethod( - final AMX target, - final String methodName, - final Object[] args, - final int additionalIterations) - throws IllegalAccessException, InvocationTargetException { - final String interfaceName = - ClassUtil.stripPackagePrefix(Util.getExtra(target).getInterfaceName()); - - final Method testMethod = findMethod(target, methodName, args); - - final long start = now(); - final Object resultFirst = testMethod.invoke(target, args); - final long elapsedFirst = now() - start; - - String msg = interfaceName + "." + getMethodString(testMethod, args) + - ": " + elapsedFirst + "ms"; - - if (additionalIterations != 0) { - final long iterStart = now(); - for (int i = 0; i < additionalIterations - 1; ++i) { - final Object result = testMethod.invoke(target, args); - } - final long iterElapsed = now() - iterStart; - - msg = msg + ", " + additionalIterations + " additional iterations: " + iterElapsed + "ms"; - } - - printPerf(msg); - } - - - public synchronized void - xtestQueryMgr() - throws IllegalAccessException, InvocationTargetException { - final DomainRoot domainRoot = getDomainRoot(); - final QueryMgr queryMgr = domainRoot.getQueryMgr(); - - final String domain = Util.getObjectName(queryMgr).getDomain(); - - printPerf("-- QueryMgr --- "); - - testMethod(domainRoot, "getQueryMgr", null, 1000); - - final int ITER = 20; - testMethod(queryMgr, "queryAllSet", null, ITER); - testMethod(queryMgr, "querySingletonJ2EEType", new Object[]{XTypes.BULK_ACCESS}, ITER); - testMethod(queryMgr, "queryJ2EETypeSet", new Object[]{XTypes.SSL_CONFIG}, ITER); - testMethod(queryMgr, "queryJ2EENameSet", new Object[]{"server"}, ITER); - testMethod(queryMgr, "queryJ2EETypeNames", new Object[]{XTypes.CONFIG_CONFIG}, ITER); - testMethod(queryMgr, "queryPatternSet", new Object[]{domain, "j2eeType=" + XTypes.SERVLET_MONITOR}, ITER); - testMethod(queryMgr, "queryInterfaceSet", new Object[]{SSLConfig.class.getName(), null}, ITER); - } - - /* - public synchronized void - testTargets() - throws IllegalAccessException, InvocationTargetException - { - DomainConfig domainConfig = getDomainRoot().getDomainConfig(); - - final long start = now(); - - final int ITER = 100; - for( int i = 0; i < ITER; ++i ) - { - final Mapxxx servers = domainConfig.getStandaloneServerConfigMap(); - final Mapxxx clusters = domainConfig.getClusterConfigMap(); - - final String[] serverNames = GSetUtil.toStringArray( servers.keySet() ); - final String[] clusterNames = GSetUtil.toStringArray( clusters.keySet() ); - } - - final long elapsed = now() - start; - printPerf( "testTargets: " + ITER + " iterations: " + elapsed); - } - */ - - public synchronized void - xtestDomainConfig() - throws IllegalAccessException, InvocationTargetException { - final DomainRoot domainRoot = getDomainRoot(); - final DomainConfig domainConfig = domainRoot.getDomainConfig(); - - printPerf("-- DomainConfig --- "); - - final int ITER = 20; - - testMethod(domainConfig, "getNodeAgentConfigMap", null, ITER); - testMethod(domainConfig, "getConfigConfigMap", null, ITER); - testMethod(domainConfig, "getStandaloneServerConfigMap", null, ITER); - testMethod(domainConfig, "getClusteredServerConfigMap", null, ITER); - testMethod(domainConfig, "getServerConfigMap", null, ITER); - testMethod(domainConfig, "getClusterConfigMap", null, ITER); - - testMethod(domainConfig, "getCustomResourceConfigMap", null, ITER); - testMethod(domainConfig, "getJNDIResourceConfigMap", null, ITER); - testMethod(domainConfig, "getPersistenceManagerFactoryResourceConfigMap", null, ITER); - testMethod(domainConfig, "getJDBCResourceConfigMap", null, ITER); - testMethod(domainConfig, "getJDBCConnectionPoolConfigMap", null, ITER); - testMethod(domainConfig, "getConnectorResourceConfigMap", null, ITER); - testMethod(domainConfig, "getConnectorConnectionPoolConfigMap", null, ITER); - testMethod(domainConfig, "getAdminObjectResourceConfigMap", null, ITER); - testMethod(domainConfig, "getResourceAdapterConfigMap", null, ITER); - testMethod(domainConfig, "getMailResourceConfigMap", null, ITER); - testMethod(domainConfig, "getJ2EEApplicationConfigMap", null, ITER); - testMethod(domainConfig, "getEJBModuleConfigMap", null, ITER); - testMethod(domainConfig, "getWebModuleConfigMap", null, ITER); - testMethod(domainConfig, "getRARModuleConfigMap", null, ITER); - testMethod(domainConfig, "getAppClientModuleConfigMap", null, ITER); - testMethod(domainConfig, "getLifecycleModuleConfigMap", null, ITER); - } - -} - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/ProxyFactoryTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/ProxyFactoryTest.java deleted file mode 100644 index 7a93347d824..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/ProxyFactoryTest.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/client/ProxyFactoryTest.java,v 1.5 2007/05/05 05:23:54 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:23:54 $ -*/ -package org.glassfish.admin.amxtest.client; - -import com.sun.appserv.management.base.NotificationService; -import com.sun.appserv.management.base.NotificationServiceMgr; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.client.ProxyFactory; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.InstanceNotFoundException; -import javax.management.ObjectName; - - -/** - */ -public final class ProxyFactoryTest - extends AMXTestBase { - public ProxyFactoryTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - - /** - Verify that when an MBean is removed, the ProxyFactory - detects this, and removes any proxy from its cache. - */ - public void - testProxyFactoryDetectsMBeanRemoved() - throws InstanceNotFoundException { - // use the NotificationServiceMgr as a convenient way of making - // an MBean (a NotificationService) come and go. - final NotificationServiceMgr mgr = getDomainRoot().getNotificationServiceMgr(); - final NotificationService ns = mgr.createNotificationService("UserData", 10); - final ObjectName nsObjectName = Util.getObjectName(ns); - assert (ns.getUserData().equals("UserData")); - - final ProxyFactory factory = getProxyFactory(); - final NotificationService proxy = - factory.getProxy(nsObjectName, NotificationService.class, false); - assert (proxy == ns) : "proxies differ: " + ns + "\n" + proxy; - - mgr.removeNotificationService(ns.getName()); - - int iterations = 0; - long sleepMillis = 10; - while (factory.getProxy(nsObjectName, NotificationService.class, false) != null) { - mySleep(sleepMillis); - if (sleepMillis >= 400) { - trace("testProxyFactoryDetectsMBeanRemoved: waiting for proxy to be removed"); - } - sleepMillis *= 2; - } - } -} - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/ProxyTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/ProxyTest.java deleted file mode 100644 index 61c7053a25b..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/client/ProxyTest.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/client/ProxyTest.java,v 1.10 2007/05/05 05:23:54 tcfujii Exp $ -* $Revision: 1.10 $ -* $Date: 2007/05/05 05:23:54 $ -*/ -package org.glassfish.admin.amxtest.client; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.AttributeNotFoundException; -import javax.management.ObjectName; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -/** - */ -public final class ProxyTest - extends AMXTestBase { - public ProxyTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - - public void - checkCreateProxy(final ObjectName src) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(src, AMX.class); - - Util.getObjectName(proxy); - proxy.getContainer(); - proxy.getDomainRoot(); - } - - public void - testCreateAllProxies() - throws Exception { - testAll("checkCreateProxy"); - } - - public void - checkProxiesCached(final ObjectName src) - throws Exception { - final AMX proxy = getProxyFactory().getProxy(src, AMX.class); - - assert (proxy == getProxyFactory().getProxy(src, AMX.class)); - assert (proxy.getContainer() == proxy.getContainer()); - assert (proxy.getDomainRoot() == proxy.getDomainRoot()); - - final Class interfaceClass = getInterfaceClass(proxy); - final Method[] proxyMethods = interfaceClass.getMethods(); - - for (int methodIdx = 0; methodIdx < proxyMethods.length; ++methodIdx) { - final Method method = proxyMethods[methodIdx]; - final String methodName = method.getName(); - - if (isProxyGetter(method)) { - // invoke it twice, and verify that the 2nd call results in the same proxy - //trace( "Invoking: " + method ); - method.invoke(proxy, (Object[]) null); - } - } - } - - public void - testProxiesCached() - throws Exception { - testAll("checkProxiesCached"); - } - - - private boolean - isProxyGetter(final Method method) { - return ( - method.getName().startsWith(JMXUtil.GET) && - method.getParameterTypes().length == 0 && - AMX.class.isAssignableFrom(method.getReturnType())); - } - - private boolean - isChildProxyGetter(final Method method) { - final Class[] paramTypes = method.getParameterTypes(); - - return ( - paramTypes.length == 1 && - paramTypes[0] == String.class && - AMX.class.isAssignableFrom(method.getReturnType())); - } - - private boolean - isProxiesGetter(final Method method) { - return ( - method.getParameterTypes().length == 0 && - Set.class.isAssignableFrom(method.getReturnType())); - } - - - private String - getProxyGetterName(final String getterName) { - final int baseLength = getterName.length() - "ObjectName".length(); - final String baseName = getterName.substring(0, baseLength); - - return (baseName + "Proxy"); - } - - - public void - testProxyInterfaceIsAMX() - throws Exception {/* - final long start = now(); - final TypeInfos infos = TypeInfos.getInstance(); - - final Iterator iter = infos.getJ2EETypes().iterator(); - while ( iter.hasNext() ) - { - final TypeInfo info = infos.getInfo( (String)iter.next() ); - final Class proxyClass = info.getInterface(); - - if ( ! AMX.class.isAssignableFrom( proxyClass ) ) - { - warning( "Proxy interface does not extend AMX: " + proxyClass.getName() ); - } - } - printElapsed( "testProxyInterfaceNameConsistent", start ); - */ - } - - - /** - Verify that every getXXX() method can be called (those without parameters). - */ - public void - testProxyGetters(final AMX proxy) - throws ClassNotFoundException { - final Method[] methods = getInterfaceClass(proxy).getMethods(); - - final List failedMethods = new ArrayList(); - final List exceptions = new ArrayList(); - - final long start = now(); - - for (int methodIdx = 0; methodIdx < methods.length; ++methodIdx) { - final Method method = methods[methodIdx]; - final String methodName = method.getName(); - final Class[] parameterTypes = method.getParameterTypes(); - - if (methodName.startsWith(JMXUtil.GET) && parameterTypes.length == 0) { - try { - final Object result = method.invoke(proxy, (Object[]) null); - //trace( methodName + "=" + result); - } - catch (Throwable t) { - final ObjectName objectName = Util.getObjectName(proxy); - if (isRemoteIncomplete(objectName)) { - trace("remoteIncomplete: " + objectName); - } else { - trace("failure: " + methodName + " = " + t.getClass().getName() + " on MBean " + objectName ); - failedMethods.add(method); - exceptions.add(t); - } - } - } - } - final long elapsed = now() - start; - //printVerbose( "testProxyGetters for: " + Util.getObjectName( proxy ) + " = " + elapsed ); - - if (failedMethods.size() != 0) { - final int numFailed = failedMethods.size(); - - trace("\nMBean \"" + Util.getObjectName(proxy) + "\" failed for:"); - for (int i = 0; i < numFailed; ++i) { - final Method m = (Method) failedMethods.get(i); - final Throwable t = (Throwable) exceptions.get(i); - - final Throwable rootCause = ExceptionUtil.getRootCause(t); - final String rootTrace = ExceptionUtil.getStackTrace(rootCause); - final Class rootCauseClass = rootCause.getClass(); - - trace("testProxyGetters: failure from: " + m.getName() + ": " + rootCauseClass.getName()); - if (rootCauseClass != AttributeNotFoundException.class) { - trace(rootTrace + "\n"); - } - } - } - } - - public void - testAllGetters() - throws Exception { - final long start = now(); - - final Set proxies = getAllAMX(); - for (final AMX amx : proxies) { - testProxyGetters(amx); - } - - printElapsed("testAllGetters", start); - } - - - public void - testQueryMgr() - throws Exception { - final QueryMgr proxy = (QueryMgr) getQueryMgr(); - Util.getObjectName(proxy); - proxy.getContainer(); - proxy.getDomainRoot(); - } - - public void - testDomainRootCachedProxies() - throws Exception { - final DomainRoot root = (DomainRoot) getDomainRoot(); - - assert (root.getJ2EEDomain() == root.getJ2EEDomain()); - assert (root.getDomainConfig() == root.getDomainConfig()); - assert (root.getQueryMgr() == root.getQueryMgr()); - assert (root.getBulkAccess() == root.getBulkAccess()); - assert (root.getUploadDownloadMgr() == root.getUploadDownloadMgr()); - assert (root.getDottedNames() == root.getDottedNames()); - - assert (root.getJ2EEDomain() == root.getJ2EEDomain()); - } - - /** - This test is designed to check that performance is reasonable and/or - to detect a change that slows things down drastically. - public void - */ - public void - testProxyTime() - throws Exception { - final DomainRoot root = (DomainRoot) getDomainRoot(); - - final long start = now(); - for (int i = 0; i < 5; ++i) { - root.getContainer(); - root.getDomainRoot(); - - root.getJ2EEDomain(); - root.getDomainConfig(); - root.getQueryMgr(); - root.getBulkAccess(); - root.getUploadDownloadMgr(); - root.getDottedNames(); - } - final long elapsed = now() - start; - - // should be < 300 ms, so this is a 10X margin... - assert (elapsed < 300 * 10 ); - } -} - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AdminObjectResourceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AdminObjectResourceConfigTest.java deleted file mode 100644 index 677075943bc..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AdminObjectResourceConfigTest.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.AdminObjectResourceConfig; -import com.sun.appserv.management.config.DomainConfig; - -import java.util.Map; - -/** - */ -public final class AdminObjectResourceConfigTest - extends ResourceConfigTestBase { - private static final String ADM_OBJ_RES_TYPE = "user"; - private static final String ADM_OBJ_RES_ADAPTER = "cciblackbox-tx"; - - - public AdminObjectResourceConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("AdminObjectResourceConfig"); - } - - public static AdminObjectResourceConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - AdminObjectResourceConfig result = - domainConfig.getResourcesConfig().getAdminObjectResourceConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance( - domainConfig, - getDefaultInstanceName(), - ADM_OBJ_RES_TYPE, - ADM_OBJ_RES_ADAPTER, - null); - } - - return result; - } - - public static AdminObjectResourceConfig - createInstance( - final DomainConfig domainConfig, - final String name, - final String resType, - final String resAdapter, - final Map optional) { - return domainConfig.getResourcesConfig().createAdminObjectResourceConfig(name, - resType, resAdapter, optional); - } - - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.ADMIN_OBJECT_RESOURCE_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getDomainConfig().getResourcesConfig().removeAdminObjectResourceConfig(name); - } - - protected String - getProgenyTestName() { - return ("jndi/AdminObjectResourceConfigMgrTest"); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final AdminObjectResourceConfig config = getDomainConfig().getResourcesConfig().createAdminObjectResourceConfig( - name, - ADM_OBJ_RES_TYPE, - ADM_OBJ_RES_ADAPTER, - options); - - addReference(config); - - return (config); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AuditModuleConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AuditModuleConfigTest.java deleted file mode 100644 index 61d67d764cf..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AuditModuleConfigTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/AuditModuleConfigTest.java,v 1.6 2007/05/05 05:23:54 tcfujii Exp $ -* $Revision: 1.6 $ -* $Date: 2007/05/05 05:23:54 $ -*/ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.AuditModuleConfig; -import com.sun.appserv.management.config.SecurityServiceConfig; - -import java.util.Map; - - -/** - */ -public final class AuditModuleConfigTest - extends ConfigMgrTestBase { - static final String CLASSNAME = "com.sun.enterprise.security.Audit"; - - public AuditModuleConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getConfigConfig().getSecurityServiceConfig()); - } - } - - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("AuditModuleConfig"); - } - - - public static AuditModuleConfig - ensureDefaultInstance(final SecurityServiceConfig securityServiceConfig) { - AuditModuleConfig result = - securityServiceConfig.getAuditModuleConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(securityServiceConfig, - getDefaultInstanceName(), CLASSNAME, false, null); - } - - return result; - } - - public static AuditModuleConfig - createInstance( - final SecurityServiceConfig securityServiceConfig, - final String name, - final String classname, - final boolean enabled, - final Map optional) { - return securityServiceConfig.createAuditModuleConfig( - name, CLASSNAME, enabled, null); - } - - - protected Container - getProgenyContainer() { - return getConfigConfig().getSecurityServiceConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.AUDIT_MODULE_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getConfigConfig().getSecurityServiceConfig().removeAuditModuleConfig(name); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - return getConfigConfig().getSecurityServiceConfig().createAuditModuleConfig(name, CLASSNAME, false, options); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AuthRealmConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AuthRealmConfigTest.java deleted file mode 100644 index 6d3c83bc1ac..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AuthRealmConfigTest.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.AuthRealmConfig; -import static com.sun.appserv.management.config.AuthRealmConfig.*; -import com.sun.appserv.management.config.SecurityServiceConfig; -import com.sun.appserv.management.util.misc.CollectionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - - -/** - */ -public final class AuthRealmConfigTest - extends ConfigMgrTestBase { - public AuthRealmConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getConfigConfig().getSecurityServiceConfig()); - } - } - - private static boolean WARNED_TESTABLE = false; - - private static final String TEMPLATE_PREFIX = "${"; - - private synchronized Map - getTestableAuthRealms() { - final Map m = - getConfigConfig().getSecurityServiceConfig().getAuthRealmConfigMap(); - - final Map std = new HashMap(); - final List warnings = new ArrayList(); - for (final String name : m.keySet()) { - final AuthRealmConfig c = m.get(name); - - if (AuthRealmConfig.DEFAULT_REALM_CLASSNAME.equals(c.getClassname())) { - try { - final String file = c.getPropertyConfigMap().get("file").getValue(); - if (file == null) { - warnings.add("Realm " + name + - " does not have a 'file' property (test skipped)"); - } else if (file.indexOf(TEMPLATE_PREFIX) >= 0) { - warnings.add("Realm " + name + - " uses a ${...} name, not yet supported (test skipped)"); - } else { - std.put(c.getName(), c); - } - } - catch (Exception e) { - } - } - } - - if (!WARNED_TESTABLE) { - WARNED_TESTABLE = true; - warning(NEWLINE + CollectionUtil.toString(warnings, NEWLINE) + NEWLINE + - "Realms which WILL be tested: {" + CollectionUtil.toString(m.keySet()) + "}"); - } - - return std; - } - - public synchronized void - testGetters() { - final Map arcMap = getTestableAuthRealms(); - - for (final AuthRealmConfig ar : arcMap.values()) { - ar.getName(); - final String classname = ar.getClassname(); - if (classname != null) { - ar.setClassname(classname); - } - } - } - - private boolean - userExists( - final AuthRealmConfig config, - final String user) { - warning( "testAddRemoveUpdateUser.userExists(): NO API exists to getUserNames()" ); - //return GSetUtil.newStringSet((String[]) config.getUserNames()).contains(user); - return false; - } - - public synchronized void - testAddRemoveUpdateUser() - throws Exception { - - warning( "testAddRemoveUpdateUser.AuthRealmConfigTest(): NO API exists to add/remove users" ); - /* - final Map arcMap = getTestableAuthRealms(); - - final String USER = "test"; - - final Set failures = new HashSet(); - - for (final AuthRealmConfig ar : arcMap.values()) { - //printVerbose( "TESTING: " + ar.getName() ); - - try { - ar.getUserNames(); - - if (userExists(ar, USER)) { - ar.removeUser(USER); - } - - ar.addUser(USER, "foo-pwd", null); - assert (userExists(ar, USER)); - ar.updateUser(USER, "foo-pwd2", null); - assert (userExists(ar, USER)); - ar.removeUser(USER); - assert (!userExists(ar, USER)); - //printVerbose( "SUCCESS testing: " + ar.getName() ); - } - catch (Exception e) { - trace(""); - trace(""); - trace("FAILURE FOR: " + ar.getName()); - //e.printStackTrace(); - failures.add(ar); - } - } - - if (failures.size() != 0) { - final Set names = Util.getNames(failures); - - warning("testAddRemoveUpdateUser failed on the following realms: " + - CollectionUtil.toString(names)); - assert (false); - } - */ - } - - public synchronized void - testGetGroupNames() { - warning( "testAddRemoveUpdateUser.testGetGroupNames(): NO API exists for getGroupNames()" ); - /* - final Map arcMap = getTestableAuthRealms(); - - for (final AuthRealmConfig ar : arcMap.values()) { - ar.getGroupNames(); - } - */ - } - - public synchronized void - testGetUserGroupNames() { - warning( "testAddRemoveUpdateUser.testGetUserGroupNames(): NO API exists for getUserNames(), getUserGroupNames()" ); - /* - final Map arcMap = getTestableAuthRealms(); - - for (final AuthRealmConfig ar : arcMap.values()) { - final String[] users = ar.getUserNames(); - for (final String user : users) { - ar.getUserGroupNames(user); - } - } - */ - } - - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("AuthRealmConfig"); - } - - public static AuthRealmConfig - ensureDefaultInstance(final SecurityServiceConfig securityServiceConfig) { - AuthRealmConfig result = - securityServiceConfig.getAuthRealmConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(securityServiceConfig, - getDefaultInstanceName(), - DEFAULT_REALM_CLASSNAME, - KEY_FILE_PREFIX + "default-instance-test"); - } - - return result; - } - - public static AuthRealmConfig - createInstance( - final SecurityServiceConfig securityServiceConfig, - final String name, - final String classname, - final String keyFile) { - final Map options = new HashMap(); - - options.put(KEY_FILE_PROPERTY_KEY, keyFile); - options.put(JAAS_CONTEXT_PROPERTY_KEY, "dummy-jaas-context-value"); - - return securityServiceConfig.createAuthRealmConfig(name, classname, options); - } - - - protected Container - getProgenyContainer() { - return getConfigConfig().getSecurityServiceConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.AUTH_REALM_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getConfigConfig().getSecurityServiceConfig().removeAuthRealmConfig(name); - } - - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - if (name.indexOf("Illegal") >= 0) { - // MBean doesn't detect illegal parameters; anything is allowed - // for the realm. - throw new IllegalArgumentException(); - } - - return createInstance(getConfigConfig().getSecurityServiceConfig(), - name, DEFAULT_REALM_CLASSNAME, name + "-keyfile"); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AvailabilityServiceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AvailabilityServiceConfigTest.java deleted file mode 100644 index 51bf7667f82..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/AvailabilityServiceConfigTest.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - - -import com.sun.appserv.management.config.AvailabilityServiceConfig; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.ClusterSupportRequired; - -import javax.management.InstanceNotFoundException; - -import com.sun.appserv.management.helper.AttributeResolverHelper; - -public class AvailabilityServiceConfigTest - extends AMXTestBase - implements ClusterSupportRequired { - public AvailabilityServiceConfigTest() - throws InstanceNotFoundException { - } - - private AvailabilityServiceConfig - getIt() { - return getConfigConfig().getAvailabilityServiceConfig(); - } - - public void - testWarnAvail() { - if (getIt() == null) { - assert false : "AvailabilityServiceConfigTest: no AvailabilityServiceConfig to test"; - } - } - - /** - Test of [g/s]etAvailabilityEnabled method, of class com.sun.appserv.management.config.AvailabilityServiceConfig. - */ - public void testAvailabilityEnabled() { - final AvailabilityServiceConfig asc = getIt(); - if (asc != null) { - asc.setAvailabilityEnabled("" + false); - assertFalse("getAvailabilityEnabled() was supposed to return false.", asc.getAvailabilityEnabled().equals("false")); - asc.setAvailabilityEnabled( ""+ true); - assertTrue("getAvailabilityEnabled() was supposed to return true.", asc.getAvailabilityEnabled().equals("true")); - } - } - - /** - Test of [g/s]etAutoManageHAStore method, of class com.sun.appserv.management.config.AvailabilityServiceConfig. - */ - public void testAutoManageHAStore() { - final AvailabilityServiceConfig asc = getIt(); - if (asc != null) { - final String save = asc.getAutoManageHAStore(); - asc.setAutoManageHAStore("" + true); - assertTrue("getAutoManageHAStore() was supposed to return true.", asc.getAutoManageHAStore().equals("true")); - - asc.setAutoManageHAStore("" + false); - assertFalse("getAutoManageHAStore() was supposed to return false.", asc.getAutoManageHAStore().equals("false")); - asc.setAutoManageHAStore(save); - } - } - - /** - Test of [g/s]etHAAgentHosts methods, of class com.sun.appserv.management.config.AvailabilityServiceConfig. - */ - public void testHAAgentHosts() { - final AvailabilityServiceConfig asc = getIt(); - if (asc != null) { - final String hosts = "hp,hp,hp,hp"; - final String save = asc.getHAAgentHosts(); - asc.setHAAgentHosts(hosts); - String s = asc.getHAAgentHosts(); - assertEquals(hosts, s); - asc.setHAAgentHosts((save == null) ? "" : save); - } - } - - /** - Test of [g/s]etHAAgentPort methods, of class com.sun.appserv.management.config.AvailabilityServiceConfig. - */ - public void testHAAgentPort() { - final AvailabilityServiceConfig asc = getIt(); - if (asc != null) { - final String port = "3456"; - final String save = asc.getHAAgentPort(); - asc.setHAAgentPort(port); - final String s = asc.getHAAgentPort(); - assertEquals(port, s); - asc.setHAAgentPort((save == null) ? "" : save); - } - } - - /** - Test of [g/s]etHAStoreHealthcheckIntervalSeconds methods, of class com.sun.appserv.management.config.AvailabilityServiceConfig. - */ - public void testHAStoreHealthcheckIntervalSeconds() { - final AvailabilityServiceConfig asc = getIt(); - if (asc != null) { - final String time = "90"; - final String save = asc.getHAStoreHealthcheckIntervalSeconds(); - asc.setHAStoreHealthcheckIntervalSeconds(time); - String s = asc.getHAStoreHealthcheckIntervalSeconds(); - assertEquals(time, s); - asc.setHAStoreHealthcheckIntervalSeconds((save == null) ? "" : save); - } - } - - /** - Test of [g/s]etHAStoreName methods, of class com.sun.appserv.management.config.AvailabilityServiceConfig. - */ - public void testHAStoreName() { - final AvailabilityServiceConfig asc = getIt(); - if (asc != null) { - final String storeName = "cluster1"; - final String save = asc.getHAStoreName(); - asc.setHAStoreName(storeName); - final String s = asc.getHAStoreName(); - assertEquals(storeName, s); - asc.setHAStoreName((save == null) ? "" : save); - } - } - - /** - Test of [g/s]etStorePoolName methods, of class com.sun.appserv.management.config.AvailabilityServiceConfig. - */ - public void testStorePoolName() { - final AvailabilityServiceConfig asc = getIt(); - if (asc!= null) { - final String storeName = "xxxx"; - final String save = asc.getStorePoolName(); - asc.setStorePoolName(storeName); - final String s = asc.getStorePoolName(); - assertEquals(storeName, s); - asc.setStorePoolName((save == null) ? "" : save); - } - } - - /** - Test of [g/s]etHAStoreHealthcheckEnabled methods, of class com.sun.appserv.management.config.AvailabilityServiceConfig. - */ - public void testHAStoreHealthcheckEnabled() { - final AvailabilityServiceConfig asc = getIt(); - if (asc!= null) { - final String save = asc.getHAStoreHealthcheckEnabled(); - final boolean b = AttributeResolverHelper.resolveBoolean( asc, save); - - asc.setHAStoreHealthcheckEnabled("" + false); - assertFalse("getHAStoreHealthcheckEnabled() was supposed to return false.", - AttributeResolverHelper.resolveBoolean( asc, asc.getHAStoreHealthcheckEnabled())); - - asc.setHAStoreHealthcheckEnabled("" + true); - assertTrue("getHAStoreHealthcheckEnabled() was supposed to return true.", - AttributeResolverHelper.resolveBoolean( asc, asc.getHAStoreHealthcheckEnabled())); - asc.setHAStoreHealthcheckEnabled( save ); - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ClusterConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ClusterConfigTest.java deleted file mode 100644 index 7a0ba2c39f1..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ClusterConfigTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.ClusterConfig; -import com.sun.appserv.management.config.DomainConfig; -import org.glassfish.admin.amxtest.ClusterSupportRequired; - -import java.util.Map; - -/** - Test the creation/removal of ClusterConfig - */ -public final class ClusterConfigTest - extends ConfigMgrTestBase - implements ClusterSupportRequired { - public ClusterConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("test-cluster"); - } - - public static ClusterConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - ClusterConfig result = - domainConfig.getClustersConfig().getClusterConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = domainConfig.getClustersConfig().createClusterConfig( - getDefaultInstanceName(), null, null); - } - - return result; - } - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.CLUSTER_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getDomainConfig().getClustersConfig().removeClusterConfig(name); - } - - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - assert (name != null && name.length() >= 1); - return getDomainConfig().getClustersConfig().createClusterConfig(name, null, options); - } - - public void - testCreateWithIllegalConfig() { - try { - getDomainConfig().getClustersConfig().createClusterConfig("dummy-cluster-1", "no such config", null); - failure("expecting failure creating cluster with illegal config name"); - - getDomainConfig().getClustersConfig().createClusterConfig("dummy-cluster-2", "server-config", null); - failure("expecting failure creating cluster with name 'server-config'"); - - getDomainConfig().getClustersConfig().createClusterConfig("dummy-cluster-2", "default-config", null); - failure("expecting failure creating name 'default-config'"); - } - catch (Exception e) { - // good - } - } -} - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ClusteredServerConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ClusteredServerConfigTest.java deleted file mode 100644 index 0e030e4ed25..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ClusteredServerConfigTest.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.ClusterConfig; -import com.sun.appserv.management.config.ClusteredServerConfig; -import com.sun.appserv.management.config.DeployedItemRefConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.NodeAgentConfig; -import com.sun.appserv.management.config.RefConfig; -import com.sun.appserv.management.config.ResourceRefConfig; -import com.sun.appserv.management.util.misc.GSetUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.ClusterSupportRequired; -import org.glassfish.admin.amxtest.PropertyKeys; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class ClusteredServerConfigTest - extends AMXTestBase - implements ClusterSupportRequired { - public ClusteredServerConfigTest() { - } - - private void - sanityCheck(final ClusteredServerConfig csc) { - assert XTypes.CLUSTERED_SERVER_CONFIG.equals(csc.getJ2EEType()); - - final String configName = csc.getConfigRef(); - final String nodeAgentName = csc.getConfigRef(); - - final Map deployedItems = - csc.getDeployedItemRefConfigMap(); - - - final Map resources = - csc.getResourceRefConfigMap(); - - final String lbWeight = csc.getLBWeight(); - csc.setLBWeight(lbWeight); - } - - - public ClusteredServerConfig - createClusteredServer( - final String serverName, - final String nodeAgentName, - final int basePort) { - final DomainConfig domainConfig = getDomainConfig(); - - if (domainConfig.getServersConfig().getClusteredServerConfigMap().get(serverName) != null) { - domainConfig.getServersConfig().removeClusteredServerConfig(serverName); - } else if (domainConfig.getServersConfig().getStandaloneServerConfigMap().get(serverName) != null) { - domainConfig.getServersConfig().removeStandaloneServerConfig(serverName); - } - - final ClusterConfig clusterConfig = - ClusterConfigTest.ensureDefaultInstance(domainConfig); - - if (domainConfig.getServersConfig().getClusteredServerConfigMap().get(serverName) != null) { - domainConfig.getServersConfig().removeClusteredServerConfig(serverName); - assert domainConfig.getServersConfig().getClusteredServerConfigMap().get(serverName) == null; - } - - final ConfigSetup setup = new ConfigSetup(getDomainRoot()); - final Map options = new HashMap(); - setup.setupServerPorts(options, basePort); - - final ClusteredServerConfig csc = - domainConfig.getServersConfig().createClusteredServerConfig(serverName, - clusterConfig.getName(), - nodeAgentName, - options); - sanityCheck(csc); - - return csc; - } - - private void - verifyRefContainers() { - final Set j2eeTypes = - GSetUtil.newUnmodifiableStringSet( - XTypes.DEPLOYED_ITEM_REF_CONFIG, XTypes.RESOURCE_REF_CONFIG); - - final Set refs = getQueryMgr().queryJ2EETypesSet(j2eeTypes); - - for (final RefConfig ref : refs) { - assert ref.getContainer() != null : - "MBean " + Util.getObjectName(ref) + " return null from getContainer()"; - } - } - - public void - testCreateRemove() { - final DomainConfig domainConfig = getDomainConfig(); - final NodeAgentConfig nodeAgentConfig = getDASNodeAgentConfig(); - - if (nodeAgentConfig == null) { - warning("SKIPPING ClusteredServerConfigTest.testCreateRemove: " + - "no DAS Node Agent has been specified; use " + - PropertyKeys.DAS_NODE_AGENT_NAME); - } else { - final int NUM = 5; - final String baseName = "ClusteredServerConfigTest"; - - verifyRefContainers(); - - final ClusteredServerConfig[] servers = new ClusteredServerConfig[NUM]; - for (int i = 0; i < NUM; ++i) { - final int basePort = 11000 + i * 10; - servers[i] = createClusteredServer(baseName + "-" + i, - nodeAgentConfig.getName(), - basePort); - printVerbose("Created ClusteredServerConfig: " + servers[i].getName()); - assert XTypes.CLUSTERED_SERVER_CONFIG.equals(servers[i].getJ2EEType()); - - verifyRefContainers(); - } - - for (int i = 0; i < NUM; ++i) { - final String name = servers[i].getName(); - domainConfig.getServersConfig().removeClusteredServerConfig(name); - printVerbose("Removed ClusteredServerConfig: " + name); - } - - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigConfigTest.java deleted file mode 100644 index 1c240808306..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigConfigTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.SystemInfo; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.util.misc.StringUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.MultipleServerSupportRequired; - -import java.util.Map; - - -/** - */ -public final class ConfigConfigTest - extends AMXTestBase - implements MultipleServerSupportRequired { - public ConfigConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainRoot()); - } - - } - - public static ConfigConfig - ensureDefaultInstance(final DomainRoot domainRoot) { - ConfigConfig config = null; - - final DomainConfig domainConfig = domainRoot.getDomainConfig(); - final Map existing = domainConfig.getConfigsConfig().getConfigConfigMap(); - - if (supportsMultipleServers(domainRoot)) { - config = existing.get(getDefaultInstanceName(domainRoot)); - if (config == null) { - final ConfigSetup setup = new ConfigSetup(domainRoot); - config = setup.createConfig(getDefaultInstanceName(domainRoot)); - } - } else { - config = existing.get(PE_CONFIG_NAME); - assert (config != null) : "No config named " + StringUtil.quote(PE_CONFIG_NAME); - } - return config; - } - - public static String - getDefaultInstanceName(final DomainRoot domainRoot) { - String name = null; - - if (domainRoot.getSystemInfo().supportsFeature(SystemInfo.MULTIPLE_SERVERS_FEATURE)) { - name = getDefaultInstanceName("ConfigConfigTest"); - } else { - name = PE_CONFIG_NAME; - } - return name; - } - - - private ConfigConfig - create(final String name) - throws Throwable { - final ConfigSetup setup = new ConfigSetup(getDomainRoot()); - - setup.removeConfig(name); - - final ConfigConfig config = setup.createConfig(name); - assert (name.equals(config.getName())); - - // see that it responds to a request - final Map attrs = Util.getExtra(config).getAllAttributes(); - //printVerbose( "Attributes for config " + config.getName() + ":" ); - //printVerbose( MapUtil.toString( attrs, NEWLINE ) ); - - return config; - } - - public void - testCreateRemove() - throws Throwable { - if (!checkNotOffline("testCreateRemove")) { - return; - } - - final String NAME = "ConfigConfigTest.testCreateRemove"; - - final Map before = getDomainConfig().getConfigsConfig().getConfigConfigMap(); - - final int NUM = 2; - final ConfigConfig[] configs = new ConfigConfig[NUM]; - - for (int i = 0; i < NUM; ++i) { - configs[i] = create(NAME + i); - } - - final ConfigSetup setup = new ConfigSetup(getDomainRoot()); - for (final ConfigConfig config : configs) { - setup.removeConfig(config.getName()); - - // verify that the config is gone - try { - Util.getExtra(config).getAllAttributes(); - fail("Config " + config.getName() + " should no longer exist"); - } - catch (Exception e) { - // good, we expected to be here - } - } - - final Map after = getDomainConfig().getConfigsConfig().getConfigConfigMap(); - assert (before.keySet().equals(after.keySet())); - } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigMgrTestBase.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigMgrTestBase.java deleted file mode 100644 index 4bd291b6c93..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigMgrTestBase.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/ConfigMgrTestBase.java,v 1.9 2007/05/05 05:23:54 tcfujii Exp $ -* $Revision: 1.9 $ -* $Date: 2007/05/05 05:23:54 $ -*/ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.client.ProxyFactory; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.util.misc.ClassUtil; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import com.sun.appserv.management.util.misc.MapUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.support.CreateRemoveListener; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import java.util.Collections; -import java.util.Map; - -/** - */ -public abstract class ConfigMgrTestBase - extends AMXTestBase { - protected ConfigMgrTestBase() { - super(); - } - - - protected String - getProgenyTestName() { - return ("test-" + ClassUtil.stripPackageName(this.getClass().getName())); - } - - - protected abstract AMXConfig createProgeny( - String name, - Map options); - - protected abstract Container getProgenyContainer(); - - protected abstract String getProgenyJ2EEType(); - - protected abstract void removeProgeny(String name); - - protected static final Map ILLEGAL_OPTIONS = - Collections.unmodifiableMap(MapUtil.newMap(new String[] - { - "IllegalParam1", "IllegalValue1", - "IllegalParam2", "IllegalValue2", - })); - - public final synchronized void - testIllegalCreate() - throws Exception { - if (!checkNotOffline("testIllegalCreate")) { - return; - } - - final String name = getProgenyTestName() + "-Illegal"; - - try { - final AMXConfig proxy = createProgeny(name, ILLEGAL_OPTIONS); - fail("Expecting failure from createProgenyIllegal for progeny type: " + getProgenyJ2EEType()); - } - catch (final Exception e) { - final Throwable rootCause = ExceptionUtil.getRootCause(e); - if (!(rootCause instanceof IllegalArgumentException)) { - warning("expecting IllegalArgumentException, got: " + rootCause.getClass().getName() + - ", msg = " + rootCause.getMessage()); - rootCause.printStackTrace(); - } - } - catch (final Throwable t) { - final Throwable rootCause = ExceptionUtil.getRootCause(t); - warning("expecting IllegalArgumentException, got: " + ExceptionUtil.toString(rootCause)); - assert false; - } - } - - public final synchronized void - testCreateRemove() - throws Exception { - if (!checkNotOffline("testCreateRemove")) { - return; - } - - final long start = now(); - - String name = getProgenyTestName(); - - final String progenyJ2EEType = getProgenyJ2EEType(); - - AMXConfig proxy = getProgeny(name); - if (proxy != null) { - final ObjectName objectName = Util.getExtra(proxy).getObjectName(); - remove(name); - waitUnregistered(objectName); - assert (!getConnection().isRegistered(objectName)); - assert (getProgeny(name) == null); - proxy = null; - } - - final Container container = getProgenyContainer(); - final CreateRemoveListener listener = - new CreateRemoveListener(container, progenyJ2EEType, name); - - // create it - try { - proxy = createProgeny(name, null); - } - catch (Exception e) { - trace(getStackTrace(ExceptionUtil.getRootCause(e))); - failure("Can't create item of j2eeType=" + progenyJ2EEType + - ",name=" + name); - } - assert (proxy.getName().equals(name)); - final ObjectName objectName = Util.getObjectName(proxy); - assert (getConnection().isRegistered(objectName)); - assert (container.getContainee(progenyJ2EEType, name) != null); - assert (container.getContainee(progenyJ2EEType, name) == proxy); - final AMXConfig progeny = getProgeny(name); - assert (progeny == proxy); - - // remove it - final ProxyFactory factory = Util.getExtra(proxy).getProxyFactory(); - assert (name.equals(progeny.getName())); - remove(name); - waitUnregistered(objectName); - assert (!getConnection().isRegistered(objectName)); - waitProxyGone(factory, objectName); - assert (getProgeny(name) == null); - - listener.waitNotifs(); - - printElapsed("testCreateRemove: created/remove/listen for: " + progenyJ2EEType, start); - } - - - public AMXConfig - getProgeny(final String name) { - final Container container = getProgenyContainer(); - final String progenyType = getProgenyJ2EEType(); - - //trace( "getProgeny: " + progenyType + "=" + name ); - final Object progeny = container.getContainee(progenyType, name); - - if (progeny != null && !(progeny instanceof AMXConfig)) { - assert (progeny instanceof AMX); - failure( - "getProgeny: " + progenyType + "=" + name + " not an AMXConfig, interface = " + - Util.getExtra(Util.asAMX(progeny)).getInterfaceName()); - } - - return ((AMXConfig) progeny); - } - - - protected void - remove(final String name) { - removeProgeny(name); - } - - - void - removeEx(String name) { - final AMX proxy = getProgeny(name); - if (proxy != null) { - assert (proxy.getName().equals(name)); - final ObjectName objectName = Util.getObjectName(proxy); - - try { - remove(name); - - final MBeanServerConnection conn = getConnection(); - while (conn.isRegistered(objectName)) { - trace("waiting for mbean to be unregistered: " + objectName); - } - } - catch (Exception e) { - trace("error removing MBean: " + - objectName + " = " + ExceptionUtil.getRootCause(e).getMessage()); - } - } else { - // trace( "ConfigMgrTestBase.removeEx: " + name + " does not exist." ); - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigRunMeFirstTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigRunMeFirstTest.java deleted file mode 100644 index 3156c467ae1..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigRunMeFirstTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.AdminServiceConfig; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.SecurityServiceConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - - -/** - This test should normally be run before the generic tests - so that it can set up default items for many of the config elements - so that the generic tests will actually test them. Otherwise, - when the generic tests are run, they won't see any instances - of many of the AMXConfig MBeans. -

    - If there are errors doing this, disable this test in amxtest.classes, - fix the error in the specific place it's occurring, then re-enabled - this test. - */ -public final class ConfigRunMeFirstTest - extends AMXTestBase { - public ConfigRunMeFirstTest() { - } - - private void - setupConfig() { - final DomainConfig dc = getDomainConfig(); - final ConfigConfig cc = getConfigConfig(); - final SecurityServiceConfig ss = cc.getSecurityServiceConfig(); - final AdminServiceConfig as = cc.getAdminServiceConfig(); - - AuditModuleConfigTest.ensureDefaultInstance(ss); - - AuthRealmConfigTest.ensureDefaultInstance(ss); - - ConnectorConnectionPoolConfigTest.ensureDefaultInstance(dc); - - JMXConnectorConfigTest.ensureDefaultInstance(as); - - ResourceAdapterConfigTest.ensureDefaultInstance(dc); - - AdminObjectResourceConfigTest.ensureDefaultInstance(dc); - - JDBCConnectionPoolConfigTest.ensureDefaultInstance(dc); - - JDBCResourceConfigTest.ensureDefaultInstance(dc); - - JNDIResourceConfigTest.ensureDefaultInstance(dc); - - ConnectorResourceConfigTest.ensureDefaultInstance(dc); - - CustomMBeanConfigTest.ensureDefaultInstance(dc); - - JACCProviderConfigTest.ensureDefaultInstance(ss); - - MailResourceConfigTest.ensureDefaultInstance(dc); - - ThreadPoolConfigTest.ensureDefaultInstance(cc); - - PersistenceManagerFactoryResourceConfigTest.ensureDefaultInstance(dc); - - CustomResourceConfigTest.ensureDefaultInstance(dc); - - ProfilerConfigTest.ensureDefaultInstance(cc.getJavaConfig()); - } - - public void - testSetup() { - if (checkNotOffline("testIllegalCreate")) { - setupConfig(); - } - } -} - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigSetup.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigSetup.java deleted file mode 100644 index 65eb8006872..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConfigSetup.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.ServerConfigKeys; -import com.sun.appserv.management.config.StandaloneServerConfig; - -import java.util.HashMap; -import java.util.Map; - - -/** - */ -public final class ConfigSetup { - final DomainRoot mDomainRoot; - - public static final String TEST_SERVER_NAME = "testServer"; - public static final String TEST_CONFIG_NAME = TEST_SERVER_NAME + "-config"; - - public ConfigSetup(final DomainRoot domainRoot) { - mDomainRoot = domainRoot; - } - - public DomainConfig - getDomainConfig() { - return mDomainRoot.getDomainConfig(); - } - - public ConfigConfig - createConfig(final String name) { - final Map options = new HashMap(); - - final ConfigConfig config = - getDomainConfig().getConfigsConfig().createConfigConfig(name, options); - - return config; - } - - public boolean - removeConfig(final String name) { - boolean exists = getDomainConfig().getConfigsConfig().getConfigConfigMap().get(name) != null; - - if (exists) { - getDomainConfig().getConfigsConfig().removeConfigConfig(name); - } - - return exists; - } - - public void - setupServerPorts( - final Map options, - final int basePort) { - if (basePort > 0) { - options.put(ServerConfigKeys.HTTP_LISTENER_1_PORT_KEY, "" + (basePort + 0)); - options.put(ServerConfigKeys.HTTP_LISTENER_2_PORT_KEY, "" + (basePort + 1)); - options.put(ServerConfigKeys.ORB_LISTENER_1_PORT_KEY, "" + (basePort + 2)); - options.put(ServerConfigKeys.SSL_PORT_KEY, "" + (basePort + 3)); - options.put(ServerConfigKeys.SSL_MUTUALAUTH_PORT_KEY, "" + (basePort + 4)); - options.put(ServerConfigKeys.JMX_SYSTEM_CONNECTOR_PORT_KEY, "" + (basePort + 5)); - options.put(ServerConfigKeys.JMS_PROVIDER_PORT_KEY, "" + (basePort + 6)); - options.put(ServerConfigKeys.ADMIN_LISTENER_PORT_KEY, "" + (basePort + 7)); - } - } - - public StandaloneServerConfig - createServer( - final String name, - int basePort, - final String nodeAgentName, - final String configName) { - final Map options = new HashMap(); - - setupServerPorts(options, basePort); - - final StandaloneServerConfig server = - getDomainConfig().getServersConfig().createStandaloneServerConfig( - name, nodeAgentName, configName, options); - - return server; - } - - - public boolean - removeServer(final String name) { - boolean exists = getDomainConfig().getServersConfig().getStandaloneServerConfigMap().get(name) != null; - - if (exists) { - getDomainConfig().getServersConfig().removeStandaloneServerConfig(name); - } - - return exists; - } -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorConnectionPoolConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorConnectionPoolConfigTest.java deleted file mode 100644 index c82988428a6..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorConnectionPoolConfigTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.ConnectorConnectionPoolConfig; -import com.sun.appserv.management.config.ConnectorConnectionPoolConfigKeys; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.util.misc.MapUtil; - -import java.util.Map; - -/** - */ -public final class ConnectorConnectionPoolConfigTest - extends ConfigMgrTestBase { - private static final String CONNECTOR_DEF_NAME = "javax.resource.cci.ConnectionFactory"; - private static final String RESOURCE_ADAPTOR_NAME = "cciblackbox-tx"; - private static final Map OPTIONS = MapUtil.newMap( - ConnectorConnectionPoolConfigKeys.IGNORE_MISSING_REFERENCES_KEY, "true"); - - public ConnectorConnectionPoolConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("ConnectorConnectionPoolConfig"); - } - - public static ConnectorConnectionPoolConfig - ensureDefaultInstance(final DomainConfig dc) { - ConnectorConnectionPoolConfig result = - dc.getResourcesConfig().getConnectorConnectionPoolConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(dc, getDefaultInstanceName(), - ResourceAdapterConfigTest.ensureDefaultInstance(dc).getName(), - CONNECTOR_DEF_NAME, OPTIONS); - } - - return result; - } - - public static ConnectorConnectionPoolConfig - createInstance( - final DomainConfig dc, - final String name, - final String resourceAdapterName, - final String connectorDefinitionName, - Map optional) { - return dc.getResourcesConfig().createConnectorConnectionPoolConfig(name, - connectorDefinitionName, resourceAdapterName, optional); - } - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.CONNECTOR_CONNECTION_POOL_CONFIG; - } - - protected void - removeProgeny(final String name) { - getDomainConfig().getResourcesConfig().removeConnectorConnectionPoolConfig(name); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final Map allOptions = MapUtil.newMap(OPTIONS, options); - - final ConnectorConnectionPoolConfig config = - getDomainConfig().getResourcesConfig().createConnectorConnectionPoolConfig( - name, - RESOURCE_ADAPTOR_NAME, - CONNECTOR_DEF_NAME, allOptions); - return (config); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorResourceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorResourceConfigTest.java deleted file mode 100644 index 6aff404de85..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorResourceConfigTest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.ConnectorConnectionPoolConfig; -import com.sun.appserv.management.config.ConnectorResourceConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.ResourceRefConfig; -import com.sun.appserv.management.util.misc.CollectionUtil; - -import javax.management.ObjectName; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class ConnectorResourceConfigTest - extends ResourceConfigTestBase { - public ConnectorResourceConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("ConnectorResourceConfig"); - } - - public static ConnectorResourceConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - ConnectorResourceConfig result = - domainConfig.getResourcesConfig().getConnectorResourceConfigMap().get(getDefaultInstanceName()); - - final ConnectorConnectionPoolConfig connectorConnectionPool = - ConnectorConnectionPoolConfigTest.ensureDefaultInstance(domainConfig); - - if (result == null) { - result = createInstance(domainConfig, - getDefaultInstanceName(), - connectorConnectionPool.getName(), null); - } - - return result; - } - - public static ConnectorResourceConfig - createInstance( - final DomainConfig domainConfig, - final String name, - final String poolName, - final Map optional) { - return domainConfig.getResourcesConfig().createConnectorResourceConfig( - name, poolName, optional); - } - - protected String - getProgenyTestName() { - return ("jndi/ConnectorResourceConfigTest"); - } - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.CONNECTOR_RESOURCE_CONFIG; - } - - - protected void - removeProgeny(final String name) { - final Set resourceRefs = - getQueryMgr().queryJ2EETypeNameSet(XTypes.RESOURCE_REF_CONFIG, name); - - getDomainConfig().getResourcesConfig().removeConnectorResourceConfig(name); - } - - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final String poolName = - ConnectorConnectionPoolConfigTest.ensureDefaultInstance(getDomainConfig()).getName(); - - assert (getDomainConfig().getResourcesConfig().getConnectorResourceConfigMap().get(name) == null) : - "A resource already exists with name: " + name; - - final Set resourceRefs = - getQueryMgr().queryJ2EETypeNameSet(XTypes.RESOURCE_REF_CONFIG, name); - - ConnectorResourceConfig config = null; - - final Set resourceRefObjectNames = Util.toObjectNames(resourceRefs); - if (resourceRefs.size() != 0) { - assert (false); - warning("A DANGLING resource ref already exists with name: " + name + - ", {" + - CollectionUtil.toString(resourceRefObjectNames) + "} (SKIPPING TEST)"); - } else { - config = getDomainConfig().getResourcesConfig().createConnectorResourceConfig(name, - poolName, options); - - final Set refs = - getQueryMgr().queryJ2EETypeNameSet(XTypes.RESOURCE_REF_CONFIG, name); - if (resourceRefs.size() != 0) { - final ResourceRefConfig ref = refs.iterator().next(); - - warning("A resource ref within " + - Util.getObjectName(ref.getContainer()) + - " was automatically created when creating the ConnectorResourceConfig "); - } - } - - addReference(config); - - return (config); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorServiceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorServiceConfigTest.java deleted file mode 100644 index a18b393d112..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ConnectorServiceConfigTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.ConnectorServiceConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -/** - */ -public final class ConnectorServiceConfigTest - extends AMXTestBase { - public ConnectorServiceConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getConfigConfig()); - } - } - - public static ConnectorServiceConfig - ensureDefaultInstance(final ConfigConfig configConfig) { - return configConfig.createConnectorServiceConfig(); - } - - public synchronized void - testCreateRemove() { - if (checkNotOffline("testCreateRemove")) { - final ConfigConfig configConfig = getConfigConfig(); - - // remove first, in case it's there - configConfig.removeConnectorServiceConfig(); - - // create and remove - configConfig.createConnectorServiceConfig(); - configConfig.removeConnectorServiceConfig(); - - // leave it there - ensureDefaultInstance(configConfig); - } - } - - public synchronized void - testGetters() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getConfigConfig()); - - final ConnectorServiceConfig cs = getConfigConfig().getConnectorServiceConfig(); - - final String value = cs.getShutdownTimeoutInSeconds(); - assert (value != null); - - try { - final String newValue = "" + (Integer.parseInt(value) + 1); - cs.setShutdownTimeoutInSeconds(newValue); - final String after = cs.getShutdownTimeoutInSeconds(); - assert (after.equals(newValue)); - - cs.setShutdownTimeoutInSeconds("30"); - cs.setShutdownTimeoutInSeconds(newValue); - } - catch (Exception e) { - warning(getRootCauseStackTrace(e)); - - failure("ConnectorServiceConfig.setShutdownTimeoutInSeconds FAILED " + - "(bug #6307916 in com.sun.appserv:type=connector-service MBean)"); - } - } - } -} - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/CustomMBeanConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/CustomMBeanConfigTest.java deleted file mode 100644 index b588e0370c1..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/CustomMBeanConfigTest.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.config.CustomMBeanConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.PropertiesAccess; -import com.sun.appserv.management.helper.RefHelper; -import com.sun.appserv.management.util.misc.CollectionUtil; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.ObjectName; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class CustomMBeanConfigTest - extends AMXTestBase { - // built-into server already; use the name; we can't rely on the server jars - private static final String IMPL_CLASSNAME = "org.glassfish.admin.amx.mbean.TestDummy"; - - private static final String TEST_NAME_BASE = "custom"; - private static final String TEST_TYPE = "CustomMBeanConfigTest"; - - public CustomMBeanConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("CustomMBeanConfig"); - } - - public static CustomMBeanConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - CustomMBeanConfig result = - domainConfig.getResourcesConfig().getCustomMBeanConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance( - domainConfig, - getDefaultInstanceName(), - createProps()); - } - - return result; - } - - public static CustomMBeanConfig - createInstance( - final DomainConfig domainConfig, - final String name, - final Map optional) { - final CustomMBeanConfig custom = - domainConfig.getResourcesConfig().createCustomMBeanConfig(name, IMPL_CLASSNAME, - createObjectName(name), - "false", - optional); - - return custom; - } - - - public Map - getCustomMBeanConfigs() { - return getDomainConfig().getResourcesConfig().getCustomMBeanConfigMap(); - } - - private void - _testGetAll() { - final Map all = getCustomMBeanConfigs(); - assert (all != null); - } - - private void - sanityCheck(final CustomMBeanConfig config) { - final String objectName = config.getObjectNameInConfig(); - - final String implClassname = config.getImplClassname(); - } - - private synchronized void - _testAttrs() { - final Map all = getCustomMBeanConfigs(); - - if (all.size() != 0) { - // everything is already tested generically, but we'll - // do some basic sanity checks here - for (final CustomMBeanConfig config : all.values()) { - sanityCheck(config); - } - } else { - warning("CustomMBeanConfigTest: No custom MBeans to test"); - } - } - - - /** - Create some dummy properties for creating a CustomMBeanConfig - */ - private static Map - createProps() { - final String PRP = PropertiesAccess.PROPERTY_PREFIX; // shorten - - final Map optional = new HashMap(); - - // these must be available in test MBean - optional.put(PRP + "Attr1", "hello"); - optional.put(PRP + "Attr2", "world"); - - return optional; - } - - private static String - createObjectName(final String name) { - return CustomMBeanConfig.JMX_DOMAIN + ":name=" + name + - ",type=" + TEST_TYPE; - } - - public synchronized CustomMBeanConfig - create( - final DomainConfig domainConfig, - final String name, - final Map optional) { - return createInstance(domainConfig, name, optional); - } - - public synchronized void - verifyPropsAdded( - final CustomMBeanConfig config, - final Map props) { - for (final String key : props.keySet()) { - if (key.startsWith(PropertiesAccess.PROPERTY_PREFIX)) { - final String specifiedValue = props.get(key).toString(); - final String propName = key.substring( - PropertiesAccess.PROPERTY_PREFIX.length(), key.length()); - - final String actualValue = config.getPropertyConfigMap().get(propName).getValue(); - assert (specifiedValue.equals(actualValue)); - } - } - } - - - private void - removeCustomMBean(final String name) { - getDomainConfig().getResourcesConfig().removeCustomMBeanConfig(name); - } - - private Set - getRegisteredCustoms() { - final QueryMgr queryMgr = getQueryMgr(); - final Set mbeans = - queryMgr.queryPatternObjectNameSet(CustomMBeanConfig.JMX_DOMAIN, "type=" + TEST_TYPE); - - return mbeans; - } - - private void - unregisterAnyTestMBeans() { - final Set customs = getRegisteredCustoms(); - for (final ObjectName objectName : customs) { - if (TEST_TYPE.equals(objectName.getKeyProperty("type"))) { - try { - getMBeanServerConnection().unregisterMBean(objectName); - printVerbose("unregistered: " + objectName); - } - catch (Exception e) { - } - } - } - } - - public synchronized void - testCreateRemove() { - if (!checkNotOffline("testCreateRemove")) { - return; - } - - final DomainConfig domainConfig = getDomainConfig(); - - final Map optional = createProps(); - - final Set created = new HashSet(); - - final Map existing = - getDomainConfig().getResourcesConfig().getCustomMBeanConfigMap(); - - unregisterAnyTestMBeans(); - final Set customsBefore = getRegisteredCustoms(); - if (customsBefore.size() != 0) { - printVerbose("custom MBeans already registered:\n" + - CollectionUtil.toString(customsBefore, "\n")); - } - - final int NUM = 3; - for (int i = 0; i < NUM; ++i) { - final String testName = TEST_NAME_BASE + i; - - if (existing.containsKey(testName)) { - RefHelper.removeAllRefsTo(existing.get(testName), true); - // leftover from a failed test... - removeCustomMBean(testName); - } - - final CustomMBeanConfig config = - create(domainConfig, TEST_NAME_BASE + i, optional); - //printVerbose( "created: " + Util.getObjectName( config ) ); - - assert (getCustomMBeanConfigs().get(config.getName()) == config); - - created.add(config); - sanityCheck(config); - - verifyPropsAdded(config, optional); - } - - _testGetAll(); - _testAttrs(); - - for (final CustomMBeanConfig config : created) { - //printVerbose( "removing: " + Util.getObjectName( config ) ); - final String name = config.getName(); - removeCustomMBean(name); - - assert (getCustomMBeanConfigs().get(name) == null); - } - - _testGetAll(); - - mySleep(100); - final Set customsAfter = getRegisteredCustoms(); - customsAfter.removeAll(customsBefore); - if (customsAfter.size() != 0) { - warning("after removing custom MBeans, " + - "they are still registered (not an AMX bug):\n" + - CollectionUtil.toString(customsAfter, "\n")); - } - unregisterAnyTestMBeans(); - } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/CustomResourceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/CustomResourceConfigTest.java deleted file mode 100644 index 0035476534d..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/CustomResourceConfigTest.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.CustomResourceConfig; -import com.sun.appserv.management.config.DomainConfig; - -import java.util.HashMap; -import java.util.Map; - -/** - */ -public final class CustomResourceConfigTest - extends ResourceConfigTestBase { - static final Map OPTIONAL = new HashMap(); - - // doesn't exist, just give a syntactically valid name - static private final String RES_TYPE = "CustomResourceConfigTest.Dummy"; - static private final String FACTORY_CLASS = - "org.glassfish.admin.amxtest.config.CustomResourceConfigTestDummy"; - - public CustomResourceConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("CustomResourceConfig"); - } - - - public static CustomResourceConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - CustomResourceConfig result = - domainConfig.getResourcesConfig().getCustomResourceConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(domainConfig, - getDefaultInstanceName(), RES_TYPE, FACTORY_CLASS, null); - } - - return result; - } - - public static CustomResourceConfig - createInstance( - final DomainConfig domainConfig, - final String name, - final String resType, - final String factoryClass, - final Map optional) { - final CustomResourceConfig config = - domainConfig.getResourcesConfig().createCustomResourceConfig(name, resType, factoryClass, optional); - - return config; - } - - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.CUSTOM_RESOURCE_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getDomainConfig().getResourcesConfig().removeCustomResourceConfig(name); - } - - protected String - getProgenyTestName() { - return ("CustomResourceConfigTest"); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final CustomResourceConfig config = - createInstance(getDomainConfig(), name, RES_TYPE, FACTORY_CLASS, options); - - addReference(config); - - return config; - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DanglingRefsTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DanglingRefsTest.java deleted file mode 100644 index 19fc9fda8ad..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DanglingRefsTest.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.ResourceConfig; -import com.sun.appserv.management.config.ResourceRefConfig; -import com.sun.appserv.management.config.ResourceRefConfigCR; -import com.sun.appserv.management.helper.RefHelper; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Map; -import java.util.Set; - - -/** - This test should normally be run before the generic tests - so that it can set up default items for many of the config elements - so that the generic tests will actually test them. Otherwise, - when the generic tests are run, they won't see any instances - of many of the AMXConfig MBeans. -

    - If there are errors doing this, disable this test in amxtest.classes, - fix the error in the specific place it's occurring, then re-enabled - this test. - */ -public final class DanglingRefsTest - extends AMXTestBase { - public DanglingRefsTest() { - } - - public void - testAllDangling() - throws ClassNotFoundException { - _testDanglingResourceRefConfigs(); - //_testDanglingDeployedItemRefConfigs(); - } - - private void - _testDanglingResourceRefConfigs() - throws ClassNotFoundException { - final DomainConfig domainConfig = getDomainConfig(); - final Set resourcesSet = - getQueryMgr().queryInterfaceSet(ResourceConfig.class.getName(), null); - - final Set - refs = RefHelper.findAllResourceRefConfigs(getQueryMgr()); - - final Map resourcesMap = Util.createNameMap(resourcesSet); - - for (final ResourceRefConfig ref : refs) { - final String name = ref.getName(); - - final ResourceConfig resourceConfig = resourcesMap.get(name); - if (resourceConfig == null) { - String msg = - "Resource reference '" + - Util.getObjectName(ref) + "' refers to a non-existent resource"; - - boolean removedOK = false; - try { - final ResourceRefConfigCR container = - (ResourceRefConfigCR) ref.getContainer(); - - container.removeResourceRefConfig(name); - removedOK = true; - } - catch (Exception e) { - msg = msg + ", and trying to remove it throws an Exception " + - "(remove it manually from domain.xml)" + - ", see bug #6298512"; - } - - if (!removedOK) { - warning(msg); - } - } else { - //printVerbose( "ResourceRefConfig '" + name + "' is OK" ); - } - } - } - - /* - private void - _testDanglingDeployedItemRefConfigs() - throws ClassNotFoundException - { - final DomainConfig domainConfig = getDomainConfig(); - - final Set s = (Set) - getQueryMgr().queryInterfaceSet( DeployedItemRefConfig.class.getName(), null ); - - final Set - refs = RefHelper.findAllDeployedItemRefConfigRefs( getQueryMgr() ); - - final Map deployedItemsMap = Util.createNameMap( s ); - - for( final DeployedItemRefConfig ref : refs ) - { - final String name = ref.getName(); - - final DeployedItem deployedItem = deployedItemsMap.get( name ); - assert( deployedItem != null ) : - "Deployed item reference '" + Util.getObjectName( ref ) + - "' refers to a non-existent item"; - } - } - */ -} - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DescriptionTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DescriptionTest.java deleted file mode 100644 index cc9d6ad5800..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DescriptionTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.Description; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Set; - - -/** - */ -public final class DescriptionTest - extends AMXTestBase { - public DescriptionTest() { - } - - public void - testGetSetDescription() { - final Set all = getTestUtil().getAllAMX(Description.class); - - for (final Description d : all) { - final String description = d.getDescription(); - - d.setDescription(description == null ? "test" : description); - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DiagnosticServiceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DiagnosticServiceConfigTest.java deleted file mode 100644 index 2d68e2a71f1..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DiagnosticServiceConfigTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.DiagnosticServiceConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.logging.Level; - -/** - */ -public final class DiagnosticServiceConfigTest - extends AMXTestBase { - public DiagnosticServiceConfigTest() { - } - - public void - testCreateRemove() { - final ConfigConfig config = getConfigConfig(); - - // set defaults - String computeChecksum = "" + true; - String captureInstallLog = "" + true; - String captureSystemInfo = "" + true; - String captureHADBInfo = "" + true; - String captureAppDD = "" + true; - String verifyConfig = "" + true; - String minLogLevel = Level.INFO.toString(); - String maxLongEntries = "10000"; - - DiagnosticServiceConfig ds = config.getDiagnosticServiceConfig(); - if (ds != null) { - // remember current settings - computeChecksum = ds.getComputeChecksum(); - captureInstallLog = ds.getCaptureInstallLog(); - captureSystemInfo = ds.getCaptureSystemInfo(); - captureHADBInfo = ds.getCaptureHADBInfo(); - captureAppDD = ds.getCaptureAppDD(); - verifyConfig = ds.getVerifyConfig(); - minLogLevel = ds.getMinLogLevel(); - maxLongEntries = ds.getMaxLogEntries(); - - config.removeDiagnosticServiceConfig(); - ds = null; - } - - ds = config.createDiagnosticServiceConfig(); - config.removeDiagnosticServiceConfig(); - ds = null; - - // re-create it so one stays around - ds = config.createDiagnosticServiceConfig(); - ds.setComputeChecksum(computeChecksum); - ds.setCaptureInstallLog(captureInstallLog); - ds.setCaptureSystemInfo(captureSystemInfo); - ds.setCaptureHADBInfo(captureHADBInfo); - ds.setCaptureAppDD(captureAppDD); - ds.setVerifyConfig(verifyConfig); - ds.setMinLogLevel(minLogLevel); - ds.setMaxLogEntries(maxLongEntries); - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DomainConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DomainConfigTest.java deleted file mode 100644 index 00793905319..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DomainConfigTest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.DomainConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - - -/** - */ -public final class DomainConfigTest - extends AMXTestBase { - public DomainConfigTest() { - } - - public void - testGetDeployedItemProxies() { - final DomainConfig mgr = getDomainConfig(); - - final Set proxies = mgr.getContaineeSet(); - assert (proxies.size() != 0); - - final Iterator iter = proxies.iterator(); - while (iter.hasNext()) { - final AMX proxy = Util.asAMX(iter.next()); - } - } - - public void - testGetDeployedItemProxiesByName() { - final DomainConfig mgr = getDomainConfig(); - - final Map> typeMap = mgr.getMultiContaineeMap(null); - - for (final String j2eeType : typeMap.keySet()) { - final Map proxyMap = typeMap.get(j2eeType); - for (final String name : proxyMap.keySet()) { - final AMX amx = Util.asAMX(proxyMap.get(name)); - - final AMX proxy = mgr.getContainee(j2eeType, name); - - assert (Util.getObjectName(proxy).equals(Util.getObjectName(amx))); - assert (proxy.getName().equals(name)); - } - } - } - - - public void - testGetAttributes() { - final DomainConfig mgr = getDomainConfig(); - - mgr.getApplicationRoot(); - mgr.getLocale(); - mgr.getLogRoot(); - } - - private void - checkMap(final Map m) { - assert (m != null); - assert (!m.keySet().contains(AMX.NO_NAME)); - assert (!m.keySet().contains(AMX.NULL_NAME)); - } - - - public void - testGetMaps() { - final DomainConfig m = getDomainConfig(); - - //checkMap(m.getServersConfig().getServerConfigMap()); - checkMap(m.getServersConfig().getStandaloneServerConfigMap()); - checkMap(m.getServersConfig().getClusteredServerConfigMap()); - checkMap(m.getLBConfigsConfig().getLBConfigMap()); - checkMap(m.getLoadBalancersConfig().getLoadBalancerConfigMap()); - checkMap(m.getNodeAgentsConfig().getNodeAgentConfigMap()); - checkMap(m.getConfigsConfig().getConfigConfigMap()); - checkMap(m.getClustersConfig().getClusterConfigMap()); - - checkMap(m.getResourcesConfig().getPersistenceManagerFactoryResourceConfigMap()); - checkMap(m.getResourcesConfig().getJDBCResourceConfigMap()); - checkMap(m.getResourcesConfig().getJDBCConnectionPoolConfigMap()); - checkMap(m.getResourcesConfig().getConnectorResourceConfigMap()); - checkMap(m.getResourcesConfig().getConnectorConnectionPoolConfigMap()); - checkMap(m.getResourcesConfig().getAdminObjectResourceConfigMap()); - checkMap(m.getResourcesConfig().getResourceAdapterConfigMap()); - checkMap(m.getResourcesConfig().getMailResourceConfigMap()); - - //checkMap(m.getApplicationsConfig().getJ2EEApplicationConfigMap()); - checkMap(m.getApplicationsConfig().getEJBModuleConfigMap()); - checkMap(m.getApplicationsConfig().getWebModuleConfigMap()); - checkMap(m.getApplicationsConfig().getRARModuleConfigMap()); - checkMap(m.getApplicationsConfig().getAppClientModuleConfigMap()); - checkMap(m.getApplicationsConfig().getLifecycleModuleConfigMap()); - } - - /* - KEEP, not quite ready to test this yet. - public void - testCreateStandaloneServerConfig() - { - final ConfigSetup setup = new ConfigSetup( getDomainRoot() ); - - setup.removeTestServer(); - - final StandaloneServerConfig server = setup.createTestServer(); - setup.removeTestServer(); - } - */ - - - public void - testCreateClusterConfig() { - // to be done - } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DottedNamesTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DottedNamesTest.java deleted file mode 100644 index 742f81dd415..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/DottedNamesTest.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.DottedNames; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.Attribute; - -/** - */ -public final class DottedNamesTest - extends AMXTestBase { - public DottedNamesTest() { - } - - private void - checkAttribute(final Attribute attr) { - assert (attr != null); - - final Object value = attr.getValue(); - if (value instanceof Attribute) { - warning("Is value of " + attr.getName() + " really another Attribute? => " + - toString(value)); - } - } - - private void - checkResultsFromWildGet( - final Object[] results) { - for (int i = 0; i < results.length; ++i) { - final Object result = results[i]; - - if (result == null) { - warning("null result from dottedNameGet( \"*\" )"); - } else if (!(result instanceof Attribute)) { - warning("non-Attribute result from dottedNameGet( \"*\" ): " + result); - } else { - // it's an Attribute - final Attribute attr = (Attribute) result; - checkAttribute((Attribute) result); - } - } - } - - private void - checkResultsFromGet( - final String[] names, - final Object[] results) { - for (int i = 0; i < results.length; ++i) { - final Object result = results[i]; - - if (result == null) { - warning("Dotted name has null result: " + names[i]); - } else if (!(result instanceof Attribute)) { - warning("Dotted name " + names[i] + " could not be obtained: " + result); - } - } - } - - private String[] - getAllNames(final DottedNames dottedNames) { - final Attribute[] attrs = (Attribute[]) dottedNames.dottedNameGet("*"); - final String[] names = new String[attrs.length]; - for (int i = 0; i < names.length; ++i) { - names[i] = attrs[i].getName(); - } - - return (names); - } - - - public void - testGetAllConfigDottedNames() { - final long start = now(); - final DottedNames dottedNames = getDomainRoot().getDottedNames(); - - final String[] names = getAllNames(dottedNames); - - final Object[] results = dottedNames.dottedNameGet(names); - - checkResultsFromGet(names, results); - printElapsed("testGetAllConfigDottedNames", start); - } - -/* public void - testGetAllMonitoringDottedNames() { - if (checkNotOffline("testMonitoringRefresh")) { - final MonitoringDottedNames dottedNames = getDomainRoot().getMonitoringDottedNames(); - final long start = now(); - final String[] names = getAllNames(dottedNames); - - final Object[] results = dottedNames.dottedNameGet(names); - - checkResultsFromGet(names, results); - printElapsed("testGetAllMonitoringDottedNames", start); - } - }*/ - - public void - testWildGetAllDottedNames() { - final long start = now(); - final DottedNames dottedNames = getDomainRoot().getDottedNames(); - - final Attribute[] results = (Attribute[]) dottedNames.dottedNameGet("*"); - checkResultsFromWildGet(results); - printElapsed("testWildGetAllConfigDottedNames", start); - } -/* - - - public void - testWildGetAllMonitoringDottedNames() { - if (checkNotOffline("testMonitoringRefresh")) { - final long start = now(); - final MonitoringDottedNames dottedNames = getDomainRoot().getMonitoringDottedNames(); - final Attribute[] results = (Attribute[]) dottedNames.dottedNameGet("*"); - checkResultsFromWildGet(results); - printElapsed("testWildGetAllMonitoringDottedNames", start); - } - } -*/ - - /** - Test that we can set (change) a dotted name. - */ - public void - testDottedNameSet() { - final long start = now(); - - final DottedNames dottedNames = getDomainRoot().getDottedNames(); - - final String target = "domain.locale"; - final Object result = dottedNames.dottedNameGet(target); - - final Attribute localeAttr = (Attribute) dottedNames.dottedNameGet(target); - checkAttribute(localeAttr); - - final String locale = (String) localeAttr.getValue(); - - // set to a new value - Object[] results = dottedNames.dottedNameSet(new String[]{target + "=dummy_locale"}); - assert (results.length == 1); - checkAttribute((Attribute) results[0]); - - // change back to previous value - final String restoreString = target + "=" + (locale == null ? "" : locale); - results = dottedNames.dottedNameSet(new String[]{restoreString}); - - final Attribute finalAttr = (Attribute) dottedNames.dottedNameGet(target); - assert ( - (finalAttr.getValue() == null && localeAttr.getValue() == null) || - finalAttr.getValue().equals(localeAttr.getValue())); - printElapsed("testConfigDottedNameSet", start); - } - - private int - testList( - final DottedNames dottedNames, - final String dottedName) { - final Object[] results = dottedNames.dottedNameList(new String[]{dottedName}); - - //trace( dottedName + ": " + toString( results ) ); - for (int i = 0; i < results.length; ++i) { - testList(dottedNames, (String) results[i]); - } - - return (results.length); - } - - public void - testRecursiveDottedNameList() { - final long start = now(); - final DottedNames dottedNames = getDomainRoot().getDottedNames(); - - final int numFound = testList(dottedNames, "domain"); - assert (numFound >= 4); // should be at least 4. - printElapsed("testRecursiveConfigDottedNameList", start); - } - - /* - - public void - testRecursiveMonitoringDottedNameList() { - if (checkNotOffline("testRecursiveMonitoringDottedNameList")) { - final MonitoringDottedNames dottedNames = getDomainRoot().getMonitoringDottedNames(); - - final long start = now(); - - final int numFound = testList(dottedNames, "server"); - assert (numFound >= 4); // should be at least 4.\ - - testList(dottedNames, "*"); - - printElapsed("testRecursiveMonitoringDottedNameList", start); - } - }*/ -} - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/EnabledTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/EnabledTest.java deleted file mode 100644 index 20df172401a..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/EnabledTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.Enabled; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Set; - -/** - */ -public final class EnabledTest - extends AMXTestBase { - public EnabledTest() { - } - - public void - testGetSetEnabled() { - final Set all = getTestUtil().getAllAMX(Enabled.class); - - for (final Enabled e : all) { - final String value = e.getEnabled(); - - e.setEnabled( value ); - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/HTTPListenerConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/HTTPListenerConfigTest.java deleted file mode 100644 index 546f577ce26..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/HTTPListenerConfigTest.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.HTTPListenerConfig; -import com.sun.appserv.management.config.HTTPListenerConfigKeys; -import com.sun.appserv.management.config.HTTPServiceConfig; -import com.sun.appserv.management.config.PropertiesAccess; -import com.sun.appserv.management.config.SSLConfig; -import static com.sun.appserv.management.config.SSLConfigKeys.*; -import com.sun.appserv.management.util.misc.MapUtil; -import com.sun.appserv.management.util.misc.TypeCast; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - */ -public final class HTTPListenerConfigTest - extends ConfigMgrTestBase { - static final String ADDRESS = "0.0.0.0"; - static final String DEF_VIRTUAL_SERVER = "server"; - static final String SERVER_NAME = "localhost"; - - // !!! deliberately use old, incorrect form; it should still succeed - static final Map OPTIONAL = new HashMap(); - - static { - OPTIONAL.put(PropertiesAccess.PROPERTY_PREFIX + "xyz", "abc"); - OPTIONAL.put(HTTPListenerConfigKeys.ENABLED_KEY, Boolean.FALSE); - OPTIONAL.put(HTTPListenerConfigKeys.ACCEPTOR_THREADS_KEY, new Integer(4)); - //OPTIONAL.put( HTTPListenerConfigKeys.BLOCKING_ENABLED_KEY, "false" ); - //OPTIONAL.put( HTTPListenerConfigKeys.REDIRECT_PORT_KEY, "9081" ); - OPTIONAL.put(HTTPListenerConfigKeys.XPOWERED_BY_KEY, Boolean.TRUE); - //OPTIONAL.put( HTTPListenerConfigKeys.FAMILY_KEY, HTTPListenerConfigFamilyValues.INET ); - } - - public HTTPListenerConfigTest() { - } - - - HTTPServiceConfig - getHTTPServiceConfig() { - return (getConfigConfig().getHTTPServiceConfig()); - } - - public void - testGetHTTPListeners() { - final HTTPServiceConfig httpService = - getConfigConfig().getHTTPServiceConfig(); - - final Map proxies = httpService.getHTTPListenerConfigMap(); - - for (final String listenerName : proxies.keySet()) { - final HTTPListenerConfig listener = (HTTPListenerConfig) - proxies.get(listenerName); - - listener.getEnabled(); - } - } - - protected String - getProgenyTestName() { - return ("HTTPListenerConfigMgrTest-test-listener"); - } - - protected Container - getProgenyContainer() { - return getHTTPService(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.HTTP_LISTENER_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getHTTPService().removeHTTPListenerConfig(name); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - // this is incorrect code-on purpose-to test backward compatibility with Maps - // that aren't of type - final Map optional = TypeCast.asMap(OPTIONAL); - assert (!MapUtil.isAllStrings(optional)); - - final Map allOptions = MapUtil.newMap(options, optional); - assert (!MapUtil.isAllStrings(allOptions)); - - final int port = 31000 + (name.hashCode() % 31000); - - final HTTPListenerConfig config = - getHTTPService().createHTTPListenerConfig(name, - ADDRESS, port, DEF_VIRTUAL_SERVER, SERVER_NAME, allOptions); - - return (config); - } - - protected final HTTPServiceConfig - getHTTPService() { - return getConfigConfig().getHTTPServiceConfig(); - } - - - public void - testCreateSSL() - throws Exception { - final Map options = - Collections.unmodifiableMap(MapUtil.newMap( - new String[] - { - CLIENT_AUTH_ENABLED_KEY, "false", - SSL_2_ENABLED_KEY, "true", - SSL_3_ENABLED_KEY, "true", - SSL_2_CIPHERS_KEY, "+rc4,-rc4export,-rc2,-rc2export,+idea,+des,+desede3", - SSL3_TLS_CIPHERS_KEY, - "+rsa_rc4_128_md5,+rsa3des_sha,+rsa_des_sha,-rsa_rc4_40_md5" + - "-rsa_rc2_40_md5,-rsa_null_md5,-rsa_des_56_sha,-rsa_rc4_56_sha", - TLS_ENABLED_KEY, "true", - TLS_ROLLBACK_ENABLED_KEY, "true", - } - )); - - if (!checkNotOffline("testCreateSSL")) { - return; - } - - final String NAME = "HTTPListenerConfigMgr-listener-for-testCreateSSL"; - - try { - removeEx(NAME); - final HTTPListenerConfig newListener = - (HTTPListenerConfig) createProgeny(NAME, null); - assert newListener != null; - - // verify that the new listener is present - final Map listeners = - getHTTPService().getHTTPListenerConfigMap(); - final HTTPListenerConfig listener = listeners.get(NAME); - assert listener != null; - assert listener == newListener; - - final String CERT_NICKNAME = NAME + "Cert"; - - final SSLConfig ssl = listener.createSSLConfig(CERT_NICKNAME, options); - assert ssl != null; - assert ssl.getCertNickname().equals(CERT_NICKNAME); - - listener.removeSSLConfig(); - } - finally { - remove(NAME); - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/HTTPServiceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/HTTPServiceConfigTest.java deleted file mode 100644 index f27856a4ff2..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/HTTPServiceConfigTest.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.AccessLogConfig; -import com.sun.appserv.management.config.ConnectionPoolConfig; -import com.sun.appserv.management.config.HTTPFileCacheConfig; -import com.sun.appserv.management.config.HTTPProtocolConfig; -import com.sun.appserv.management.config.HTTPServiceConfig; -import com.sun.appserv.management.config.KeepAliveConfig; -import com.sun.appserv.management.config.RequestProcessingConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.io.IOException; -import java.util.Collections; -import java.util.Map; - -/** - */ -public final class HTTPServiceConfigTest - extends AMXTestBase { - public HTTPServiceConfigTest() { - } - - synchronized final HTTPServiceConfig - proxy() - throws IOException { - return getConfigConfig().getHTTPServiceConfig(); - } - - static final Map EMPTY_MAP = Collections.emptyMap(); - - public void - testRequestProcessing() - throws Exception { - if (!checkNotOffline("testRequestProcessing")) { - return; - } - - RequestProcessingConfig on = proxy().getRequestProcessingConfig(); - boolean exists = (on != null); - if (!exists) { - on = proxy().createRequestProcessingConfig(EMPTY_MAP); - assert on == proxy().getRequestProcessingConfig(); - } - RequestProcessingConfig rp = proxy().getRequestProcessingConfig(); - assert rp != null; - if (!exists) { - proxy().removeRequestProcessingConfig(); - } - } - - public void - testKeepAlive() - throws Exception { - if (!checkNotOffline("testKeepAlive")) { - return; - } - - KeepAliveConfig on = proxy().getKeepAliveConfig(); - boolean exists = (on != null); - if (!exists) { - on = proxy().createKeepAliveConfig(EMPTY_MAP); - assert on == proxy().getKeepAliveConfig(); - } - KeepAliveConfig rp = proxy().getKeepAliveConfig(); - assert rp != null; - if (!exists) { - proxy().removeKeepAliveConfig(); - } - } - - public void - testAccessLog() - throws Exception { - if (!checkNotOffline("testAccessLog")) { - return; - } - - AccessLogConfig on = proxy().getAccessLogConfig(); - boolean exists = (on != null); - if (!exists) { - on = proxy().createAccessLogConfig(EMPTY_MAP); - assert on == proxy().getAccessLogConfig(); - } - AccessLogConfig rp = proxy().getAccessLogConfig(); - assert rp != null; - if (!exists) { - proxy().removeAccessLogConfig(); - } - } - - public void - testHTTPFileCache() - throws Exception { - if (!checkNotOffline("testHTTPFileCache")) { - return; - } - - HTTPFileCacheConfig on = proxy().getHTTPFileCacheConfig(); - boolean exists = (on != null); - if (!exists) { - on = proxy().createHTTPFileCacheConfig(EMPTY_MAP); - assert on == proxy().getHTTPFileCacheConfig(); - } - HTTPFileCacheConfig rp = proxy().getHTTPFileCacheConfig(); - assert rp != null; - if (!exists) { - proxy().removeHTTPFileCacheConfig(); - } - } - - public void - testConnectionPool() - throws Exception { - if (!checkNotOffline("testConnectionPool")) { - return; - } - - ConnectionPoolConfig on = proxy().getConnectionPoolConfig(); - boolean exists = (on != null); - if (!exists) { - on = proxy().createConnectionPoolConfig(EMPTY_MAP); - assert on == proxy().getConnectionPoolConfig(); - } - ConnectionPoolConfig rp = proxy().getConnectionPoolConfig(); - assert rp != null; - if (!exists) { - proxy().removeConnectionPoolConfig(); - } - } - - public void - testHTTPProtocol() - throws Exception { - if (!checkNotOffline("testHTTPProtocol")) { - return; - } - - HTTPProtocolConfig on = proxy().getHTTPProtocolConfig(); - boolean exists = (on != null); - if (!exists) { - on = proxy().createHTTPProtocolConfig(EMPTY_MAP); - assert on == proxy().getHTTPProtocolConfig(); - } - HTTPProtocolConfig rp = proxy().getHTTPProtocolConfig(); - assert rp != null; - if (!exists) { - proxy().removeHTTPProtocolConfig(); - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/IIOPListenerConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/IIOPListenerConfigTest.java deleted file mode 100644 index a89d22fcbcd..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/IIOPListenerConfigTest.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/IIOPListenerConfigTest.java,v 1.6 2007/05/05 05:23:54 tcfujii Exp $ -* $Revision: 1.6 $ -* $Date: 2007/05/05 05:23:54 $ -*/ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.IIOPListenerConfig; -import com.sun.appserv.management.config.IIOPListenerConfigKeys; -import com.sun.appserv.management.config.IIOPServiceConfig; -import com.sun.appserv.management.config.PropertiesAccess; -import com.sun.appserv.management.config.SSLConfig; -import com.sun.appserv.management.util.misc.MapUtil; - -import javax.management.ObjectName; -import java.util.HashMap; -import java.util.Map; - -/** - */ -public final class IIOPListenerConfigTest - extends ConfigMgrTestBase { - static final String ADDRESS = "0.0.0.0"; - static final Map OPTIONAL = new HashMap(); - - static { - OPTIONAL.put(PropertiesAccess.PROPERTY_PREFIX + "xyz", "abc"); - OPTIONAL.put(IIOPListenerConfigKeys.ENABLED_KEY, "false"); - OPTIONAL.put(IIOPListenerConfigKeys.SECURITY_ENABLED_KEY, "true"); - } - - public IIOPListenerConfigTest() { - } - - protected Container - getProgenyContainer() { - return getIIOPService(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.IIOP_LISTENER_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getIIOPService().removeIIOPListenerConfig(name); - } - - - protected final ObjectName - create(String name) { - return Util.getObjectName(createProgeny(name, null)); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final Map allOptions = MapUtil.newMap(options, OPTIONAL); - - final int port = (name.hashCode() % 32000) + 32000; - allOptions.put(IIOPListenerConfigKeys.PORT_KEY, "" + port); - - return getIIOPService().createIIOPListenerConfig(name, ADDRESS, allOptions); - } - - protected final IIOPServiceConfig - getIIOPService() { - return getConfigConfig().getIIOPServiceConfig(); - } - - public void - testCreateSSL() - throws Exception { - if (!checkNotOffline("testCreateSSL")) { - return; - } - - final String NAME = "IIOPListenerConfigMgr-testCreateSSL"; - - removeEx(NAME); - - final IIOPListenerConfig newListener = - (IIOPListenerConfig) createProgeny(NAME, null); - - try { - final Map listeners = - getIIOPService().getIIOPListenerConfigMap(); - - final IIOPListenerConfig listener = - (IIOPListenerConfig) listeners.get(NAME); - assert listener != null; - assert listener == newListener; - - final String CERT_NICKNAME = NAME + "Cert"; - - final SSLConfig ssl = listener.createSSLConfig(CERT_NICKNAME, null); - assert ssl != null; - assert ssl.getCertNickname().equals(CERT_NICKNAME); - - listener.removeSSLConfig(); - } - finally { - remove(NAME); - } - } -/* - public void - testCreateSSLClientConfig() - throws Exception - { - final Set s = getQueryMgr().getJ2EETypeProxies("X-IIOPServiceConfig"); - assert s.size() >= 0; - IIOPServiceConfig iiopService = (IIOPServiceConfig)s.iterator().next(); - assert iiopService != null; - Map sslParams = new HashMap(); - sslParams.put("CertNickname", "mycert"); - final ObjectName on = iiopService.createIIOPSSLClientConfig(sslParams); - assert on != null && on.equals(iiopService.getIIOPSSLClientConfigObjectName()); - IIOPSSLClientConfig sslClientConfig = iiopService.getIIOPSSLClientConfig(); - assert sslClientConfig != null; - } - */ -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JACCProviderConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JACCProviderConfigTest.java deleted file mode 100644 index 74beb12e4c9..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JACCProviderConfigTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.JACCProviderConfig; -import com.sun.appserv.management.config.SecurityServiceConfig; - -import java.util.Map; - -/** - */ -public final class JACCProviderConfigTest - extends ConfigMgrTestBase { - static final String PROVIDER = "com.sun.enterprise.security.provider.PolicyWrapper"; - static final String PROVIDER_FACTORY = "com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl"; - static final Map RESERVED = null; - - public JACCProviderConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getConfigConfig().getSecurityServiceConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("JACCProviderConfig"); - } - - public static JACCProviderConfig - ensureDefaultInstance(final SecurityServiceConfig ss) { - JACCProviderConfig result = ss.getJACCProviderConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(ss, getDefaultInstanceName(), PROVIDER, PROVIDER_FACTORY); - } - - return result; - } - - public static JACCProviderConfig - createInstance( - final SecurityServiceConfig ss, - final String name, - final String policyProvider, - final String policyConfigurationFactoryProvider) { - return ss.createJACCProviderConfig(name, - policyProvider, policyConfigurationFactoryProvider, null); - } - - - protected Container - getProgenyContainer() { - return getConfigConfig().getSecurityServiceConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.JACC_PROVIDER_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getConfigConfig().getSecurityServiceConfig().removeJACCProviderConfig(name); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - return getConfigConfig().getSecurityServiceConfig().createJACCProviderConfig(name, PROVIDER, PROVIDER_FACTORY, options); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JDBCConnectionPoolConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JDBCConnectionPoolConfigTest.java deleted file mode 100644 index 71619dc698b..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JDBCConnectionPoolConfigTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/JDBCConnectionPoolConfigTest.java,v 1.6 2007/05/05 05:23:54 tcfujii Exp $ -* $Revision: 1.6 $ -* $Date: 2007/05/05 05:23:54 $ -*/ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.JDBCConnectionPoolConfig; - -import java.util.Map; - -/** - */ -public final class JDBCConnectionPoolConfigTest - extends ConfigMgrTestBase { - private static final String JDBC_DATASOURCE_CLASSNAME = "com.pointbase.xa.xaDataSource"; - - - public JDBCConnectionPoolConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("JDBCConnectionPoolConfig"); - } - - public static JDBCConnectionPoolConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - JDBCConnectionPoolConfig result = - domainConfig.getResourcesConfig().getJDBCConnectionPoolConfigMap().get( - getDefaultInstanceName()); - - if (result == null) { - result = createInstance(domainConfig, - getDefaultInstanceName(), JDBC_DATASOURCE_CLASSNAME, null); - } - - return result; - } - - public static JDBCConnectionPoolConfig - createInstance( - final DomainConfig domainConfig, - final String name, - final String datasourceClassname, - final Map optional) { - return domainConfig.getResourcesConfig().createJDBCConnectionPoolConfig( - name, datasourceClassname, optional); - } - - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.JDBC_CONNECTION_POOL_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getDomainConfig().getResourcesConfig().removeJDBCConnectionPoolConfig(name); - } - - protected final AMXConfig - createProgeny( - String name, - Map options) { - final JDBCConnectionPoolConfig config = - getDomainConfig().getResourcesConfig().createJDBCConnectionPoolConfig(name, - JDBC_DATASOURCE_CLASSNAME, - options); - assert (config != null); - return (config); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JDBCResourceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JDBCResourceConfigTest.java deleted file mode 100644 index 1810200affb..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JDBCResourceConfigTest.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.JDBCConnectionPoolConfig; -import com.sun.appserv.management.config.JDBCResourceConfig; - -import java.util.Map; - -/** - */ -public final class JDBCResourceConfigTest - extends ResourceConfigTestBase { - private static final String JDBC_RESOURCE_POOL_NAME_BASE = "JDBCResourceConfigMgrTest.test-pool"; - private static final String JDBC_DATASOURCE_CLASSNAME = "com.pointbase.xa.xaDataSource"; - private static final Map OPTIONAL = null; - - private JDBCConnectionPoolConfig mPool; - - public JDBCResourceConfigTest() { - mPool = null; - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("JDBCResourceConfig"); - } - - public static JDBCResourceConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - JDBCResourceConfig result = - domainConfig.getResourcesConfig().getJDBCResourceConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - final JDBCConnectionPoolConfig pool = - JDBCConnectionPoolConfigTest.ensureDefaultInstance(domainConfig); - - result = createInstance(domainConfig, - getDefaultInstanceName(), pool.getName(), OPTIONAL); - } - - return result; - } - - public static JDBCResourceConfig - createInstance( - final DomainConfig domainConfig, - final String name, - final String datasourceClassname, - final Map optional) { - return domainConfig.getResourcesConfig().createJDBCResourceConfig( - name, datasourceClassname, optional); - } - - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.JDBC_RESOURCE_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getDomainConfig().getResourcesConfig().removeJDBCConnectionPoolConfig(name); - } - - protected String - getProgenyTestName() { - return ("jdbc/JDBCResourceConfigMgrTest"); - } - - private JDBCConnectionPoolConfig - createPool(final String name) { - try { - getDomainConfig().getResourcesConfig().removeJDBCConnectionPoolConfig(name); - } - catch (Exception e) { - } - - final JDBCConnectionPoolConfig config = - getDomainConfig().getResourcesConfig().createJDBCConnectionPoolConfig(name, JDBC_DATASOURCE_CLASSNAME, null); - - return (config); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - mPool = createPool(name + "-temppool"); - - final JDBCResourceConfig config = - getDomainConfig().getResourcesConfig().createJDBCResourceConfig(name, mPool.getName(), options); - assert (config != null); - - addReference(config); - - return (config); - } - - protected final void - remove(String name) { - getDomainConfig().getResourcesConfig().removeJDBCResourceConfig(name); - - if (mPool != null) { - getDomainConfig().getResourcesConfig().removeJDBCConnectionPoolConfig(mPool.getName()); - mPool = null; - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JMXConnectorConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JMXConnectorConfigTest.java deleted file mode 100644 index 0444aac9f8a..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JMXConnectorConfigTest.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/JMXConnectorConfigTest.java,v 1.7 2007/05/05 05:23:54 tcfujii Exp $ -* $Revision: 1.7 $ -* $Date: 2007/05/05 05:23:54 $ -*/ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.AdminServiceConfig; -import com.sun.appserv.management.config.AuthRealmConfig; -import com.sun.appserv.management.config.JMXConnectorConfig; -import com.sun.appserv.management.config.JMXConnectorConfigKeys; -import com.sun.appserv.management.config.PropertiesAccess; -import com.sun.appserv.management.config.SSLConfig; -import com.sun.appserv.management.config.SecurityServiceConfig; -import com.sun.appserv.management.util.misc.MapUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - */ -public final class JMXConnectorConfigTest - extends ConfigMgrTestBase { - static final String ADDRESS = "0.0.0.0"; - static final String TEST_REALM_CLASS = "com.test.DUMMY"; - static final String DEFAULT_PORT = "17377"; - - static final Map OPTIONAL = new HashMap(); - - static { - OPTIONAL.put(PropertiesAccess.PROPERTY_PREFIX + "xyz", "abc"); - OPTIONAL.put(JMXConnectorConfigKeys.SECURITY_ENABLED_KEY, "false"); - } - - public JMXConnectorConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getConfigConfig().getAdminServiceConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("JMXConnectorConfig"); - } - - public static JMXConnectorConfig - ensureDefaultInstance(final AdminServiceConfig adminServiceConfig) { - JMXConnectorConfig result = - adminServiceConfig.getJMXConnectorConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - final SecurityServiceConfig securityServiceConfig = - getConfigConfig(adminServiceConfig).getSecurityServiceConfig(); - - final AuthRealmConfig defaultAuthRealm = - AuthRealmConfigTest.ensureDefaultInstance(securityServiceConfig); - - result = createInstance(getDefaultInstanceName(), - ADDRESS, DEFAULT_PORT, defaultAuthRealm, OPTIONAL); - } - - return result; - } - - public static JMXConnectorConfig - createInstance( - final String name, - final String address, - final String port, - final AuthRealmConfig authRealm, - final Map optional) { - final AdminServiceConfig adminServiceConfig = - getConfigConfig(authRealm).getAdminServiceConfig(); - - return adminServiceConfig.createJMXConnectorConfig(name, - address, port, authRealm.getName(), optional); - } - - - protected Container - getProgenyContainer() { - return getAdminServiceConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.JMX_CONNECTOR_CONFIG; - } - - final SecurityServiceConfig - getSecurityServiceConfig() { - return getConfigConfig().getSecurityServiceConfig(); - } - - final AuthRealmConfig - createAuthRealmConfig(final String name) { - removeAuthRealmConfig(name); - - return getSecurityServiceConfig().createAuthRealmConfig( - name, TEST_REALM_CLASS, null); - } - - private String - createAuthRealmName(final String progenyName) { - return progenyName + ".TestRealm"; - } - - final void - removeAuthRealmConfig(final String name) { - try { - getSecurityServiceConfig().removeAuthRealmConfig(name); - } - catch (Exception e) { - } - } - - protected void - removeProgeny(final String name) { - try { - getAdminServiceConfig().removeJMXConnectorConfig(name); - } - finally { - try { - removeAuthRealmConfig(createAuthRealmName(name)); - } - catch (Exception e) { - } - } - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final Map allOptions = MapUtil.newMap(options, OPTIONAL); - - final int port = (name.hashCode() % 16000) + 33111; - - final String authRealmName = createAuthRealmName(name); - final AuthRealmConfig authRealmConfig = createAuthRealmConfig(authRealmName); - - try { - return getAdminServiceConfig().createJMXConnectorConfig(name, - ADDRESS, "" + port, authRealmName, allOptions); - } - catch (Exception e) { - removeAuthRealmConfig(authRealmName); - throw new RuntimeException(e); - } - } - - final AdminServiceConfig - getAdminServiceConfig() { - return (getConfigConfig().getAdminServiceConfig()); - } - - public void - testCreateSSL() - throws Exception { - if (!checkNotOffline("testCreateSSL")) { - return; - } - - final String NAME = "JMXConnectorConfigTest-testCreateSSL"; - try { - removeEx(NAME); - final JMXConnectorConfig newConfig = - (JMXConnectorConfig) createProgeny(NAME, null); - - final Map jmxConnectors = - getAdminServiceConfig().getJMXConnectorConfigMap(); - - final JMXConnectorConfig jmxConnector = (JMXConnectorConfig) - jmxConnectors.get(NAME); - assert jmxConnector != null; - assert jmxConnector == newConfig; - - final String CERT_NICKNAME = NAME + "Cert"; - - final SSLConfig ssl = jmxConnector.createSSLConfig(CERT_NICKNAME, null); - assert ssl != null; - assert ssl.getCertNickname().equals(CERT_NICKNAME); - - jmxConnector.removeSSLConfig(); - } - finally { - remove(NAME); - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JNDIResourceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JNDIResourceConfigTest.java deleted file mode 100644 index 7874b1f3694..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JNDIResourceConfigTest.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.JNDIResourceConfig; - -import java.util.Map; - -/** - */ -public final class JNDIResourceConfigTest - extends ResourceConfigTestBase { - private static final String JNDI_RESOURCE_JNDI_LOOKUP_NAME = "jndi/jndiTest"; - private static final String JNDI_RESOURCE_RES_TYPE = "javax.sql.DataSource"; - private static final String JNDI_RESOURCE_FACTORY_CLASS = "com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl"; - private static final Map OPTIONAL = null; - - public JNDIResourceConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("JNDIResourceConfig"); - } - - public static JNDIResourceConfig - ensureDefaultInstance(final DomainConfig dc) { - JNDIResourceConfig result = - dc.getResourcesConfig().getJNDIResourceConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(dc, - getDefaultInstanceName(), - JNDI_RESOURCE_JNDI_LOOKUP_NAME, - JNDI_RESOURCE_RES_TYPE, - JNDI_RESOURCE_FACTORY_CLASS, - OPTIONAL); - } - - return result; - } - - public static JNDIResourceConfig - createInstance( - final DomainConfig dc, - final String name, - final String jndiLookupName, - final String resType, - final String factoryClass, - final Map optional) { - return dc.getResourcesConfig().createJNDIResourceConfig( - name, jndiLookupName, resType, factoryClass, optional); - } - - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.JNDI_RESOURCE_CONFIG; - } - - - protected void - removeProgeny(final String name) { - final JNDIResourceConfig item = - getDomainConfig().getResourcesConfig().getJNDIResourceConfigMap().get(name); - - getDomainConfig().getResourcesConfig().removeJNDIResourceConfig(name); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final JNDIResourceConfig config = getDomainConfig().getResourcesConfig().createJNDIResourceConfig(name, - JNDI_RESOURCE_JNDI_LOOKUP_NAME, - JNDI_RESOURCE_RES_TYPE, - JNDI_RESOURCE_FACTORY_CLASS, - options); - - addReference(config); - - return (config); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JavaConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JavaConfigTest.java deleted file mode 100644 index f534e97051d..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/JavaConfigTest.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.JavaConfig; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.HashSet; -import java.util.Set; - - -import com.sun.appserv.management.helper.AttributeResolverHelper; - -/** - */ -public final class JavaConfigTest - extends AMXTestBase { - public JavaConfigTest() { - } - - public void - testGetJVMOptions() { - final JavaConfig jc = getConfigConfig().getJavaConfig(); - - final String[] jvmOptions = jc.getJVMOptions(); - - if (jvmOptions.length < 2) { - warning("Fewer than 2 JVM options, is this right: " + - StringUtil.toString(jvmOptions)); - - } - - /* - Arrays.sort( jvmOptions ); - trace("length = " + jvmOptions.length); - for (int ii=0; ii beforeSet = GSetUtil.newUnmodifiableStringSet(jc.getJVMOptions()); - - // add our new options - final Set requestSet = new HashSet(beforeSet); - requestSet.add(newOption1); - requestSet.add(newOption2); - jc.setJVMOptions(GSetUtil.toStringArray(requestSet)); - - Set afterSet = GSetUtil.newUnmodifiableStringSet(jc.getJVMOptions()); - - // make sure our new options are present - assert (afterSet.contains(newOption1)); - assert (afterSet.contains(newOption2)); - - // make sure all prior options are still present - for (final String beforeOption : beforeSet) { - assert (afterSet.contains(beforeOption)); - } - - // now remove our two options - requestSet.remove(newOption1); - requestSet.remove(newOption2); - jc.setJVMOptions(GSetUtil.toStringArray(requestSet)); - - // verify our two options are gone - afterSet = GSetUtil.newUnmodifiableStringSet(jc.getJVMOptions()); - assert (!afterSet.contains(newOption1)); - assert (!afterSet.contains(newOption2)); - - // make sure all prior options are still present - assert (afterSet.equals(beforeSet)); - } - - public void - testGetters() - throws Exception { - final JavaConfig jc = getConfigConfig().getJavaConfig(); - - String s; - - s = jc.getBytecodePreprocessors(); - if (s != null) { - jc.setBytecodePreprocessors(s); - } - - s = jc.getClasspathPrefix(); - if (s != null) { - jc.setClasspathPrefix(s); - } - - s = jc.getClasspathSuffix(); - if (s != null) { - jc.setClasspathSuffix(s); - } - - s = jc.getSystemClasspath(); - if (s != null) { - jc.setSystemClasspath(s); - } - - final String debugEnabledStr = jc.getDebugEnabled(); - final boolean debugEnabled = AttributeResolverHelper.resolveBoolean( jc, debugEnabledStr); - jc.setDebugEnabled( debugEnabledStr ); - - s = jc.getDebugOptions(); - if (s != null) { - jc.setDebugOptions(s); - } - - final String existingValue = jc.getEnvClasspathIgnored(); - final boolean envClasspathIgnored = AttributeResolverHelper.resolveBoolean( jc, existingValue); - jc.setEnvClasspathIgnored( existingValue); - - s = jc.getJavaHome(); - if (s != null) { - jc.setJavaHome(s); - } - - s = jc.getJavacOptions(); - if (s != null) { - jc.setJavacOptions(s); - } - - final String[] options = jc.getJVMOptions(); - if (options != null) { - jc.setJVMOptions(options); - } - - s = jc.getNativeLibraryPathPrefix(); - if (s != null) { - jc.setNativeLibraryPathPrefix(s); - } - - s = jc.getNativeLibraryPathSuffix(); - if (s != null) { - jc.setNativeLibraryPathSuffix(s); - } - - s = jc.getRMICOptions(); - if (s != null) { - jc.setRMICOptions(s); - } - - s = jc.getServerClasspath(); - if (s != null) { - jc.setServerClasspath(s); - } - } -} - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/LBTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/LBTest.java deleted file mode 100644 index 8f3ef1965a9..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/LBTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.ClusterSupportRequired; - -import javax.management.MBeanAttributeInfo; -import javax.management.MBeanInfo; -import javax.management.ObjectName; -import java.util.HashMap; -import java.util.Map; - -/** - Unit test class to create-delete lb-config and load-balancer elements - */ -public final class LBTest - extends AMXTestBase - implements ClusterSupportRequired { - - final boolean runDels = true; - final boolean runCreates = true; - final boolean testGetLoadBalancerConfigMap = false; - - public LBTest() {} - - public void testCreateLBConfig() { - if (checkNotOffline("testDeleteLBConfig")) { - if (!runCreates) { - return; - } - String name = "test-lb-config"; - boolean monitoringEnabled = true; - boolean routeCookieEnabled = false; - boolean httpsRouting = false; - String responseTimeout = "130"; - String reloadInterval = "380"; - - Map params = new HashMap(); - //params.put("name", name); - params.put("route-cookie-enabled", "" + routeCookieEnabled); - params.put("monitoring-enabled", "" + monitoringEnabled); - params.put("https-routing", "" + httpsRouting); - params.put("response-timeout-in-seconds", responseTimeout); - params.put("reload-poll-interval-in-seconds", reloadInterval); - - try { - getDomainConfig().getLBConfigsConfig().createLBConfig(name, params); - } catch (Throwable t) { - t.printStackTrace(); - } - } - } - - public void testCreateLoadBalancerConfig() { - if (checkNotOffline("testDeleteLBConfig")) { - if (!runCreates) { - return; - } - String name = "test-load-balancer"; - String lbConfigName = "test-lb-config"; - boolean autoApplyEnabled = true; - Map optional = null; - try { - getDomainConfig().getLoadBalancersConfig().createLoadBalancerConfig(name, lbConfigName, autoApplyEnabled, optional); - } catch (Throwable t) { - t.printStackTrace(); - } - } - } - - public void testGetLBConfigMap() { - try { - Map map = getDomainConfig().getLBConfigsConfig().getLBConfigMap(); - //System.out.println("Here is a list of Load Balancer Config MBeans in DAS: "); - //System.out.println(map); - } catch (Throwable t) { - t.printStackTrace(); - } - } - - public void testGetLoadBalancerConfigMap() { - if (testGetLoadBalancerConfigMap == false) { - return; - } - try { - Map map = getDomainConfig().getLoadBalancersConfig().getLoadBalancerConfigMap(); - //System.out.println("Here is a list of Load Balancer Config MBeans in DAS: "); - //System.out.println(map); - ObjectName objName = new ObjectName("amx:j2eeType=X-LoadBalancerConfig,name=test-load-balancer"); - MBeanInfo minfo = getConnection().getMBeanInfo(objName); - MBeanAttributeInfo[] mattrsinfo = minfo.getAttributes(); - /* - for (MBeanAttributeInfo mattrinfo : mattrsinfo) - { - System.out.println("Attribute Name is : " + mattrinfo.getName()); - } - */ - - String[] attrsNames = (String[]) getConnection().getAttribute(objName, "AttributeNames"); - /*for (String attrName : attrsNames) - System.out.println("Actual Attribute Name is : " + attrName); - System.out.println("AttributeNames are : " + attrsNames); - System.out.println("MBeanInfo is \n"+minfo);*/ - - String attrName = (String) getConnection().getAttribute(objName, "LbConfigName"); - System.out.println("attrName is = " + attrName); - } catch (Throwable t) { - t.printStackTrace(); - } - } - - public void testDeleteLoadBalancerConfig() { - if (checkNotOffline("testDeleteLBConfig")) { - - if (!runDels) { - return; - } - String name = "test-load-balancer"; - try { - getDomainConfig().getLoadBalancersConfig().removeLoadBalancerConfig(name); - } catch (Throwable t) { - t.printStackTrace(); - } - } - } - - public void testDeleteLBConfig() { - if (checkNotOffline("testDeleteLBConfig")) { - - if (!runDels) { - return; - } - String name = "test-lb-config"; - try { - getDomainConfig().getLBConfigsConfig().removeLBConfig(name); - } catch (Throwable t) { - t.printStackTrace(); - } - } - } -} diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/LibrariesTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/LibrariesTest.java deleted file mode 100644 index 272cd6e8463..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/LibrariesTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.Libraries; -import com.sun.appserv.management.util.misc.GSetUtil; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.ObjectName; -import java.util.Set; - - -/** - */ -public final class LibrariesTest - extends AMXTestBase { - public LibrariesTest() { - } - - private final Set READ_ONLY_LIBRARIES = - GSetUtil.newUnmodifiableStringSet( - "MEjbApp", "__ejb_container_timer_app", "__JWSappclients"); - - // see bug#6323557 "admin GUI becomes non-responsive after adding a library" - private final Set DONT_TEST_LIBRARIES = - GSetUtil.newUnmodifiableStringSet("admingui"); - - private static final String TEST_LIBS = "/foo:/bar"; - - /** - public void - testGUIHang() - { - final String[] TEST_LIBS = new String[] { "/foo", "/bar" }; - final ObjectName objectName = Util.newObjectName( "amx:j2eeType=X-WebModuleConfig,name=admingui" ); - final WebModuleConfig cfg = getProxyFactory().getProxy( objectName ); -

    - final String[] saveLibs = cfg.getLibraries(); - assert( saveLibs != null ); -

    - final String[] testLibs = ArrayUtil.newArray( saveLibs, TEST_LIBS ); - try - { - cfg.setLibraries( testLibs ); - } - finally - { - cfg.setLibraries( saveLibs ); - } - } - */ - - public void - testLibraries() { - final Set all = getTestUtil().getAllAMX(Libraries.class); - - for (final Libraries l : all) { - final AMX amx = (AMX) l; - - if (DONT_TEST_LIBRARIES.contains(amx.getName())) { - continue; - } - - final ObjectName objectName = Util.getObjectName(amx); - - final String saveLibs = l.getLibraries(); - assert (saveLibs != null); - - final String testLibs = TEST_LIBS; - try { - l.setLibraries(testLibs); - } - catch (Exception e) { - if (!READ_ONLY_LIBRARIES.contains(((AMX) l).getName())) { - warning("Couldn't change Libraries Attribute for " + objectName + - " (probably read-only, though not advertised as such)"); - } - } - finally { - l.setLibraries( saveLibs ); - } - - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/MailResourceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/MailResourceConfigTest.java deleted file mode 100644 index 5d3afb3be34..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/MailResourceConfigTest.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/MailResourceConfigTest.java,v 1.9 2007/05/05 05:23:55 tcfujii Exp $ -* $Revision: 1.9 $ -* $Date: 2007/05/05 05:23:55 $ -*/ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.MailResourceConfig; -import com.sun.appserv.management.config.ResourceConfigKeys; -import com.sun.appserv.management.config.ResourceRefConfig; -import com.sun.appserv.management.config.StandaloneServerConfig; -import com.sun.appserv.management.helper.RefHelper; -import com.sun.appserv.management.util.misc.MapUtil; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - - -import com.sun.appserv.management.helper.AttributeResolverHelper; - -/** - */ -public final class MailResourceConfigTest - extends ResourceConfigTestBase { - private static final String MAIL_RESOURCE_HOST = "localhost"; - private static final String MAIL_RESOURCE_USER = "someone"; - private static final String MAIL_RESOURCE_FROM = "someone@somewhere.com"; - - private static final Map OPTIONS = Collections.unmodifiableMap(MapUtil.newMap( - new String[]{ResourceConfigKeys.ENABLED_KEY, "false"})); - - public MailResourceConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("MailResourceConfig"); - } - - /** - synchronized because multiple instances are created, and we've chosen to remove/add - this resource multiple times for some specific tests. - */ - public static synchronized MailResourceConfig - ensureDefaultInstance(final DomainConfig dc) { - MailResourceConfig result = dc.getResourcesConfig().getMailResourceConfigMap().get(getDefaultInstanceName()); - - /* - if ( result != null ) - { - System.out.println( "ensureDefaultInstance(): removing: " + - JMXUtil.toString( Util.getExtra(result).getObjectName() ) ); - dc.removeMailResourceConfig( result.getName() ); - result = null; - } - */ - - if (result == null) { - result = createInstance(dc, getDefaultInstanceName(), - MAIL_RESOURCE_HOST, MAIL_RESOURCE_USER, MAIL_RESOURCE_FROM, OPTIONS); - assert ! AttributeResolverHelper.resolveBoolean( result, "Enabled" ); - - final StandaloneServerConfig serverConfig = dc.getServersConfig().getStandaloneServerConfigMap().get("server"); - - final Map options = new HashMap(); - options.put(ResourceConfigKeys.ENABLED_KEY, "false"); - final ResourceRefConfig ref = serverConfig.createResourceRefConfig(result.getName(), options); - assert ! AttributeResolverHelper.resolveBoolean( ref, "Enabled" ); - - RefHelper.removeAllRefsTo(result, false); - } - - return result; - } - - public static MailResourceConfig - createInstance( - final DomainConfig ss, - final String name, - final String host, - final String user, - final String from, - Map optional) { - return ss.getResourcesConfig().createMailResourceConfig(name, host, user, from, optional); - } - - protected String - getProgenyTestName() { - return ("jndi/MailResourceConfigMgrTest"); - } - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.MAIL_RESOURCE_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getDomainConfig().getResourcesConfig().removeMailResourceConfig(name); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final MailResourceConfig config = - getDomainConfig().getResourcesConfig().createMailResourceConfig(name, - MAIL_RESOURCE_HOST, - MAIL_RESOURCE_USER, - MAIL_RESOURCE_FROM, - options); - assert (config != null); - return (config); - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/MessageSecurityConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/MessageSecurityConfigTest.java deleted file mode 100644 index e01039f9c67..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/MessageSecurityConfigTest.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.MessageSecurityConfig; -import com.sun.appserv.management.config.ProviderConfig; -import com.sun.appserv.management.config.SecurityServiceConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.HashMap; -import java.util.Map; - - -/** - */ -public final class MessageSecurityConfigTest - extends AMXTestBase { - public MessageSecurityConfigTest() { - } - - private static SecurityServiceConfig - getDefaultSecurityServiceConfig(final DomainRoot domainRoot) { - final ConfigConfig config = ConfigConfigTest.ensureDefaultInstance(domainRoot); - final SecurityServiceConfig ss = config.getSecurityServiceConfig(); - assert (ss != null); - return ss; - } - - private static MessageSecurityConfig - create( - final DomainRoot domainRoot, - final String authLayer) { - final SecurityServiceConfig ss = getDefaultSecurityServiceConfig(domainRoot); - - final Map optional = new HashMap(); - final MessageSecurityConfig msc = ss.createMessageSecurityConfig(authLayer, - "ClientProvider", ProviderConfig.PROVIDER_TYPE_CLIENT, - "com.sun.xml.wss.provider.ClientSecurityAuthModul", optional); - - msc.createProviderConfig("ServerProvider", - ProviderConfig.PROVIDER_TYPE_SERVER, "com.sun.xml.wss.provider.ServerSecurityAuthModule", optional); - - msc.createProviderConfig("DummyProvider1", - ProviderConfig.PROVIDER_TYPE_SERVER, "AMX.TEST.DummySecurityAuthModule", optional); - - msc.createProviderConfig("DummyProvider2", - ProviderConfig.PROVIDER_TYPE_SERVER, "AMX.TEST.DummySecurityAuthModule", optional); - - msc.removeProviderConfig("DummyProvider1"); - msc.removeProviderConfig("DummyProvider2"); - - return msc; - } - - static private final String AUTH_TYPE = MessageSecurityConfig.AUTH_LAYER_HTTP_SERVLET; - - /** - Note: this can't be tested except by making a new one, and the names are predefined, so - if it already exists, it must be deleted first. - */ - public void - testCreateRemove() { - final SecurityServiceConfig ss = getDefaultSecurityServiceConfig(getDomainRoot()); - final Map messageSecurityConfigs = ss.getMessageSecurityConfigMap(); - MessageSecurityConfig msc = messageSecurityConfigs.get(AUTH_TYPE); - - if (msc != null) { - ss.removeMessageSecurityConfig(AUTH_TYPE); - msc = null; - } - - msc = create(getDomainRoot(), AUTH_TYPE); - - ss.removeMessageSecurityConfig(AUTH_TYPE); - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ModuleLogLevelsConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ModuleLogLevelsConfigTest.java deleted file mode 100644 index 1ac5d0d355e..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ModuleLogLevelsConfigTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/ModuleLogLevelsConfigTest.java,v 1.6 2007/05/05 05:23:55 tcfujii Exp $ -* $Revision: 1.6 $ -* $Date: 2007/05/05 05:23:55 $ -*/ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.LogLevelValues; -import com.sun.appserv.management.config.ModuleLogLevelsConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Map; - - -/** - */ -public final class ModuleLogLevelsConfigTest - extends AMXTestBase { - public ModuleLogLevelsConfigTest() { - } - - protected ModuleLogLevelsConfig - getModuleLogLevelsConfig() { - return getConfigConfig().getLogServiceConfig().getModuleLogLevelsConfig(); - } - -/* - public void - testGetAll() { - final ModuleLogLevelsConfig config = getModuleLogLevelsConfig(); - - final Map all = config.getAllLevels(); - assert (all.size() == 24); - } - - public void - testChangeAll() { - final ModuleLogLevelsConfig config = getModuleLogLevelsConfig(); - - config.changeAll(LogLevelValues.FINE); - // verify that they were all changed - Map all = config.getAllLevels(); - for (final String value : all.values()) { - assert (value.equals(LogLevelValues.FINE)); - } - - config.changeAll(LogLevelValues.INFO); - // verify that they were all changed - all = config.getAllLevels(); - for (final String value : all.values()) { - assert (value.equals(LogLevelValues.INFO)); - } - } -*/ -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ModuleMonitoringLevelsConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ModuleMonitoringLevelsConfigTest.java deleted file mode 100644 index 40e20c4f99d..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ModuleMonitoringLevelsConfigTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.ModuleMonitoringLevelsConfig; -import com.sun.appserv.management.config.MonitoringServiceConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.AttributeList; -import javax.management.JMException; -import java.io.IOException; - - -/** - */ -public final class ModuleMonitoringLevelsConfigTest - extends AMXTestBase { - public ModuleMonitoringLevelsConfigTest() { - } - - public void - testGetAll() throws JMException, IOException { - final ModuleMonitoringLevelsConfig mml = getModuleMonitoringLevelsConfig(); - - final String[] allNames = new String[ ModuleMonitoringLevelsConfig.ALL_LEVEL_NAMES.size() ]; - ModuleMonitoringLevelsConfig.ALL_LEVEL_NAMES.toArray( allNames ); - - final AttributeList attrs = Util.getExtra(mml).getAttributes( allNames ); - assert allNames.length == attrs.size(); - } - - - public void - testCreateRemove() { - ModuleMonitoringLevelsConfig existing = getModuleMonitoringLevelsConfig(); - - final MonitoringServiceConfig mon = getConfigConfig().getMonitoringServiceConfig(); - mon.removeModuleMonitoringLevelsConfig(); - final ModuleMonitoringLevelsConfig newMM = mon.createModuleMonitoringLevelsConfig(null); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/NodeAgentConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/NodeAgentConfigTest.java deleted file mode 100644 index e728816628e..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/NodeAgentConfigTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.JMXConnectorConfig; -import com.sun.appserv.management.config.NodeAgentConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Map; - - -/** - */ -public final class NodeAgentConfigTest - extends AMXTestBase { - public NodeAgentConfigTest() { - } - - private void - sanityCheck(final NodeAgentConfig na) { - final JMXConnectorConfig jmx = na.getJMXConnectorConfig(); - - final String startServers = na.getStartServersInStartup(); - na.setStartServersInStartup(startServers); - - final String name = na.getSystemJMXConnectorName(); - na.setSystemJMXConnectorName(name); - } - - public void - testGetters() { - final Map m = getDomainConfig().getNodeAgentsConfig().getNodeAgentConfigMap(); - - if (m.size() == 0) { - warning("NodeAgentConfigTest: no NodeAgentConfigs to test"); - } else { - for (final NodeAgentConfig na : m.values()) { - sanityCheck(na); - } - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/PersistenceManagerFactoryResourceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/PersistenceManagerFactoryResourceConfigTest.java deleted file mode 100644 index 2f0cda2d43a..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/PersistenceManagerFactoryResourceConfigTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.PersistenceManagerFactoryResourceConfig; - -import java.util.Map; - -/** - */ -public final class PersistenceManagerFactoryResourceConfigTest - extends ResourceConfigTestBase { - public PersistenceManagerFactoryResourceConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("PersistenceManagerFactoryResourceConfig"); - } - - public static PersistenceManagerFactoryResourceConfig - ensureDefaultInstance(final DomainConfig dc) { - PersistenceManagerFactoryResourceConfig result = - dc.getResourcesConfig().getPersistenceManagerFactoryResourceConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(dc, - getDefaultInstanceName(), - null); - } - - return result; - } - - public static PersistenceManagerFactoryResourceConfig - createInstance( - final DomainConfig dc, - final String name, - final Map optional) { - return dc.getResourcesConfig().createPersistenceManagerFactoryResourceConfig( - name, optional); - } - - - protected Container - getProgenyContainer() { - return getDomainConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.PERSISTENCE_MANAGER_FACTORY_RESOURCE_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getDomainConfig().getResourcesConfig().removePersistenceManagerFactoryResourceConfig(name); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final PersistenceManagerFactoryResourceConfig config = - getDomainConfig().getResourcesConfig().createPersistenceManagerFactoryResourceConfig(name, options); - - addReference(config); - - return (config); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ProfilerConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ProfilerConfigTest.java deleted file mode 100644 index ae9831b0cde..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ProfilerConfigTest.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.JavaConfig; -import com.sun.appserv.management.config.ProfilerConfig; -import com.sun.appserv.management.config.ProfilerConfigKeys; -import com.sun.appserv.management.util.jmx.JMXUtil; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.HashMap; -import java.util.Map; - -/** - */ -public final class ProfilerConfigTest - extends AMXTestBase { - private static final String NATIVE_LIBRARY_PATH = "a/b/c"; - private static final String CLASSPATH = "/foo/bar"; - - private static Map - getOptional() { - final Map optional = new HashMap(); - optional.put(ProfilerConfigKeys.NATIVE_LIBRARY_PATH_KEY, NATIVE_LIBRARY_PATH); - optional.put(ProfilerConfigKeys.CLASSPATH_KEY, CLASSPATH); - optional.put(ProfilerConfigKeys.ENABLED_KEY, "false"); - return optional; - } - - public ProfilerConfigTest() { - if (checkNotOffline("testIllegalCreate")) { - ensureDefaultInstance(getConfigConfig().getJavaConfig()); - } - } - - public static ProfilerConfig - ensureDefaultInstance(final JavaConfig javaConfig) { - ProfilerConfig prof = javaConfig.getProfilerConfig(); - if (prof == null) { - final String NAME = "profiler"; - - prof = javaConfig.createProfilerConfig(NAME, getOptional()); - assert prof != null; - } - - return prof; - } - - private void - testGetters(final ProfilerConfig prof) { - assert (prof.getClasspath() != null); - prof.setClasspath(prof.getClasspath()); - - assert (prof.getNativeLibraryPath() != null); - prof.setNativeLibraryPath(prof.getNativeLibraryPath()); - - assert (prof.getJVMOptions() != null); - prof.setJVMOptions(prof.getJVMOptions()); - - prof.setEnabled(prof.getEnabled()); - } - - public synchronized void - testCreateRemoveProfiler() - throws Exception { - if (checkNotOffline("testIllegalCreate")) { - ensureDefaultInstance(getConfigConfig().getJavaConfig()); - - final JavaConfig javaConfig = getConfigConfig().getJavaConfig(); - - javaConfig.removeProfilerConfig(); - assert javaConfig.getProfilerConfig() == null : - "Can't remove ProfilerConfig from " + - JMXUtil.toString(Util.getObjectName(javaConfig)); - - ensureDefaultInstance(javaConfig); - assert javaConfig.getProfilerConfig() != null; - Util.getExtra(javaConfig.getProfilerConfig()).getMBeanInfo(); - - testGetters(javaConfig.getProfilerConfig()); - - javaConfig.removeProfilerConfig(); - ensureDefaultInstance(javaConfig); - assert javaConfig.getProfilerConfig() != null; - Util.getExtra(javaConfig.getProfilerConfig()).getMBeanInfo(); - testGetters(javaConfig.getProfilerConfig()); - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/PropertiesAccessTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/PropertiesAccessTest.java deleted file mode 100644 index be06beb80f6..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/PropertiesAccessTest.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.PropertiesAccess; -import com.sun.appserv.management.config.PropertyConfig; -import com.sun.appserv.management.util.misc.GSetUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.TestUtil; - -import javax.management.ObjectName; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class PropertiesAccessTest - extends AMXTestBase { - public PropertiesAccessTest() { - } - - private Set - getAllImplementorsOfProperties() - throws Exception { - final Set amxs = getQueryMgr().queryInterfaceSet( - PropertiesAccess.class.getName(), null); - - return (TestUtil.newSortedSet(Util.toObjectNames(amxs))); - - } - - - private void - testCreateEmptyProperty(final PropertiesAccess props) { - final String NAME = "test.empty"; - - final PropertyConfig pc = props.createPropertyConfig(NAME, ""); - assert props.getPropertyConfigMap().get(NAME) != null; - props.removePropertyConfig(NAME); - assert props.getPropertyConfigMap().get(NAME) == null; - } - - private void - testPropertiesGet(final PropertiesAccess props) { - final Map all = props.getPropertyConfigMap(); - - for (final PropertyConfig prop : all.values() ) { - final String name = prop.getName(); - final String value = prop.getValue(); - } - } - - private void - testPropertiesSetToSameValue(final PropertiesAccess props) { - final Map all = props.getPropertyConfigMap(); - - // get each property, set it to the same value, the verify - // it's the same. - for ( final PropertyConfig prop : all.values() ) { - - final String value = prop.getValue(); - prop.setValue(value); - - assert (prop.getValue().equals(value)); - } - } - - /** - Adding or removing test properties to these types does not - cause any side effects. Plus, there is no need to test - every MBean. - */ - private static final Set TEST_CREATE_REMOVE_TYPES = - GSetUtil.newUnmodifiableStringSet( - XTypes.DOMAIN_CONFIG, - XTypes.CONFIG_CONFIG, - XTypes.PROFILER_CONFIG, - XTypes.STANDALONE_SERVER_CONFIG, - XTypes.CLUSTERED_SERVER_CONFIG, - XTypes.ORB_CONFIG, - XTypes.MODULE_MONITORING_LEVELS_CONFIG, - XTypes.NODE_AGENT_CONFIG - ); - - private void - testPropertiesCreateRemove(final PropertiesAccess props) { - - final AMX amx = Util.asAMX(props); - final String j2eeType = amx.getJ2EEType(); - if (!TEST_CREATE_REMOVE_TYPES.contains(j2eeType)) { - return; - } - - final Map startProps = props.getPropertyConfigMap(); - // add some properties, then delete them - final int numToAdd = 1; - final long now = System.currentTimeMillis(); - for (int i = 0; i < numToAdd; ++i) { - final String testName = "__junittest_" + i + now; - - if (props.getPropertyConfigMap().get(testName) != null) { - failure("test property already exists: " + testName); - } - - props.createPropertyConfig(testName, "value_" + i); - assert (props.getPropertyConfigMap().get(testName) != null); - } - final int numProps = props.getPropertyConfigMap().keySet().size(); - - if (numProps != numToAdd + startProps.keySet().size() ) { - failure("expecting " + numProps + " have " + numToAdd + startProps.keySet().size()); - } - - // remove the ones we added - for (int i = 0; i < numToAdd; ++i) { - final String testName = "__junittest_" + i + now; - - props.removePropertyConfig(testName); - assert props.getPropertyConfigMap().get(testName) == null; - } - - assert (props.getPropertyConfigMap().size() == startProps.keySet().size() ); - } - - public void - checkGetProperties(final ObjectName src) - throws Exception { - final AMX proxy = getProxy(src); - - if (!(proxy instanceof PropertiesAccess)) { - throw new IllegalArgumentException( - "MBean does not implement PropertiesAccess: " + quote(src)); - } - - final PropertiesAccess props = (PropertiesAccess) proxy; - testPropertiesGet(props); - } - - public void - checkSetPropertiesSetToSameValue(final ObjectName src) - throws Exception { - final PropertiesAccess props = (PropertiesAccess) getProxy(src); - - testPropertiesSetToSameValue(props); - } - - - public void - checkCreateRemove(final ObjectName src) - throws Exception { - final PropertiesAccess props = (PropertiesAccess) getProxy(src); - - testPropertiesCreateRemove(props); - } - - public synchronized void - testPropertiesGet() - throws Exception { - final Set all = getAllImplementorsOfProperties(); - - testAll(all, "checkGetProperties"); - } - - public synchronized void - testPropertiesSetToSameValue() - throws Exception { - final Set all = getAllImplementorsOfProperties(); - - testAll(all, "checkSetPropertiesSetToSameValue"); - } - - - public synchronized void - testPropertiesCreateRemove() - throws Exception { - if (checkNotOffline("testPropertiesCreateRemove")) { - final Set all = getAllImplementorsOfProperties(); - - testAll(all, "checkCreateRemove"); - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ReferencesTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ReferencesTest.java deleted file mode 100644 index 4f0022ad92a..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ReferencesTest.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/ReferencesTest.java,v 1.8 2007/05/05 05:23:55 tcfujii Exp $ - * $Revision: 1.8 $ - * $Date: 2007/05/05 05:23:55 $ - */ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.client.AppserverConnectionSource; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.MailResourceConfig; -import com.sun.appserv.management.config.ResourceRefConfig; -import com.sun.appserv.management.config.StandaloneServerConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Map; - - -/** - */ -public final class ReferencesTest - extends AMXTestBase { - public ReferencesTest() { - } - - - private static final String MAIL_RESOURCE_NAME = "test/mail1"; - - MailResourceConfig - createMailResourceConfig() { - final MailResourceConfig mr = - getDomainConfig().getResourcesConfig().createMailResourceConfig( - MAIL_RESOURCE_NAME, - "localhost", - "mailuser@domain.com", - "mailfrom@domain.com", - null); - return mr; - } - - MailResourceConfig - ensureMailResourceConfig() { - final Map mails = - getDomainConfig().getResourcesConfig().getMailResourceConfigMap(); - - MailResourceConfig mr = mails.get(MAIL_RESOURCE_NAME); - if (mr == null) { - mr = createMailResourceConfig(); - } - return mr; - } - - void - removeMailResourceConfig() { - final Map mails = - getDomainConfig().getResourcesConfig().getMailResourceConfigMap(); - - MailResourceConfig mr = mails.get(MAIL_RESOURCE_NAME); - if (mr != null) { - getDomainConfig().getResourcesConfig().removeMailResourceConfig(mr.getName()); - } - } - - public void - testCreateAndRemoveResourceRefStandaloneServer() - throws Exception { - if (!checkNotOffline("testCreateRemove")) { - return; - } - - final Map nodeAgents = - getNodeAgents(); - - if (nodeAgents.keySet().size() == 0) { - warning( - "testCreateAndRemoveResourceRefStandaloneServer: no Node Agents--SKIPPING TEST"); - return; - } - final String nodeAgentName = nodeAgents.keySet().iterator().next(); - - final ConfigSetup setup = new ConfigSetup(getDomainRoot()); - - ensureMailResourceConfig(); - - final String serverName = "testCreateAndRemoveResourceRefStandaloneServer"; - final String configName = serverName + "-config"; - - final ConfigConfig config = setup.createConfig(configName); - try { - final int basePort = 34770; - - final StandaloneServerConfig server = - setup.createServer(serverName, basePort, nodeAgentName, configName); - try { - final ResourceRefConfig ref = - server.createResourceRefConfig(MAIL_RESOURCE_NAME); - assert (ref != null); - - server.removeResourceRefConfig(ref.getName()); - } - catch (Exception e) { - setup.removeServer(serverName); - throw e; - } - finally { - removeMailResourceConfig(); - } - } - catch (Exception e) { - setup.removeConfig(configName); - throw e; - } - } - - public void - testCreateRefToMissingTarget() { - if (!checkNotOffline("testCreateRemove")) { - return; - } - - final String MISSING_NAME = "NonExistent"; - - final DomainConfig domainConfig = getDomainRoot().getDomainConfig(); - final StandaloneServerConfig serverConfig = - domainConfig.getServersConfig().getStandaloneServerConfigMap().get("server"); - - try { - serverConfig.createResourceRefConfig(MISSING_NAME); - assert false; - - serverConfig.createDeployedItemRefConfig(MISSING_NAME); - assert false; - } - catch (Exception e) { - // good - } - - } - - /* - public void testCreateAndRemoveResourceRefCluster() - { - Map clusterMap = - getDomainConfig().getClusterConfigMap(); - - ClusterConfig cluster = clusterMap.get("testCluster"); - - cluster.createResourceRefConfig("jdbc/PointBase"); - - cluster.removeResourceRefConfig("jdbc/PointBase"); - } - */ - - /* - - - - public void testCreateAndRemoveDeployedItemRef() { - trace("\n..testCreateAndRemoveDeployedItemRef"); - - StandaloneServerConfigMgr proxy = - getDomainConfig().getStandaloneServerConfigMgr(); - - ClusterConfigMgr c = - getDomainConfig().getClusterConfigMgr(); - - Map serverMap = - getDomainConfig().getStandaloneServerConfigMap(); - - Map clusterMap = - getDomainConfig().getClusterConfigMap(); - - trace("I got the names of the servers!!!!!" + serverMap); - StandaloneServerConfig server = - (StandaloneServerConfig)serverMap.get("testServer"); - - trace("I got the names of the clusters!!!!!" + clusterMap); - ClusterConfig cluster = - (ClusterConfig)clusterMap.get("testCluster"); - - DeployedItemRefConfigMgr deploy = - server.getDeployedItemRefConfigMgr(); - - - DeployedItemRefConfigMgr deploy2 = - cluster.getDeployedItemRefConfigMgr(); - - trace("I got the deploy item ref mgr proxy from server! " + deploy); - - trace("I got the deploy item ref mgr proxy from cluster! " + deploy2); - - trace("New deployedItemRef: " + - deploy.create("jndiTree", new java.util.HashMap())); - - trace("New deployedItemRef: " + - deploy2.create("jndiTree", new java.util.HashMap())); - - try { - trace("Sleeping....."); - Thread.sleep(2000); - } catch (Exception e) { - e.printStackTrace(); - } - - // remove("testDeployedItemRefServer"); - // c.remove("testDeployedItemRefCluster"); - - deploy.remove("jndiTree"); - deploy2.remove("jndiTree"); - } - - - public void testCreateAndRemoveServerRef() - { - trace("\n..testCreateAndRemoveServerRef"); - - Map map = - getDomainConfig().getClusterConfigMap(); - Set names = map.keySet(); - trace("I got the names of the clusters!!!!!" + map); - ClusterConfig proxy = - (ClusterConfig)map.get("testCluster"); - - ServerRefConfigMgr serverRefMgr = - getServerRefConfigMgr(); - - trace("I got the server ref proxy! " + serverRefMgr); - - trace("New server reference: " + - serverRefMgr.create("testServerRef")); - - try { - trace("Sleeping....."); - Thread.sleep(2000); - } catch (Exception e) { - e.printStackTrace(); - } - - trace("Removing the server reference!!"); - serverRefMgr.remove("testServerRef"); - - } - - - public void testCreateAndRemoveStandaloneServer() - { - trace("\n..testCreateAndRemoveServer"); - - ConfigConfigMgr configMgr = - getDomainConfig().getConfigConfigMgr(); - - trace("I got the config proxy! " + configMgr); - trace("New config: " + - configMgr.create("testConfig", new java.util.HashMap())); - StandaloneServerConfigMgr proxy = - getDomainConfig().getStandaloneServerConfigMgr(); - - trace("I got the standalone server proxy! " + proxy); - - assert(proxy != null) : "The StandaloneServerConfigMgr is NULL!!"; - - trace("New standAloneServer: " + - create("testStandaloneServerWithNewSig", "test-agent", - "testConfig", null)); - - try { - trace("Sleeping....."); - Thread.sleep(2000); - } catch (Exception e) { - e.printStackTrace(); - } - - trace("Removing the standalone server!!"); - - remove("testStandaloneServerWithNewSig"); - - // configMgr.remove("testConfig"); - } - - - public void testCreateAndRemoveClusteredServer() - throws IOException { - trace("\n..testCreateAndRemoveClusteredServer"); - - ClusteredServerConfigMgr proxy = - getDomainConfig().getClusteredServerConfigMgr(); - - trace("I got the clustered server proxy! " + proxy); - - - trace("New cluster: " + - create("testClusteredServerWithNewSig", null, null, )); - - try { - trace("Sleeping....."); - Thread.sleep(2000); - } catch (Exception e) { - e.printStackTrace(); - } - - trace("Removing the slustered server!!"); - remove("testClusteredServer"); - - } - */ - - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ResourceAdapterConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ResourceAdapterConfigTest.java deleted file mode 100644 index 94bd4669707..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ResourceAdapterConfigTest.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/ResourceAdapterConfigTest.java,v 1.5 2007/05/05 05:23:55 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:23:55 $ -*/ -package org.glassfish.admin.amxtest.config; - - -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.ResourceAdapterConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - - -/** - */ -public final class ResourceAdapterConfigTest - extends AMXTestBase { - public ResourceAdapterConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("ResourceAdapterConfig"); - } - - public static ResourceAdapterConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - ResourceAdapterConfig result = - domainConfig.getResourcesConfig().getResourceAdapterConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(domainConfig, getDefaultInstanceName()); - } - - return result; - } - - public static ResourceAdapterConfig - createInstance( - final DomainConfig domainConfig, - final String name) { - final ResourceAdapterConfig rac = - domainConfig.getResourcesConfig().createResourceAdapterConfig(name, null); - - return rac; - } - - private void - testGetters(final ResourceAdapterConfig resAdapterConfig) { - resAdapterConfig.getResourceAdapterName(); - resAdapterConfig.getThreadPoolIDs(); - } - - public void - testCreateRemove() { - if (checkNotOffline("testCreateSSL")) { - final ResourceAdapterConfig resAdapterConfig = - createInstance(getDomainConfig(), - "ResourceAdapterConfigTest.testCreateRemove"); - - try { - testGetters(resAdapterConfig); - } - finally { - getDomainConfig().getResourcesConfig().removeResourceAdapterConfig(resAdapterConfig.getName()); - } - } - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ResourceConfigTestBase.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ResourceConfigTestBase.java deleted file mode 100644 index 1a753156db4..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ResourceConfigTestBase.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.ResourceConfig; -import com.sun.appserv.management.config.StandaloneServerConfig; -import com.sun.appserv.management.util.misc.ExceptionUtil; - -/** - */ -public abstract class ResourceConfigTestBase - extends ConfigMgrTestBase { - protected ResourceConfigTestBase() { - super(); - - StandaloneServerConfigTest.ensureDefaultInstance(getDomainRoot()); - } - - protected void - addReference(final ResourceConfig rc) { - final StandaloneServerConfig server = - StandaloneServerConfigTest.ensureDefaultInstance(getDomainRoot()); - assert server != null; - - if (server.getResourceRefConfigMap().get(rc.getName()) != null) { - warning("ResourceRefConfig already exists for: " + rc.getName()); - } else { - try { - server.createResourceRefConfig(rc.getName(), false); - } - catch (Exception e) { - final Throwable rootCause = ExceptionUtil.getRootCause(e); - - warning("Couldn't add RefConfig to: " + Util.getObjectName(rc)); - } - } - - assert server.getResourceRefConfigMap().get(rc.getName()) != null; - } - - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SSLConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SSLConfigTest.java deleted file mode 100644 index 9b9426c6d11..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SSLConfigTest.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/SSLConfigTest.java,v 1.5 2007/05/05 05:23:55 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:23:55 $ -*/ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.SSLConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Iterator; -import java.util.Set; - - -/** - */ -public final class SSLConfigTest - extends AMXTestBase { - public SSLConfigTest() { - } - - public void - testGetAttrs() { - final QueryMgr queryMgr = getQueryMgr(); - - final String props = Util.makeJ2EETypeProp(XTypes.SSL_CONFIG); - final Set sslConfigs = queryMgr.queryPropsSet(props); - final Iterator iter = sslConfigs.iterator(); - while (iter.hasNext()) { - final SSLConfig ssl = (SSLConfig) iter.next(); - - ssl.getCertNickname(); - ssl.getClientAuthEnabled(); - - ssl.getSSL2Enabled(); - ssl.getSSL2Ciphers(); - - ssl.getSSL3Enabled(); - ssl.getSSL3TLSCiphers(); - - ssl.getTLSEnabled(); - - ssl.getTLSRollbackEnabled(); - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SecurityMapConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SecurityMapConfigTest.java deleted file mode 100644 index 95bed9004e1..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SecurityMapConfigTest.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.config.BackendPrincipalConfig; -import com.sun.appserv.management.config.ConnectorConnectionPoolConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.ResourceAdapterConfig; -import com.sun.appserv.management.config.SecurityMapConfig; -import com.sun.appserv.management.util.misc.GSetUtil; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Set; - - -/** - */ -public final class SecurityMapConfigTest - extends AMXTestBase { - public SecurityMapConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("SecurityMapConfig"); - } - - private static final String DEFAULT_BACKEND_PRINCIPAL = "SecurityMapConfigTest.default"; - private static final String DEFAULT_BACKEND_PASSWORD = "changeme"; - private static final String[] DEFAULT_PRINCIPALS = - new String[]{"SecurityMapConfigTest.principal1"}; - private static final String[] DEFAULT_USERGROUPS = new String[0]; - - public static SecurityMapConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - final ConnectorConnectionPoolConfig ccpc = - ConnectorConnectionPoolConfigTest.ensureDefaultInstance(domainConfig); - - SecurityMapConfig result = - ccpc.getSecurityMapConfigMap().get(getDefaultInstanceName()); - if (result == null) { - result = createInstance(ccpc, - getDefaultInstanceName(), - DEFAULT_BACKEND_PRINCIPAL, - DEFAULT_BACKEND_PASSWORD, - DEFAULT_PRINCIPALS, - DEFAULT_USERGROUPS); - } - - return result; - } - - - private void - testGetters(final SecurityMapConfig smc) { - final String[] principalNames = smc.getPrincipalNames(); - final String[] userGroupNames = smc.getUserGroupNames(); - - assert (principalNames != null || userGroupNames != null) : "both principals and usergroups are null"; - - final BackendPrincipalConfig bpc = smc.getBackendPrincipalConfig(); - assert (bpc != null); - final String s = bpc.getUserName(); - bpc.setUserName(s); - final String password = bpc.getPassword(); - bpc.setPassword(password); - } - - - public static SecurityMapConfig - createInstance( - final ConnectorConnectionPoolConfig ccpc, - final String name, - final String backendPrincipalUsername, - final String backendPrincipalPassword, - final String[] principals, - final String[] userGroups) { - final SecurityMapConfig smc = - ccpc.createSecurityMapConfig(name, - backendPrincipalUsername, backendPrincipalPassword, - principals, userGroups); - - return smc; - } - - private static final String CONNECTOR_DEF_NAME = "javax.resource.cci.ConnectionFactory"; - - public void - testCreateRemove() { - if (!checkNotOffline("testDeleteLBConfig")) { - return; - } - - final String TEST_NAME = "SecurityMapConfigTest.testCreateRemove"; - final ResourceAdapterConfig rac = ResourceAdapterConfigTest.createInstance( - getDomainConfig(), TEST_NAME); - - try { - final ConnectorConnectionPoolConfig ccpc = - ConnectorConnectionPoolConfigTest.createInstance(getDomainConfig(), - TEST_NAME, - CONNECTOR_DEF_NAME, - rac.getName(), null); - - try { - final String smcName = "SecurityMapConfigTest.testCreateRemove"; - final String[] principals = new String[]{"SecurityMapConfigTest.testCreateRemove"}; - final String[] userGroups = new String[0]; - final SecurityMapConfig smc = createInstance( - ccpc, - smcName, - DEFAULT_BACKEND_PRINCIPAL, - DEFAULT_BACKEND_PASSWORD, - principals, - null); - try { - assert (smcName.equals(smc.getName())); - assert (smc == ccpc.getSecurityMapConfigMap().get(smc.getName())); - testGetters(smc); - - final Set principalsBefore = GSetUtil.newSet(smc.getPrincipalNames()); - final String PRINCIPAL1 = "testCreateRemove.test1"; - smc.createPrincipal(PRINCIPAL1); - - final Set principalsAfter = GSetUtil.newSet(smc.getPrincipalNames()); - assert (principalsAfter.contains(PRINCIPAL1)); - - smc.removePrincipal(PRINCIPAL1); - assert (principalsBefore.equals(GSetUtil.newSet(smc.getPrincipalNames()))); - - } - finally { - ccpc.removeSecurityMapConfig(smc.getName()); - } - } - finally { - getDomainConfig().getResourcesConfig().removeConnectorConnectionPoolConfig(ccpc.getName()); - } - } - finally { - getDomainConfig().getResourcesConfig().removeResourceAdapterConfig(rac.getName()); - } - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SecurityServiceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SecurityServiceConfigTest.java deleted file mode 100644 index 9fe05739712..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SecurityServiceConfigTest.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.BackendPrincipalConfig; -import com.sun.appserv.management.config.ConnectorConnectionPoolConfig; -import com.sun.appserv.management.config.DomainConfig; -import com.sun.appserv.management.config.ResourceAdapterConfig; -import com.sun.appserv.management.config.SecurityMapConfig; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Set; - - -/** - */ -public final class SecurityServiceConfigTest - extends AMXTestBase { - public SecurityServiceConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainConfig()); - } - } - - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("SecurityMapConfig"); - } - - private static final String DEFAULT_BACKEND_PRINCIPAL = "SecurityMapConfigTest.default"; - private static final String DEFAULT_BACKEND_PASSWORD = "changeme"; - private static final String[] DEFAULT_PRINCIPALS = - new String[]{"SecurityMapConfigTest.principal1"}; - private static final String[] DEFAULT_USERGROUPS = new String[0]; - - public static SecurityMapConfig - ensureDefaultInstance(final DomainConfig domainConfig) { - final ConnectorConnectionPoolConfig ccpc = - ConnectorConnectionPoolConfigTest.ensureDefaultInstance(domainConfig); - - SecurityMapConfig result = - ccpc.getSecurityMapConfigMap().get(getDefaultInstanceName()); - if (result == null) { - result = createInstance(ccpc, - getDefaultInstanceName(), - DEFAULT_BACKEND_PRINCIPAL, - DEFAULT_BACKEND_PASSWORD, - DEFAULT_PRINCIPALS, - DEFAULT_USERGROUPS); - } - - return result; - } - - - private void - testGetters(final SecurityMapConfig smc) { - final String[] principalNames = smc.getPrincipalNames(); - final String[] userGroupNames = smc.getUserGroupNames(); - - assert (principalNames != null || userGroupNames != null) : "both principals and usergroups are null"; - - final BackendPrincipalConfig bpc = smc.getBackendPrincipalConfig(); - assert (bpc != null) : "null BackendPrincipalConfig for " + JMXUtil.toString(Util.getExtra(smc).getObjectName()); - final String s = bpc.getUserName(); - bpc.setUserName(s); - final String password = bpc.getPassword(); - bpc.setPassword(password); - } - - - public static SecurityMapConfig - createInstance( - final ConnectorConnectionPoolConfig ccpc, - final String name, - final String backendPrincipalUsername, - final String backendPrincipalPassword, - final String[] principals, - final String[] userGroups) { - final SecurityMapConfig smc = - ccpc.createSecurityMapConfig(name, - backendPrincipalUsername, backendPrincipalPassword, - principals, userGroups); - - return smc; - } - - private static final String CONNECTOR_DEF_NAME = "javax.resource.cci.ConnectionFactory"; - - public void - testCreateRemove() { - if (!checkNotOffline("testDeleteLBConfig")) { - return; - } - - final String TEST_NAME = "SecurityMapConfigTest.testCreateRemove"; - final ResourceAdapterConfig rac = ResourceAdapterConfigTest.createInstance( - getDomainConfig(), TEST_NAME); - - try { - final ConnectorConnectionPoolConfig ccpc = - ConnectorConnectionPoolConfigTest.createInstance(getDomainConfig(), - TEST_NAME, - CONNECTOR_DEF_NAME, - rac.getName(), null); - - try { - final String smcName = TEST_NAME; - final String[] principals = new String[]{TEST_NAME}; - final String[] userGroups = new String[0]; - final SecurityMapConfig smc = createInstance( - ccpc, - smcName, - DEFAULT_BACKEND_PRINCIPAL, - DEFAULT_BACKEND_PASSWORD, - principals, - null); - try { - assert (smcName.equals(smc.getName())); - assert (smc == ccpc.getSecurityMapConfigMap().get(smc.getName())); - testGetters(smc); - - final Set principalsBefore = GSetUtil.newSet(smc.getPrincipalNames()); - final String PRINCIPAL1 = "testCreateRemove.test1"; - smc.createPrincipal(PRINCIPAL1); - - final Set principalsAfter = GSetUtil.newSet(smc.getPrincipalNames()); - assert (principalsAfter.contains(PRINCIPAL1)); - - smc.removePrincipal(PRINCIPAL1); - assert (principalsBefore.equals(GSetUtil.newSet(smc.getPrincipalNames()))); - - } - finally { - ccpc.removeSecurityMapConfig(smc.getName()); - } - } - finally { - getDomainConfig().getResourcesConfig().removeConnectorConnectionPoolConfig(ccpc.getName()); - } - } - finally { - getDomainConfig().getResourcesConfig().removeResourceAdapterConfig(rac.getName()); - } - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/StandaloneServerConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/StandaloneServerConfigTest.java deleted file mode 100644 index 6f624e4701f..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/StandaloneServerConfigTest.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/config/StandaloneServerConfigTest.java,v 1.9 2007/05/05 05:23:55 tcfujii Exp $ -* $Revision: 1.9 $ -* $Date: 2007/05/05 05:23:55 $ -*/ -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.DomainRoot; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.NodeAgentConfig; -import com.sun.appserv.management.config.StandaloneServerConfig; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import java.util.Map; - - -/** - */ -public final class StandaloneServerConfigTest - extends AMXTestBase { - public StandaloneServerConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getDomainRoot()); - } - } - - public static String - getDefaultInstanceName() { - return "server"; - } - - /** - We want the default instance to be available on both PE and EE - so we have no choice but to use the DAS instance. - */ - public static StandaloneServerConfig - ensureDefaultInstance(final DomainRoot domainRoot) { - final Map servers = - domainRoot.getDomainConfig().getServersConfig().getStandaloneServerConfigMap(); - - StandaloneServerConfig server = servers.get(getDefaultInstanceName()); - assert (server != null); - - return server; - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - - private void - _testCreateStandaloneServerConfig( - final String serverNameSuffix, - final int basePort) { - final ConfigSetup setup = new ConfigSetup(getDomainRoot()); - - final Map nodeAgentConfigs = getDomainConfig().getNodeAgentsConfig().getNodeAgentConfigMap(); - - if (nodeAgentConfigs.keySet().size() == 0) { - warning("testCreateStandaloneServerConfig: No node agents available, skipping test."); - } else { - // create a server for each node agent - for (final String nodeAgentName : nodeAgentConfigs.keySet()) { - final String serverName = nodeAgentName + serverNameSuffix; - final String configName = serverName + "-config"; - - // in case a previous failed run left them around - setup.removeServer(serverName); - setup.removeConfig(configName); - - final ConfigConfig config = setup.createConfig(configName); - assert (configName.equals(config.getName())); - - // sanity check - final Map attrs = Util.getExtra(config).getAllAttributes(); - - try { - final StandaloneServerConfig server = - setup.createServer(serverName, basePort, nodeAgentName, config.getName()); - // it worked, get rid of it - setup.removeServer(server.getName()); - } - catch (Throwable t) { - assert false : ExceptionUtil.toString(t); - } - finally { - try { - setup.removeConfig(config.getName()); - } - catch (Exception ee) { - // we wanted to get rid of it...oh well. - } - } - } - } - } - - public void - testCreateStandaloneServerConfigWithDefaults() { - final int basePort = 0; // use the defaults - - _testCreateStandaloneServerConfig(".StandaloneServerConfigTestWithDefaults", basePort); - } - - - public void - testCreateStandaloneServerConfig() { - final int basePort = 52788; - - _testCreateStandaloneServerConfig(".StandaloneServerConfigTest", basePort); - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SystemPropertiesAccessTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SystemPropertiesAccessTest.java deleted file mode 100644 index 303f50ae773..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/SystemPropertiesAccessTest.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.config.SystemPropertiesAccess; -import com.sun.appserv.management.config.SystemPropertyConfig; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.ObjectName; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class SystemPropertiesAccessTest - extends AMXTestBase { - public SystemPropertiesAccessTest() { - } - - private Set - getAll() - throws Exception { - final Set objectNames = - getQueryMgr().queryInterfaceObjectNameSet( - SystemPropertiesAccess.class.getName(), null); - - return (objectNames); - } - - - private void - checkPropertiesGet(final SystemPropertiesAccess props) { - final Map all = props.getSystemPropertyConfigMap(); - - for (final SystemPropertyConfig prop : all.values() ) { - final String value = prop.getValue(); - } - } - - private void - testPropertiesSetToSameValue(final SystemPropertiesAccess props) { - final Map all = props.getSystemPropertyConfigMap(); - - // get each property, set it to the same value, the verify - // it's the same. - for ( final SystemPropertyConfig prop : all.values() ) { - - final String value = prop.getValue(); - prop.setValue(value); - - assert prop.getValue().equals(value); - } - } - - private void - testCreateEmptySystemProperty(final SystemPropertiesAccess props) { - final String NAME = "test.empty"; - - props.createSystemPropertyConfig(NAME, ""); - assert props.getSystemPropertyConfigMap().get(NAME) != null; - props.removeSystemPropertyConfig(NAME); - assert props.getSystemPropertyConfigMap().get(NAME) == null; - } - - private void - testSystemPropertiesCreateRemove(final SystemPropertiesAccess props) { - final Map all = props.getSystemPropertyConfigMap(); - - // add some properties, then delete them - final int numToAdd = 1; - final long now = System.currentTimeMillis(); - for (int i = 0; i < numToAdd; ++i) { - final String testName = "__junittest_" + i + now; - - if ( all.get(testName) != null) { - failure("test property already exists: " + testName); - } - - props.createSystemPropertyConfig(testName, "value_" + i); - assert props.getSystemPropertyConfigMap().get(testName) != null; - } - final int numProps = props.getSystemPropertyConfigMap().keySet().size(); - - if (numProps != numToAdd + all.keySet().size() ) { - failure("expecting " + numProps + " have " + numToAdd + all.keySet().size()); - } - - // remove the ones we added - for (int i = 0; i < numToAdd; ++i) { - final String testName = "__junittest_" + i + now; - - props.removeSystemPropertyConfig(testName); - assert props.getSystemPropertyConfigMap().get(testName) == null; - } - - assert (props.getSystemPropertyConfigMap().keySet().size() == all.keySet().size() ); - - } - - public synchronized void - checkGetProperties(final ObjectName src) - throws Exception { - final AMX proxy = getProxy(src, AMX.class); - - if (!(proxy instanceof SystemPropertiesAccess)) { - throw new IllegalArgumentException( - "MBean does not implement SystemPropertiesAccess: " + quote(src)); - } - - final SystemPropertiesAccess props = (SystemPropertiesAccess) proxy; - checkPropertiesGet(props); - } - - public void - checkSetPropertiesSetToSameValue(final ObjectName src) - throws Exception { - final SystemPropertiesAccess props = getProxy(src, SystemPropertiesAccess.class); - - testPropertiesSetToSameValue(props); - } - - - public void - checkCreateRemove(final ObjectName src) - throws Exception { - final SystemPropertiesAccess props = - getProxy(src, SystemPropertiesAccess.class); - - testSystemPropertiesCreateRemove(props); - } - - public synchronized void - testPropertiesGet() - throws Exception { - final Set all = getAll(); - - testAll(all, "checkGetProperties"); - } - - public synchronized void - testPropertiesSetToSameValue() - throws Exception { - final Set all = getAll(); - - testAll(all, "checkSetPropertiesSetToSameValue"); - } - - - public synchronized void - testCreateRemove() - throws Exception { - if (checkNotOffline("testCreateRemove")) { - final Set all = getAll(); - testAll(all, "checkCreateRemove"); - } - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ThreadPoolConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ThreadPoolConfigTest.java deleted file mode 100644 index 1054257011c..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/ThreadPoolConfigTest.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.ConfigConfig; -import com.sun.appserv.management.config.ThreadPoolConfig; -import com.sun.appserv.management.config.ThreadPoolConfigKeys; -import com.sun.appserv.management.util.misc.MapUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - */ -public final class ThreadPoolConfigTest - extends ConfigMgrTestBase { - static final Map OPTIONAL = new HashMap(); - - static { - OPTIONAL.put(ThreadPoolConfigKeys.MIN_THREAD_POOL_SIZE_KEY, "10"); - OPTIONAL.put(ThreadPoolConfigKeys.MAX_THREAD_POOL_SIZE_KEY, "100"); - OPTIONAL.put(ThreadPoolConfigKeys.IDLE_THREAD_TIMEOUT_IN_SECONDS_KEY, "120"); - OPTIONAL.put(ThreadPoolConfigKeys.NUM_WORK_QUEUES_KEY, "10"); - } - - public ThreadPoolConfigTest() { - if (checkNotOffline("ensureDefaultInstance")) { - ensureDefaultInstance(getConfigConfig()); - } - } - - public static String - getDefaultInstanceName() { - return getDefaultInstanceName("ThreadPoolConfig"); - } - - public static ThreadPoolConfig - ensureDefaultInstance(final ConfigConfig cc) { - ThreadPoolConfig result = cc.getThreadPoolsConfig().getThreadPoolConfigMap().get(getDefaultInstanceName()); - - if (result == null) { - result = createInstance(cc, getDefaultInstanceName(), OPTIONAL); - } - - return result; - } - - public static ThreadPoolConfig - createInstance( - final ConfigConfig cc, - final String name, - Map optional) { - return cc.getThreadPoolsConfig().createThreadPoolConfig(name, optional); - } - - protected Container - getProgenyContainer() { - return getConfigConfig(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.THREAD_POOL_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getConfigConfig().getThreadPoolsConfig().removeThreadPoolConfig(name); - } - - protected final AMXConfig - createProgeny( - final String name, - final Map options) { - final Map allOptions = MapUtil.newMap(options, OPTIONAL); - - return getConfigConfig().getThreadPoolsConfig().createThreadPoolConfig(name, allOptions); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/VirtualServerConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/VirtualServerConfigTest.java deleted file mode 100644 index b084514ff9d..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/config/VirtualServerConfigTest.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.config; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.HTTPAccessLogConfig; -import com.sun.appserv.management.config.HTTPServiceConfig; -import com.sun.appserv.management.config.VirtualServerConfig; -import com.sun.appserv.management.config.VirtualServerConfigKeys; -import com.sun.appserv.management.util.misc.MapUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - */ -public final class VirtualServerConfigTest - extends ConfigMgrTestBase { - static final String HOSTS = "localhost"; - - public VirtualServerConfigTest() { - } - - protected Container - getProgenyContainer() { - return getHTTPService(); - } - - protected String - getProgenyJ2EEType() { - return XTypes.VIRTUAL_SERVER_CONFIG; - } - - - protected void - removeProgeny(final String name) { - getHTTPService().removeVirtualServerConfig(name); - } - - protected final VirtualServerConfig - create(String name) { - return (VirtualServerConfig) createProgeny(name, null); - } - - private Map - getOptional() { - final Map m = new HashMap(); - m.put(VirtualServerConfigKeys.STATE_KEY, VirtualServerConfigKeys.STATE_DISABLED); - m.put(VirtualServerConfigKeys.DOC_ROOT_PROPERTY_KEY, "/"); - m.put(VirtualServerConfigKeys.ACCESS_LOG_PROPERTY_KEY, "/"); - - return m; - } - - protected final AMXConfig - createProgeny( - final String name, - final Map extra) { - final Map allOptions = MapUtil.newMap(extra, getOptional()); - - return (getHTTPService().createVirtualServerConfig(name, "localhost", allOptions)); - } - - protected final HTTPServiceConfig - getHTTPService() { - return getConfigConfig().getHTTPServiceConfig(); - } - - public void - testCreateHTTPAccessLog() - throws Exception { - if (!checkNotOffline("testCreateRemove")) { - return; - } - - final String NAME = "VirtualServerConfigMgrTest-testCreateHTTPAccessLog"; - try { - removeEx(NAME); - final VirtualServerConfig newVS = - (VirtualServerConfig) createProgeny(NAME, null); - assert newVS != null; - //trace( "newVS.getState: " + newVS.getState() ); - // assert newVS.getState().equals("disabled"); - - assert (newVS.getHTTPAccessLogConfig() == null); - - final HTTPAccessLogConfig accessLog = - newVS.createHTTPAccessLogConfig("false", "${com.sun.aas.instanceRoot}/logs/access", null); - assert (accessLog != null); - assert (Util.getObjectName(accessLog).equals(Util.getObjectName(newVS.getHTTPAccessLogConfig()))); - - newVS.removeHTTPAccessLogConfig(); - } - finally { - remove(NAME); - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/doc-files/AddingAMXUnitTests.html b/appserver/tests/amx/src/org/glassfish/admin/amxtest/doc-files/AddingAMXUnitTests.html deleted file mode 100644 index dfaa5231872..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/doc-files/AddingAMXUnitTests.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - Adding an AMX Unit Test - - -

    -

    Adding AMX Unit Tests

    - -
    contact: -lloyd.chambers@sun.com
    - -Last updated: 23 June 2005
    -
    -
    NOTE: the -hyperlinks in this document assume -you are reading it from its location -in the source tree eg glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest.
    -
    - -

    1.  Introduction

    -The Appserver Management Extensions (AMX) rely heavily on detailed -JUnit unit tests to prove that they work correctly. No modification, -addition or removal of code from AMX or underlying support code should -be checked in without also running the -unit tests.
    -
    -Any -code change which involves a new AMX interface, method or Attribute -must not be checked in without either (1) verifying that an existing -unit test adequately covers the new addition, or (2) writing a new unit -test which thoroughly tests the new addition.  The code must also -be reviewed by amx-dev@sun.com.
    -
    - -

    2.  Adding Tests

    - -

    2.1  Adding a new test method to an existing unit test

    -Adding a new test method is -easy. Simple add a method of the appropriate form to an existing unit -test:
    -
    -  public void
    -testFoo()
    -{
    -    // test code -here
    -}
    -
    - -

    2.2 Adding a new unit test class

    -A new unit test should be added whenever you add a new class in com.sun.appserv.management, or -any of its subpackages.  There are exceptions, but generally -speaking a unit test class should test only a single class. Examples of -exceptions include AMXTest -and GenericTest, which -test all of AMX generically, regardless of the specific interface.
    -
    -You may want to start by duplicating the file TestTemplateTest.java.
    -
    -Your new unit test should extend one of the classes in the table below:
    -
    - - - - - - - - - - - - - - - - - - - -
    Parent class
    -
    Discussion
    -
    junit.framework.TestCaseExtend junit.framework.TestCase if - your unit test is a standalone test which doesn't connect to the server - and doesn't make use of any JMX MBeanServerConnection.
    -
    - org.glassfish.admin.amxtest.util.jmx.JMXTestBase
    -
    Extend JMXTestBase only if your unit - test involves generic JMX, with nothing specific to Appserver.  - This should be very rare.
    -
    org.glassfish.admin.amxtest.AMXTestBaseAll unit tests which depend on a - live connection to the AppServer should extend AMXTestBase.
    -
    -Your new class should thus be of the form:
    -
    -public final class ClassBeingTestedTest extends appropriate-parent-class
    -{
    -    -    public
    -    ClassBeingTestedTest()
    -    {
    -    }
    -
    -        public void

    -    testMethodA()
    -    {
    -    -    // test code
    -    }
    -
    -        public void

    -    testMethodB()
    -    {
    -    -    // test code
    -    }
    -}
    -
    -
    You class should generally reside in a org.glassfish.admin.amxtest -subpackage which parellels the -package of the class being tested.  For example, here are -the classe and its unit test for SetUtil:
    -
    -com.sun.appserv.management.util.misc.SetUtil
    -org.glassfish.admin.amxtest.util.misc.SetUtilTest
    -
    - -

    2.3  Adding your new unit test to the official list

    - -

    2.3.1 First, make sure your test compiles:

    -G:\glassfish\admin\mbeanapi-impl>ant -compile-tests
    -Buildfile: build.xml
    -init:
    -compile:
    -compile-tests:
    -   [delete] Deleting -directory G:\glassfish\admin\mbeanapi-impl\build\tests
    -    [mkdir] -Created dir: G:\glassfish\admin\mbeanapi-impl\build\tests
    -    [javac] -Compiling 80 source files to -G:\glassfish\admin\mbeanapi-impl\build\tests
    -    [javac] Note: -* uses or overrides a deprecated API.
    -    [javac] Note: -Recompile with -Xlint:deprecation for details.
    -    [javac] Note: -Some input files use unchecked or unsafe operations.
    -    [javac] Note: -Recompile with -Xlint:unchecked for details.
    -
    -BUILD SUCCESSFUL
    -Total time: 3 seconds
    -
    - -

    2.3.1 Next add your test to the official list

    -Add your class to org.glassfish.admin.amxtest.Tests.  -Choose a position in the list that is appropriate; more basic -standalone tests should come first.  Facilities your new -functionality depends on should be unit-tested before your test, -etc.  This is the "master list" that is consulted when the unit -tests are run to warn if any unit tests are being omitted when the unit -tests are run.
    -
    -Also add your test to amxtest.classes.  This -file contains the actual unit tests that will be run when "ant -run-tests" is invoked.  Due to the risk of someone checking -in -amxtest.classes with a -reduced list of tests, org.glassfish.admin.amxtest.Tests -is always consulted and warnings issued about the missing tests.  -When you checkin, make sure there are no such warnings.
    -
    -The best practise is to never modify amxtest.classes (other than -adding items), but instead to have your own "myamxtest.classes" and modify amxtest.properties to reference -it instead of amxtest.classes.
    - -

    2.3.2 Run the tests

    -Please see RunningUnitTests.html.
    -
    -If you see any failing unit tests, be sure you haven't created the -problem by first mailing amx-dev@sun.com. -If you believe the problem is unrelated to your work, add the failure -to the Known - Issues -section of RunningUnitTests.html and check in the revised file.
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    -
    -

    -
    -
    -
    - -


    -

    -
    -
    -
    -
    -
    - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/doc-files/RunningUnitTests.html b/appserver/tests/amx/src/org/glassfish/admin/amxtest/doc-files/RunningUnitTests.html deleted file mode 100644 index 4ace477f113..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/doc-files/RunningUnitTests.html +++ /dev/null @@ -1,1517 +0,0 @@ - - - - - - - MBean API Unit Tests README - - -
    -

    Running MBean API (AMX) JUnit -Tests

    -
    -


    -
    contact: lloyd.chambers@sun.com
    -Last updated: 26 April 2007
    -

    -
    NOTE: the - hyperlinks in this document assume -you are reading it from its location -in the source tree eg glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest.

    - -

    JUNIT: You must check out glassfish/appserv-tests in order to make junit.jar available. The easiest - way - to do this is:

    - -

    $ cd glassfish/bootstrap
    - $ maven checkout-quicklook

    -

    - -

    Step 0: Start the server
    -

    - -

    Ensure that sources in admin/mbeanapi-impl - and admin-core/mbeanapi - are up-to-date and built.  Then start the server.
    -

    - -

    Step 1: The amxtest.properties file

    - -

    You will need to change the following properties in admin/mbeanapi-impl/amxtest.properties - to match your own host/port/user/password:
    -

    -amxtest.connect.host=yourhost
    -
    amxtest.connect.port=8686
    -amxtest.connect.user=admin
    -amxtest.connect.password=admin-password
    -
    amxtest.connect.useTLS=true
    -
    -
    If amxtest.connect.useTLS=true, -then you also need these two properties, but the defaults should be -fine:
    -
    -amxtest.connect.truststore=./amx-test-truststore
    -amxtest.connect.truststorePassword=changeme

    -
    - -

    The java constants for all the amxtest.properties keys may be found - in  PropertyKeys.java. - The only - required properties are those necessary to connect to the server as - shown above.  Most of the options are self-explanatory.  The - tests will obviously fail if the useTLS value does not match the - server's state.
    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Option
    -
    Discussion
    -
    amxtest.connectIf true, a connection is made, - if false, no connection is made. If set to false, be sure to modify - your test classes to remove any that require a connection to the - server.  You can set amxtest.testClasses=myamxtest.classes - and modify your own copy of the file.
    -
    amxtest.connect.useTLSSet amxtest.connect.useTLS=true if the server - is using TLS.
    -
    amxtest.connect.truststoreAny file will do here and it - need not exist in advance.  Just make sure the name is valid for - your platform.  The file will be created in the course of testing - if it does not already exist.
    -
    amxtest.threadedIf true, then within any single - test class the tests are run using junit.extensions.ActiveTestSuite; - otherwise they are run using junit.framework.TestSuite.  - Running the tests threaded can be confusing if they are failing (due to - overlapping output); - otherwise it speeds things up significantly.
    -
    amxtest.classes
    -
    By default, all tests will be - run unless you set the property "amxtest.classes" - (shown commented-out above).  This property is the name of a file - containing a lister of test classes.  If you wish to run specific - tests, you can copy the output from a run into a file, then comment-out - any tests you don't want to run.  See the default - test list. -
    amxtest.verbose
    -
    For the most part, this displays - the time it takes to run various tests.  Useful to see how things - are performing remotely versus locally, etc.  If you are just - looking for correctness, leave it set to "false".
    -
    amxtest.iterationsSpecifies the number of times to - run the tests.  All the tests are run, then all the tests are - repeated, etc.  Always run 2 iterations if there are any - repeatability issues (sporadic problems in - server code, not necessarily AMX code, have been seen in the past).
    -
    amxtest.deploy.filesComma-separated list of archives - to deploy during DeploymentMgrTest
    amxtest.deploy.numThreadsThe number of threads to run for - DeploymentMgrTest.testDeployHeavilyThreaded.
    amxtest.deploy.deployDummiesControls whether certain tests - requiring the deployment of dummy (garbage) files are run. -
    amxtest.UploadDownloadMgrTest.numThreadsThe number of threads used in UploadDownloadMgrTest.
    - testHeavilyThreaded()
    amxtest.UploadDownloadMgrTest.bigFileKB The size, in KB, of UploadDownloadMgrTest.
    - testDownloadBigFile()
    -

    You can cause the tests to be run as many times as you like by - setting amxtest.loopCount.  - It is generally a good practise to use a count of 2, just in case there - are any repeatability issues. -

    - -

    Step 2: Run the tests
    -

    - -

    Here is how to run the tests; note the directory:
    -

    - -

    G:\glassfish\admin\mbeanapi-impl>maven -run-tests
    -

    - -

    Be sure to use 'maven' and not 'ant'.  If you use ant, the - classpath won't contain required classes for certain com.sun.appserv - unit tests.  Perhaps a build wizard can figure this out and fix it.
    -

    - -

    See a sample - run.  - The tests take just a few minutes to run, or as much as 30 minutes over - VPN to a remote, slow server!  Probably you'll want to run them - locally.  The tests do test all AMX MBeans, so if you have - multiple - running servers and/or clusters, and are testing against the Domain - Admin Server (DAS), then you will be testing all AMX MBeans for all - running instances.
    -
    -

    - -

    Appendex A: - Known Issues

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Test/issueComments
     j2EEType=X-CallFlowMonitor18 July 2005
    -
    -  [java] Warning: MBean -"amx:j2eeType=X-CallFlowMonitor,
    -name=server,X-ServerRootMonitor=server"
    -did not supply the 1 attributes {RequestInformation
    }
    -
    Note that other -operations are also unimplemented.
    -

    -
    j2eeType=X-UploadDownloadMgr
    -
     18 July 2005  - sporadic - failure, not a new bug, I've seen it in the past
    -
    - 1) -testHeavilyThreaded(
    -org.glassfish.admin.amxtest.support.UploadDownloadMgrTest
    -java.lang.Asse
    rtionError: -$Proxy90.downloadBytes(Unknown Source)
    - org.glassfish.admin.amxtest.support.UploadDownloadMgrTest.
    -testDownloadFile(UploadDownloadMgrTes
    t.java:145)
    - org.glassfish.admin.amxtest.support.UploadDownloadMgrTest$
    -UploadDownloadTestThread.run(UploadDo
    wnloadMgrTest.java:227)
    - at -org.glassfish.admin.amxtest.support.UploadDownloadMgrTest.
    -testHeavilyThreaded(UploadDownloa
    dMgrTest.java:315)
    -
    -
    j2eeType=X-Logging
    -
    The AMX Logging MBean now lives in all - server instances.
    - However, its Container, X-ServerRootMonitor and DomainRoot do not yet exist in - non-DAS instances.
    - Thisordinarily causes some of the generic - tests to fail (ProxyTest, AMXTest, ContainerTest).
    - So the generic testing of - remote Logging MBeans - has been temporarily disabled via:
    -
    - AMXTestBase.isRemoteIncomplete(). -
    -
    - You may safely ignore all lines that say "remoteIncomplete: ..." so long - as the ObjectName has j2eeType=X-Logging.
    -
    - The Logging MBeans are all being tested specifically, just not - generically.
    -
    -
    org.glassfish.admin.amxtest.
    -j2ee.J2EETest

    -
    24 June 2005
    -
    - Very recent changes have broken something in the underlying - com.sun.appserv MBeans. This is a regression.
    -
    -  WARNING: MBean -"amx:j2eeType=Servlet,WebModule=//server/__JWSappclients,
    -J2EEServer=server,name=default,J2EEApplication=__JWSapp

    - clients" does not have its -statisticProvider set to true,
    -monitoring peer = null

    -  WARNING: MBean -"amx:j2eeType=WebModule,J2EEServer=server,
    -name=//server/__JWSappclients,J2EEApplication=__JWSappclients" -does no

    - t have its -statisticProvider set to true, monitoring peer = null
    -  WARNING: MBean -"amx:j2eeType=Servlet,WebModule=//server/__JWSappclients,
    -J2EEServer=server,name=jsp,J2EEApplication=__JWSappclie

    - nts" does not have its -statisticProvider set to true, monitoring peer = null
    - WARNING: MBean -"amx:j2eeType=Servlet,WebModule=//server/__JWSappclients,
    -J2EEServer=server,name=JWSSystemServlet,J2EEApplication

    - =__JWSappclients" does not -have its statisticProvider set to true,
    -monitoring peer = null

    -  FAILURE: Failures in -the following MBeans: -amx:j2eeType=Servlet,
    -WebModule=//server/__JWSappclients,
    -J2EEServer=server,name=JWSSy

    - stemServlet,J2EEApplication=__JWSappclients
    -  amx:j2eeType=Servlet,WebModule=//server/__JWSappclients,
    -J2EEServer=server,name=jsp,J2EEApplication=__JWSappclients

    -  amx:j2eeType=Servlet,WebModule=//server/__JWSappclients,
    -J2EEServer=server,name=default,J2EEApplication=__JWSappclients

    -  amx:j2eeType=WebModule,J2EEServer=server,
    -name=//server/__JWSappclients,J2EEApplication=__JWSappclients

    -
    ConnectorResourceConfigTest
    -
    Unit tests fail the 2nd time due - to a bug in com.sun.appserv - mbean code that auto-creates, AND fails to delete, ResourceRefs for the - ConnectorResource.
    - testCreateRemove( -org.glassfish.admin.amxtest.config.ConnectorResourceConfigTest) -java.lang.reflect.UndeclaredThrowableExcep
    - tion
    -Caused by: java.lang.RuntimeException: Can't remove dangling -ResourceRef: amx:j2eeType=X-ResourceRefConfig,X-StandaloneServerCo
    -nfig=server,name=jndi/ConnectorResourceConfigTest from -amx:j2eeType=X-StandaloneServerConfig,name=server
    -
    CustomMBeanConfigTest
    -
    This is a bug in the custom - MBean implementation, not AMX:
    -
    - WARNING: after removing -custom MBeans, they are still registered:
    - user:name=custom4,type=CustomMBeanConfigTest
    - user:name=custom6,type=CustomMBeanConfigTest
    - user:name=custom2,type=CustomMBeanConfigTest
    - user:name=custom3,type=CustomMBeanConfigTest
    - user:name=custom7,type=CustomMBeanConfigTest
    - user:name=custom9,type=CustomMBeanConfigTest
    - user:name=custom8,type=CustomMBeanConfigTest
    - user:name=custom0,type=CustomMBeanConfigTest
    - user:name=custom5,type=CustomMBeanConfigTest
    - user:name=custom1,type=CustomMBeanConfigTest
    -
    TestDanglingRefsTest
    -
    Issues warnings about dangling - references (such as for X-ConnectorResourceConfig).  Runs before - the config unit tests, and also runs at the very end of the unit tests - (invoked by RunMeLastTest).
    -
    -
    -
    - -

    Appendix B: Sample Output

    - -

    This output was from a test - run on 06 June 2005:
    -

    - -


    -G:\glassfish\admin\mbeanapi-impl>maven -run-tests
    -Buildfile: build.xml
    -
    -init:
    -
    -compile:
    -
    -compile-tests:
    -    [mkdir] -Created dir: G:\glassfish\admin\mbeanapi-impl\build\tests
    -    [javac] -Compiling 80 source files to -G:\glassfish\admin\mbeanapi-impl\build\tests
    -    [javac] Note: -* uses or overrides a deprecated API.
    -    [javac] Note: -Recompile with -Xlint:deprecation for details.
    -    [javac] Note: -Some input files use unchecked or unsafe operations.
    -    [javac] Note: -Recompile with -Xlint:unchecked for details.
    -
    -run-tests:
    -     [java] -Reading properties from: "amxtest.properties"
    -     [java] -Properties:
    -     [java] -amxtest.threaded=false
    -     [java] -amxtest.connect.host=localhost
    -     [java] -amxtest.connect.truststorePassword=changeme
    -     [java] -amxtest.deploy.files=./tests/bookstore.war
    -     [java] -amxtest.deploy.numThreads=10
    -     [java] -amxtest.connect.port=8686
    -     [java] -amxtest.loopCount=1
    -     [java] -amxtest.UploadDownloadMgrTest.bigFileKB=8192
    -     [java] -amxtest.UploadDownloadMgrTest.numThreads=10
    -     [java] -amxtest.connect.user=admin
    -     [java] -amxtest.connect.useTLS=true
    -     [java] -amxtest.testClasses=amxtest.classes
    -     [java] -amxtest.connect.truststore=./amx-test-truststore
    -     [java] -amxtest.deploy.deployDummies=false
    -     [java] -amxtest.connect=true
    -     [java] -amxtest.verbose=false
    -     [java] -amxtest.connect.password=admin123
    -     [java] -Connecting: host=localhost, port=8686, user=admin, password=admin123, -tls=true...
    -     [java] -Connected: host=localhost, port=8686, user=admin, password=admin123, -tls=true
    -     [java] -HandshakeCompletedEvent: -javax.net.ssl.HandshakeCompletedEvent[source=50d89c[SSL_RSA_WITH_RC4_128_MD5: -Socket[addr=129.150.30.112/129.150.
    -30.112,port=2278,localport=2286]]]
    -     [java] -Reading test classes from: "amxtest.classes"
    -
    -     [java] ---- 56 TEST CLASSES ---
    -     [java] -org.glassfish.admin.amxtest.util.misc.SetUtilTest
    -     [java] -org.glassfish.admin.amxtest.ext.logging.LogQueryEntryImplTest
    -     [java] -org.glassfish.admin.amxtest.ext.logging.LogQueryResultImplTest
    -     [java] -org.glassfish.admin.amxtest.support.ParamNameMapperTest
    -     [java] -org.glassfish.admin.amxtest.util.misc.CircularListTest
    -     [java] -org.glassfish.admin.amxtest.SerializableTest
    -     [java] -org.glassfish.admin.amxtest.ProxyTest
    -     [java] -org.glassfish.admin.amxtest.ProxyFactoryTest
    -     [java] -org.glassfish.admin.amxtest.AMXTest
    -     [java] -org.glassfish.admin.amxtest.ContainerTest
    -     [java] -org.glassfish.admin.amxtest.GenericTest
    -     [java] -org.glassfish.admin.amxtest.PropertiesTest
    -     [java] -org.glassfish.admin.amxtest.ext.logging.LogMBeanTest
    -     [java] -org.glassfish.admin.amxtest.ext.logging.LoggingTest
    -     [java] -org.glassfish.admin.amxtest.ext.logging.LoggingHelperTest
    -     [java] -org.glassfish.admin.amxtest.ext.logging.StatefulLoggingHelperTest
    -     [java] -org.glassfish.admin.amxtest.TestTemplateTest
    -     [java] -org.glassfish.admin.amxtest.DomainRootTest
    -     [java] -org.glassfish.admin.amxtest.support.UploadDownloadMgrTest
    -     [java] -org.glassfish.admin.amxtest.BulkAccessTest
    -     [java] -org.glassfish.admin.amxtest.QueryMgrTest
    -     [java] -org.glassfish.admin.amxtest.NotificationEmitterServiceTest
    -     [java] -org.glassfish.admin.amxtest.NotificationServiceMgrTest
    -     [java] -org.glassfish.admin.amxtest.NotificationServiceTest
    -     [java] -org.glassfish.admin.amxtest.MiscTest
    -     [java] -org.glassfish.admin.amxtest.monitor.StatisticTest
    -     [java] -org.glassfish.admin.amxtest.monitor.MonitorTest
    -     [java] -org.glassfish.admin.amxtest.monitor.JMXMonitorMgrTest
    -     [java] -org.glassfish.admin.amxtest.j2ee.J2EETest
    -     [java] -org.glassfish.admin.amxtest.deploy.DeploymentProgressTest
    -     [java] -org.glassfish.admin.amxtest.deploy.DeploymentSourceTest
    -     [java] -org.glassfish.admin.amxtest.deploy.DeploymentStatusTest
    -     [java] -org.glassfish.admin.amxtest.deploy.DeploymentMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.DomainConfigTest
    -     [java] -org.glassfish.admin.amxtest.config.ReferencesTest
    -     [java] -org.glassfish.admin.amxtest.config.HTTPServiceConfigTest
    -     [java] -org.glassfish.admin.amxtest.config.HTTPListenerConfigTest
    -     [java] -org.glassfish.admin.amxtest.config.ClusterConfigTest
    -     [java] -org.glassfish.admin.amxtest.config.SSLConfigTest
    -     [java] -org.glassfish.admin.amxtest.config.JMXConnectorConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.IIOPListenerConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.HTTPListenerConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.AuditModuleConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.AuthRealmConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.JavaConfigTest
    -     [java] -org.glassfish.admin.amxtest.config.VirtualServerConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.JACCProviderConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.AdminObjectResourceConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.JDBCResourceConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.MailResourceConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.ConnectorConnectionPoolConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.JDBCConnectionPoolConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.PersistenceManagerFactoryResourceConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.JNDIResourceConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.config.ThreadPoolConfigMgrTest
    -     [java] -org.glassfish.admin.amxtest.PerformanceTest
    -
    -     [java] ---- BEGIN TESTS ---
    -     [java] -*** testing org.glassfish.admin.amxtest.util.misc.SetUtilTest ***
    -     [java] -...
    -     [java] -Time: 0
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.ext.logging.LogQueryEntryImplTest ***
    -     [java] -.....
    -     [java] -Time: 0.187
    -
    -     [java] -OK (5 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.ext.logging.LogQueryResultImplTest ***
    -     [java] -....
    -     [java] -Time: 0.016
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.support.ParamNameMapperTest -***
    -     [java] -.............
    -     [java] -Time: 0
    -
    -     [java] -OK (13 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.util.misc.CircularListTest ***
    -     [java] -..........
    -     [java] -Time: 0.015
    -
    -     [java] -OK (10 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.SerializableTest ***
    -     [java] -...
    -     [java] -Time: 0.016
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.ProxyTest ***
    -     [java] -.....failure: getRequestInformation = -java.lang.reflect.InvocationTargetException
    -
    -     [java] -MBean -"amx:j2eeType=X-CallFlowMonitor,name=server,X-ServerRootMonitor=server" -failed for:
    -     [java] -testProxyGetters: failure from: getRequestInformation: -javax.management.AttributeNotFoundException
    -     [java] -failure: getLBWeight = java.lang.reflect.InvocationTargetException
    -
    -     [java] -MBean "amx:j2eeType=X-StandaloneServerConfig,name=server" failed for:
    -     [java] -testProxyGetters: failure from: getLBWeight: -javax.management.AttributeNotFoundException
    -     [java] -....
    -     [java] -Time: 9.812
    -
    -     [java] -OK (9 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.ProxyFactoryTest ***
    -     [java] ..
    -     [java] -Time: 0.063
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.AMXTest ***
    -     [java] ..
    -     [java] -amx:j2eeType=X-StandaloneServerConfig,name=server contains the -following int/long Attributes which perhaps ought to be String due to -the t
    -emplatizing of config: LBWeight
    -
    -     [java] -...............
    -     [java] -Time: 14.844
    -
    -     [java] -OK (17 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.ContainerTest ***
    -     [java] -....
    -     [java] -Time: 5.078
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.GenericTest ***
    -     [java] -.Validating:
    -     [java] - -MBeanInfo
    -     [java] - -Attributes
    -     [java] - -Operations (getters)
    -
    -     [java] -Warning: MBean -"amx:j2eeType=X-CallFlowMonitor,name=server,X-ServerRootMonitor=server" -did not supply the 1 attributes {RequestInformation
    -}
    -
    -     [java] -Warning: MBean "amx:j2eeType=X-StandaloneServerConfig,name=server" did -not supply the 1 attributes {LBWeight}
    -
    -     [java] -Total mbeans failing: 0
    -     [java] .
    -     [java] -Time: 10.297
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.PropertiesTest ***
    -     [java] -....
    -     [java] -Time: 0.765
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.ext.logging.LogMBeanTest ***
    -     [java] -.....
    -     [java] -Time: 2.531
    -
    -     [java] -OK (5 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.ext.logging.LoggingTest ***
    -     [java] -.........
    -     [java] -Time: 3.266
    -
    -     [java] -OK (9 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.ext.logging.LoggingHelperTest -***
    -     [java] -.........
    -     [java] -Time: 0.391
    -
    -     [java] -OK (9 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.ext.logging.StatefulLoggingHelperTest ***
    -     [java] -...
    -     [java] -Time: 0.015
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.TestTemplateTest ***
    -     [java] .
    -     [java] -Time: 0
    -
    -     [java] -OK (1 test)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.DomainRootTest ***
    -     [java] -.......
    -     [java] -Time: 0
    -
    -     [java] -OK (7 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.support.UploadDownloadMgrTest -***
    -     [java] -............
    -     [java] -Time: 6.703
    -
    -     [java] -OK (12 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.BulkAccessTest ***
    -     [java] -........
    -     [java] -Time: 3.047
    -
    -     [java] -OK (8 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.QueryMgrTest ***
    -     [java] -..............
    -     [java] -Time: 4.296
    -
    -     [java] -OK (14 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.NotificationEmitterServiceTest ***
    -     [java] -..E.
    -     [java] -Time: 0.016
    -     [java] -There was 1 error:
    -     [java] -1) -testEmit(org.glassfish.admin.amxtest.NotificationEmitterServiceTest)java.lang.AssertionError
    -     -[java]     at -org.glassfish.admin.amxtest.NotificationEmitterServiceTest.testEmit(NotificationEmitterServiceTest.java:84)
    -     -[java]     at -sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    -     -[java]     at -sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    -     -[java]     at -sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    -     -[java]     at -org.glassfish.admin.amxtest.TestRunner.runSuite(TestRunner.java:70)
    -     -[java]     at -org.glassfish.admin.amxtest.TestRunner.testClass(TestRunner.java:79)
    -     -[java]     at -org.glassfish.admin.amxtest.TestRunner.runTests(TestRunner.java:98)
    -     -[java]     at -org.glassfish.admin.amxtest.TestRunner.runAll(TestRunner.java:300)
    -     -[java]     at -org.glassfish.admin.amxtest.TestMain.<init>(TestMain.java:508)
    -     -[java]     at -org.glassfish.admin.amxtest.TestMain.main(TestMain.java:113)
    -
    -     [java] -FAILURES!!!
    -     [java] -Tests run: 3,  Failures: 0,  Errors: 1
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.NotificationServiceMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.031
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.NotificationServiceTest ***
    -     [java] -....
    -     [java] -Time: 5.125
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.MiscTest ***
    -     [java] ..
    -     [java] -Time: 0.047
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.monitor.StatisticTest ***
    -     [java] -...
    -     [java] -Time: 0.016
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.monitor.MonitorTest ***
    -     [java] ..
    -     [java] -Time: 8.875
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.monitor.JMXMonitorMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.047
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.j2ee.J2EETest ***
    -     [java] -.....
    -     [java] -Time: 2.422
    -
    -     [java] -OK (5 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.deploy.DeploymentProgressTest -***
    -     [java] -...
    -     [java] -Time: 0
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.deploy.DeploymentSourceTest -***
    -     [java] ..
    -     [java] -Time: 0
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.deploy.DeploymentStatusTest -***
    -     [java] -......
    -     [java] -Time: 0
    -
    -     [java] -OK (6 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.deploy.DeploymentMgrTest ***
    -     [java] -....
    -     [java] -Time: 4.407
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.config.DomainConfigTest ***
    -     [java] -......
    -     [java] -Time: 0.047
    -
    -     [java] -OK (6 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.config.ReferencesTest ***
    -     [java] .
    -     [java] -WARNING: ReferencesTest: server 'testServer' does not exist, SKIPPING -TEST
    -
    -     [java] .
    -     [java] -Time: 0
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.config.HTTPServiceConfigTest -***
    -     [java] -.......
    -     [java] -Time: 0
    -
    -     [java] -OK (7 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.config.HTTPListenerConfigTest -***
    -     [java] ..
    -     [java] -Time: 0.015
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.config.ClusterConfigTest ***
    -     [java] ..
    -     [java] -Time: 0
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.config.SSLConfigTest ***
    -     [java] ..
    -     [java] -Time: 0.032
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.JMXConnectorConfigMgrTest ***
    -     [java] -....
    -     [java] -Time: 0.375
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.IIOPListenerConfigMgrTest ***
    -     [java] -....
    -     [java] -Time: 0.312
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.HTTPListenerConfigMgrTest ***
    -     [java] -....
    -     [java] -Time: 0.766
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.AuditModuleConfigMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.25
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.config.AuthRealmConfigMgrTest -***
    -     [java] -...
    -     [java] -Time: 0.218
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.config.JavaConfigTest ***
    -     [java] ..
    -     [java] -Time: 0.079
    -
    -     [java] -OK (2 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.VirtualServerConfigMgrTest ***
    -     [java] -....
    -     [java] -Time: 0.859
    -
    -     [java] -OK (4 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.JACCProviderConfigMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.094
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.AdminObjectResourceConfigMgrTest -***
    -     [java] -...
    -     [java] -Time: 0.125
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.JDBCResourceConfigMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.234
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.MailResourceConfigMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.094
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.ConnectorConnectionPoolConfigMgrTest -***
    -     [java] -...
    -     [java] -Time: 0.109
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.JDBCConnectionPoolConfigMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.078
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.PersistenceManagerFactoryResourceConfigMgrTest -***
    -     [java] -...
    -     [java] -Time: 0.094
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.JNDIResourceConfigMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.094
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing -org.glassfish.admin.amxtest.config.ThreadPoolConfigMgrTest ***
    -     [java] -...
    -     [java] -Time: 0.125
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -*** testing org.glassfish.admin.amxtest.PerformanceTest ***
    -     [java] -...
    -     [java] -Time: 1.781
    -
    -     [java] -OK (3 tests)
    -
    -     [java] -Time to run tests: 89 seconds
    -
    -BUILD SUCCESSFUL
    -Total time: 1 minute 37 seconds
    -

    - -


    -
    -

    - -


    -
    -

    -

    - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/LoggingHelperTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/LoggingHelperTest.java deleted file mode 100644 index fb343ce07ad..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/LoggingHelperTest.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.ext.logging; - -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.ext.logging.LogModuleNames; -import com.sun.appserv.management.ext.logging.LogQueryResult; -import com.sun.appserv.management.ext.logging.Logging; -import static com.sun.appserv.management.ext.logging.Logging.LOWEST_SUPPORTED_QUERY_LEVEL; -import static com.sun.appserv.management.ext.logging.Logging.SERVER_KEY; -import com.sun.appserv.management.helper.LoggingHelper; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Set; - - -/** - Test the LoggingHelper. - */ -public final class LoggingHelperTest - extends AMXTestBase { - public LoggingHelperTest() { - } - - final Set - getAllLogging() { - return getQueryMgr().queryJ2EETypeSet(XTypes.LOGGING); - } - - public LoggingHelper - createHelper(final Logging logging) { - return new LoggingHelper(logging); - } - - - private void - validateResult(final LogQueryResult result) { - assert (result != null); - assert (result.getFieldNames() != null); - assert (result.getEntries() != null); - } - - public void - testQueryServerLogSingle() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final LoggingHelper helper = createHelper(logging); - final LogQueryResult result = - helper.queryServerLog(LOWEST_SUPPORTED_QUERY_LEVEL, "EJB"); - validateResult(result); - } - } - - - public void - testQueryServerLogLevelAndModules() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final LoggingHelper helper = createHelper(logging); - - final LogQueryResult result = - helper.queryServerLog(LOWEST_SUPPORTED_QUERY_LEVEL, - LogModuleNames.ALL_NAMES); - validateResult(result); - } - } - - - public void - testQueryServerLogLevel() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final LoggingHelper helper = createHelper(logging); - - final LogQueryResult result = - helper.queryServerLog(LOWEST_SUPPORTED_QUERY_LEVEL); - validateResult(result); - } - } - - - public void - testQueryAllCurrent() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final LoggingHelper helper = createHelper(logging); - - final LogQueryResult result = helper.queryAllCurrent(); - validateResult(result); - } - } - - - private static final int HOUR_MILLIS = 60 * 60 * 1000; - - public void - testQueryServerLogRecent() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final LoggingHelper helper = createHelper(logging); - - final LogQueryResult result = - helper.queryServerLogRecent(HOUR_MILLIS); - validateResult(result); - } - } - - - public void - testQueryServerLogRecentWithModules() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final LoggingHelper helper = createHelper(logging); - - final LogQueryResult result = - helper.queryServerLogRecent( - HOUR_MILLIS, LogModuleNames.ALL_NAMES); - validateResult(result); - } - } - - - public void - testQueryAllInFile() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final LoggingHelper helper = createHelper(logging); - - final String[] names = logging.getLogFileNames(SERVER_KEY); - for (final String name : names) { - final LogQueryResult result = helper.queryAllInFile(name); - validateResult(result); - } - } - } - - public void - testQueryAll() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final LoggingHelper helper = createHelper(logging); - - final LogQueryResult[] results = helper.queryAll(); - for (final LogQueryResult result : results) { - validateResult(result); - } - } - } - - -} - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/LoggingTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/LoggingTest.java deleted file mode 100644 index 2b73386ae3c..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/LoggingTest.java +++ /dev/null @@ -1,464 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.ext.logging; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.ext.logging.LogModuleNames; -import com.sun.appserv.management.ext.logging.LogQueryEntry; -import com.sun.appserv.management.ext.logging.LogQueryResult; -import com.sun.appserv.management.ext.logging.Logging; -import static com.sun.appserv.management.ext.logging.Logging.*; -import com.sun.appserv.management.j2ee.J2EEServer; -import com.sun.appserv.management.util.misc.CollectionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.StringUtil; -import com.sun.appserv.management.util.stringifier.CollectionStringifier; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.Attribute; -import javax.management.ListenerNotFoundException; -import javax.management.Notification; -import javax.management.NotificationListener; -import javax.management.ObjectName; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.logging.Level; - - -/** - Test the {@link Logging}. - */ -public final class LoggingTest - extends AMXTestBase { - public LoggingTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - final Set - getAllLogging() { - return getQueryMgr().queryJ2EETypeSet(XTypes.LOGGING); - } - - - public void - testGetModuleLogLevel() { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - for (final String moduleName : LogModuleNames.ALL_NAMES) { - final String level = logging.getModuleLogLevel(moduleName); - } - } - printElapsed("testGetModuleLogLevel", loggings.size(), start); - } - - public void - testSetModuleLogLevel() { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - for (final String moduleName : LogModuleNames.ALL_NAMES) { - final String level = logging.getModuleLogLevel(moduleName); - logging.setModuleLogLevel(moduleName, "FINEST"); - logging.setModuleLogLevel(moduleName, level); - } - } - printElapsed("testSetModuleLogLevel", loggings.size(), start); - } - - public void - testGetLogFileNames() { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final String[] serverLogs = logging.getLogFileNames(SERVER_KEY); - assert (serverLogs.length != 0); - - //final String[] accessLogs = logging.getLogFileNames( ACCESS_KEY ); - //assert( accessLogs.length != 0 ); - } - printElapsed("testGetLogFileNames", loggings.size(), start); - } - - public void - testGetLogFileKeys() { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final String[] keys = logging.getLogFileKeys(); - final Set keysSet = GSetUtil.newSet(keys); - assert (keysSet.contains(SERVER_KEY)); - assert (keysSet.contains(ACCESS_KEY)); - assertEquals(2, keysSet.size()); - } - printElapsed("testGetLogFileKeys", loggings.size(), start); - } - - /* - !!! - Testing these is problematic because if they run - before the other tests, they create nearly-empty log files - - public void - testRotateAllLogFiles() - { - logging.rotateAllLogFiles(); - how to verify? - } - - public void - testRotateLogFile() - { - warning( "testRotateLogFile: SKIPPING TEST" ); - logging.rotateLogFile( SERVER_KEY ); - logging.rotateLogFile( ACCESS_KEY ); - } - */ - - public void - testGetLogFile() { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final String[] serverLogs = logging.getLogFileNames(SERVER_KEY); - assert (serverLogs.length != 0); - - for (final String name : serverLogs) { - final long startGet = now(); - final String contents = logging.getLogFile(SERVER_KEY, name); - assert (contents != null) : "contents of log file are null: " + name; - assert (contents.length() != 0) : "contents of log file are empty: " + name; - printVerbose("Log file " + StringUtil.quote(name) + - " has size " + (contents.length() / 1024) + "K, ms = " + (now() - startGet)); - } - } - printElapsed("testGetLogFile", loggings.size(), start); - } - - - public void - testGetErrorInfo() { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final Map[] infos = logging.getErrorInfo(); - assert (infos != null); - for (final Map info : infos) { - assert (info != null && info.keySet().size() >= 3); - assert (info.containsKey(TIMESTAMP_KEY)); - assert (info.containsKey(SEVERE_COUNT_KEY)); - assert (info.containsKey(WARNING_COUNT_KEY)); - } - } - printElapsed("testGetErrorInfo", loggings.size(), start); - } - - - public void - testGetErrorDistribution() { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final Map[] infos = logging.getErrorInfo(); - assert (infos != null); - for (final Map info : infos) { - final Long timeStamp = (Long) info.get(TIMESTAMP_KEY); - assert (timeStamp != null); - final Integer severeCount = (Integer) info.get(SEVERE_COUNT_KEY); - assert (severeCount != null); - final Integer warningCount = (Integer) info.get(WARNING_COUNT_KEY); - assert (warningCount != null); - - final Map warnings = - logging.getErrorDistribution(timeStamp.longValue(), "WARNING"); - assert (warnings != null); - for (final String moduleID : warnings.keySet()) { - assert (warnings.get(moduleID) != null); - } - - final Map severes = - logging.getErrorDistribution(timeStamp, "SEVERE"); - assert (severes != null); - for (final String moduleID : severes.keySet()) { - assert (severes.get(moduleID) != null); - } - // verify that there are no illegal keys. - final String[] loggerNames = logging.getLoggerNames(); - final Set illegal = GSetUtil.copySet(severes.keySet()); - illegal.removeAll(GSetUtil.newSet(loggerNames)); - assert (illegal.size() == 0) : - "Illegal logger names found in Map returned by getErrorDistribution: {" + - CollectionUtil.toString(illegal, ",") + "}"; - - - try { - logging.getErrorDistribution(timeStamp, "INFO"); - fail("expecting failure from getErrorDistribution( timeStamp, 'INFO' )"); - } - catch (Exception e) { - } - } - } - printElapsed("testGetErrorDistribution", loggings.size(), start); - } - - - public void - testGetLoggerNamesAndGetLoggerNamesUnder() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final String[] names = logging.getLoggerNames(); - assert (names != null && names.length != 0); - - for (final String loggerName : names) { - final String[] under = logging.getLoggerNamesUnder(loggerName); - assert (under != null); - } - } - - } - - public void - testQuery() { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - final String filename = Logging.MOST_RECENT_NAME; - final int startRecord = FIRST_RECORD; - final boolean searchForward = true; - final int requestedCount = ALL_RECORDS; - final Long fromTime = now() - (24 * 60 * 60 * 1000); - final Long toTime = now(); - final Set modules = LogModuleNames.ALL_NAMES; // all - final List attrs = null; - - final LogQueryResult result = logging.queryServerLog( - filename, - startRecord, - searchForward, - requestedCount, - fromTime, - toTime, - Level.WARNING.toString(), - modules, - attrs); - - final String[] fieldNames = result.getFieldNames(); - - for (final LogQueryEntry entry : result.getEntries()) { - final String messageID = entry.getMessageID(); - - final String[] causes = logging.getDiagnosticCauses(messageID); - - final String[] checks = logging.getDiagnosticChecks(messageID); - - final String uri = logging.getDiagnosticURI(messageID); - } - } - printElapsed("testQuery", loggings.size(), start); - } - - - private Map - getAllJ2EEServer() { - final Map servers = - getDomainRoot().getJ2EEDomain().getJ2EEServerMap(); - - return servers; - } - - public void - testHaveLoggingForEachRunningServer() { - final long start = now(); - - final Map servers = getAllJ2EEServer(); - for (final J2EEServer server : servers.values()) { - final int state = server.getstate(); - final String serverName = server.getName(); - if (state != J2EEServer.STATE_RUNNING) { - warning("testHaveLoggingForEachRunningServer: server " + - serverName + " is not running"); - } else { - final Set loggings = getAllLogging(); - final Set loggingsObjectNames = Util.toObjectNames(loggings); - final Map all = - Util.createNameMap(loggings); - assert (all.containsKey(serverName)) : - "Can't find Logging for server " + serverName + - ", have: {" + - CollectionStringifier.toString(loggingsObjectNames, ", ") + "}"; - } - } - printElapsed("testHaveLoggingForEachRunningServer", servers.size(), start); - } - - private final class MyListener - implements NotificationListener { - private final String mID; - - public MyListener(final String id) { - mNotifs = Collections.synchronizedList(new ArrayList()); - mID = id; - } - - private final List mNotifs; - - public void - handleNotification( - final Notification notif, - final Object handback) { - //printVerbose( "Received notif: " + notif ); - - if (notif.getMessage().indexOf(mID) >= 0) { - mNotifs.add(notif); - } - } - - public List - getNotifications() { - return Collections.unmodifiableList(mNotifs); - } - - public int - getNotificationCount() { - return mNotifs.size(); - } - } - - - private void - testListening(final Logging logging) - throws ListenerNotFoundException { - final String message = "testListening:" + now(); - - final MyListener listener = new MyListener(message); - - printVerbose("Testing Logging=" + logging.getName()); - - logging.addNotificationListener(listener, null, null); - try { - logging.testEmitLogMessage(Level.SEVERE.toString(), message); - logging.testEmitLogMessage(Level.WARNING.toString(), message); - logging.testEmitLogMessage(Level.CONFIG.toString(), message); - logging.testEmitLogMessage(Level.INFO.toString(), message); - logging.testEmitLogMessage(Level.FINE.toString(), message); - logging.testEmitLogMessage(Level.FINER.toString(), message); - logging.testEmitLogMessage(Level.FINEST.toString(), message); - - int count = 0; - mySleep(200); - while ((count = listener.getNotificationCount()) != 7) { - mySleep(500); - trace("testListening: waiting for 7 Notifications, have: " + count); - } - } - finally { - logging.removeNotificationListener(listener); - } - } - - public void - testListeningForAllLogging() - throws ListenerNotFoundException { - final long start = now(); - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - testListening(logging); - } - printElapsed("testListeningForAllLogging", loggings.size(), start); - } - - - public void - testNoStrayLogging() - throws ListenerNotFoundException { - final Set validNames = getAllJ2EEServer().keySet(); - final Set loggings = getAllLogging(); - - assert (validNames.size() >= loggings.size()); - - for (final Logging logging : loggings) { - assert validNames.contains(logging.getName()) : - "Logging MBean name doesn't match any J2EEServer: " + logging.getName(); - } - } - -} - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/StatefulLoggingHelperTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/StatefulLoggingHelperTest.java deleted file mode 100644 index 1ae1a8bf54b..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/logging/StatefulLoggingHelperTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.ext.logging; - -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.ext.logging.LogQueryResult; -import com.sun.appserv.management.ext.logging.Logging; -import com.sun.appserv.management.helper.StatefulLoggingHelper; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Set; - - -/** - Test the StatefulLoggingHelper. - */ -public final class StatefulLoggingHelperTest - extends AMXTestBase { - public StatefulLoggingHelperTest() { - } - - final Set - getAllLogging() { - return getQueryMgr().queryJ2EETypeSet(XTypes.LOGGING); - } - - public StatefulLoggingHelper - createHelper(final Logging logging) { - return new StatefulLoggingHelper(logging); - } - - public void - testCreate() { - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - assert (createHelper(logging) != null); - } - } - - private void - validateResult(final LogQueryResult result) { - assert (result != null); - assert (result.getFieldNames() != null); - assert (result.getEntries() != null); - } - - - public void - testQuery() { - final long start = now(); - - final Set loggings = getAllLogging(); - - for (final Logging logging : loggings) { - assert (logging != null); - final StatefulLoggingHelper helper = createHelper(logging); - - final LogQueryResult result = helper.query(); - validateResult(result); - } - - printElapsed("testQuery", start); - } - -} - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/update/UpdateStatusTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/update/UpdateStatusTest.java deleted file mode 100644 index 75ef819dac7..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/update/UpdateStatusTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.ext.update; - -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -/** - */ -public final class UpdateStatusTest - extends AMXTestBase { - - public UpdateStatusTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - public void testUpdateStatus() { - assert (getDomainRoot().getUpdateStatus() != null); - } - - public void testGetNumModules() { - int m = 0; - - m = getDomainRoot().getUpdateStatus().getNumModules(); - System.out.println("No of modules found " + m); - } - -} diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceConfigCRTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceConfigCRTest.java deleted file mode 100644 index dc9efd91696..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceConfigCRTest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/ext/wsmgmt/WebServiceConfigCRTest.java,v 1.4 2007/05/05 05:24:04 tcfujii Exp $ -* $Revision: 1.4 $ -* $Date: 2007/05/05 05:24:04 $ -*/ -package org.glassfish.admin.amxtest.ext.wsmgmt; - -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.J2EEApplicationConfig; -import com.sun.appserv.management.config.TransformationRuleConfig; -import com.sun.appserv.management.config.WebServiceEndpointConfig; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import java.io.IOException; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class WebServiceConfigCRTest - extends AMXTestBase { - - public WebServiceConfigCRTest() - throws IOException { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - public void testConfigCR() { - assert (getDomainRoot().getWebServiceMgr() != null); - - final Set s = - getDomainRoot().getQueryMgr().queryJ2EETypeSet(XTypes.J2EE_APPLICATION_CONFIG); - - final Iterator iter = s.iterator(); - while (iter.hasNext()) { - - J2EEApplicationConfig ac = (J2EEApplicationConfig) iter.next(); - System.out.println("config name is " + ac.getName()); - - Map m = ac.getWebServiceEndpointConfigMap(); - int init = m.size(); - System.out.println("WebServiceEndpoints found " + init); - Iterator itr = m.values().iterator(); - while (itr.hasNext()) { - WebServiceEndpointConfig wsCfg = (WebServiceEndpointConfig) - itr.next(); - System.out.println("WebServiceEndpoint's name " + - wsCfg.getName()); - } - - /* - if ( !( ac.getName().equals("jaxrpc-simple") ) ){ - continue; - } - - ac.createWebServiceEndpointConfig("remove#me", null); - - m = ac.getWebServiceEndpointConfigMap(); - int afterCreate = m.size(); - System.out.println("WebServiceEndpoints found " + afterCreate); - - assert ( init +1== afterCreate); - */ - } - assert (true); - } - - public void testWSConfigCR() { - assert (getDomainRoot().getWebServiceMgr() != null); - - final Set s = - getDomainRoot().getQueryMgr().queryJ2EETypeSet( - XTypes.WEB_SERVICE_ENDPOINT_CONFIG); - - for (final WebServiceEndpointConfig wsc : s) { - Map m = wsc.getTransformationRuleConfigMap(); - int init = m.size(); - System.out.println("Transformation rules found " + init); - Iterator itr = m.values().iterator(); - while (itr.hasNext()) { - TransformationRuleConfig trCfg = (TransformationRuleConfig) - itr.next(); - System.out.println("Transformation Rule's name " + - trCfg.getName()); - } - - /* - - /* Finish later, creating a transformation rule requires the - * transformation file to be uploaded to DAS. - - wsc.createTransformationRuleConfig("xrule22", - "/tmp/req.xsl", false, "request", null); - - m = wsc.getTransformationRuleConfigMap(); - int afterCreate = m.size(); - System.out.println("Transformation rules found " + afterCreate); - - assert ( init +1== afterCreate); - - wsc.removeTransformationRuleConfig("xrule22"); - m = wsc.getTransformationRuleConfigMap(); - int afterDel = m.size(); - System.out.println("Transformation rules found " + afterDel); - - assert ( init == afterDel); - */ - } - assert (true); - } - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceConfigTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceConfigTest.java deleted file mode 100644 index c5701fd896b..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceConfigTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/ext/wsmgmt/WebServiceConfigTest.java,v 1.7 2007/05/05 05:24:04 tcfujii Exp $ -* $Revision: 1.7 $ -* $Date: 2007/05/05 05:24:04 $ -*/ -package org.glassfish.admin.amxtest.ext.wsmgmt; - -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.TransformationRuleConfig; -import com.sun.appserv.management.config.WebServiceEndpointConfig; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import java.io.IOException; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - */ -public final class WebServiceConfigTest - extends AMXTestBase { - - public WebServiceConfigTest() - throws IOException { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - public void testConfigMBeans() { - assert (getDomainRoot().getWebServiceMgr() != null); - - final Set s = - getDomainRoot().getQueryMgr().queryJ2EETypeSet( - XTypes.WEB_SERVICE_ENDPOINT_CONFIG); - - for (final WebServiceEndpointConfig wsc : s) { - String oldSize = wsc.getMaxHistorySize(); - System.out.println("Old Max History size is " + oldSize); - System.out.println("Setting Max History size to 1 "); - wsc.setMaxHistorySize("1"); - System.out.println("New Max History size is " - + wsc.getMaxHistorySize()); - assert ("1".equals(wsc.getMaxHistorySize())); - System.out.println("Resetting Max History size to " + oldSize); - wsc.setMaxHistorySize(oldSize); - System.out.println("Config value is " + wsc.getMonitoringLevel()); - - Map m = wsc.getTransformationRuleConfigMap(); - - System.out.println("Transformation rules found " + m.size()); - - Iterator itr = m.values().iterator(); - while (itr.hasNext()) { - TransformationRuleConfig tc = (TransformationRuleConfig) - itr.next(); - System.out.println("rule name is " + tc.getName()); - } - System.out.println("Getting tranformation rules in order "); - List l = wsc.getTransformationRuleConfigList(); - - System.out.println("Transformation rules found " + l.size()); - - Iterator litr = l.iterator(); - while (litr.hasNext()) { - TransformationRuleConfig tc = (TransformationRuleConfig) - litr.next(); - System.out.println("rule name is " + tc.getName()); - } - } - assert (true); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceMgrTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceMgrTest.java deleted file mode 100644 index 63a94119581..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceMgrTest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.ext.wsmgmt; - -import com.sun.appserv.management.ext.wsmgmt.WebServiceEndpointInfo; -import com.sun.appserv.management.ext.wsmgmt.WebServiceMgr; -import com.sun.appserv.management.j2ee.WebServiceEndpoint; -import com.sun.appserv.management.monitor.WebServiceEndpointMonitor; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - - -/** - */ -public final class WebServiceMgrTest - extends AMXTestBase { - - public WebServiceMgrTest() { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - public void testGetWebServiceMgr() { - assert (getDomainRoot().getWebServiceMgr() != null); - } - - public void testGetWebServiceNames() { - java.util.Map m = null; - - m = getDomainRoot().getWebServiceMgr().getWebServiceEndpointKeys(); - - if (m == null) { - System.out.println("No web services found "); - return; - } - - System.out.println("Number of web services " + m.keySet().size()); - System.out.println("Fully qualified names..."); - for (Iterator iter = m.keySet().iterator(); iter.hasNext();) { - String key = (String) iter.next(); - System.out.println("Looking for runtime objects for " + key); - Set epSet = - getDomainRoot().getWebServiceMgr().getWebServiceEndpointSet(key, - "server"); - if (epSet != null) { - System.out.println("Found " + epSet.size() + " for " + key); - for (Iterator epItr = epSet.iterator(); epItr.hasNext();) { - WebServiceEndpoint ep = (WebServiceEndpoint) epItr.next(); - System.out.println("Found " + ep.getName()); - WebServiceEndpointMonitor epm = (WebServiceEndpointMonitor) - ep.getMonitoringPeer(); - System.out.println("Monitoing peer for " + ep.getName() + - " is " + epm); - - } - } - } - System.out.println("Display names..."); - for (Iterator iter = m.values().iterator(); iter.hasNext();) { - System.out.println((String) iter.next()); - } - assert (true); - } - - public void testGetWebServiceInfo() { - Map m = null; - - m = getDomainRoot().getWebServiceMgr().getWebServiceEndpointKeys(); - - if (m == null) { - System.out.println("No web services found "); - return; - } - - System.out.println("Number of web services " + m.keySet().size()); - System.out.println("Fully qualified names..."); - for (final Object fqn : m.keySet()) { - System.out.println("Info for web service " + fqn); - - final WebServiceEndpointInfo info = - getDomainRoot().getWebServiceMgr().getWebServiceEndpointInfo(fqn); - - /* - System.out.println("Keys are " + propMap.keySet().size()); - for( final String key : infos.keySet() ) - { - System.out.println( key ); - } - - System.out.println("Values are "); - for( final WebServiceEndpointInfo info : infos.values() ) - { - System.out.println( obj.toString() ); - } - */ - } - } - - /** - Tests to see if any RegistryLocations are present. - Expects to see atleast one, else the test fails. Create a connection - pool with a type javax.xml.registry.ConnectionFactory - */ - public void testListRegistryLocations() { - String[] list = getDomainRoot().getWebServiceMgr().listRegistryLocations(); - if (list == null) { - fail("Did not get any registry locations. Please check you have " + - "created one with the name foo"); - } else { - for (int i = 0; i < list.length; i++) { - System.out.println("RegistryLocation = " + list[i]); - } - // if you get any names in the connection definition, pass the test - assert (true); - } - } - - public void testAddRegistryConnectionResources() { - String jndiname = "eis/SOAR"; - String description = "Duh"; - String purl = "http://publishurl"; - String qurl = "http://queryurl"; - Map map = new HashMap(); - map.put(WebServiceMgr.QUERY_URL_KEY, qurl); - map.put(WebServiceMgr.PUBLISH_URL_KEY, purl); - - //getDomainRoot().getWebServiceMgr().addRegistryConnectionResources (jndiname, description, - // map); - assertTrue(true); - } - - public void testRemoveRegistryConnectionResources() { - String jndiname = "eis/SOAR"; - getDomainRoot().getWebServiceMgr().removeRegistryConnectionResources(jndiname); - assertTrue(true); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceMonitorTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceMonitorTest.java deleted file mode 100644 index 7724493d0e3..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceMonitorTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/ext/wsmgmt/WebServiceMonitorTest.java,v 1.7 2007/05/05 05:24:04 tcfujii Exp $ -* $Revision: 1.7 $ -* $Date: 2007/05/05 05:24:04 $ -*/ -package org.glassfish.admin.amxtest.ext.wsmgmt; - -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.j2ee.statistics.NumberStatistic; -import com.sun.appserv.management.monitor.WebServiceEndpointMonitor; -import com.sun.appserv.management.monitor.statistics.WebServiceEndpointAggregateStats; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.j2ee.statistics.CountStatistic; -import java.io.IOException; -import java.util.Set; - -/** - */ -public final class WebServiceMonitorTest - extends AMXTestBase { - - public WebServiceMonitorTest() - throws IOException { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - public void testMonitorMBeans() { - assert (getDomainRoot().getWebServiceMgr() != null); - - final Set ms = - getDomainRoot().getQueryMgr().queryJ2EETypeSet(XTypes.WEBSERVICE_ENDPOINT_MONITOR); - - for (final WebServiceEndpointMonitor m : ms) { - System.out.println("\n \n Name of web service is " + m.getName()); - - final WebServiceEndpointAggregateStats s = - m.getWebServiceEndpointAggregateStats(); - - // verify that we can get each Statistic; - // there was a problem at one time - - - final CountStatistic r1 = s.getTotalFaults(); - assert (r1 != null); - System.out.println(" total num fault is " + r1.getCount()); - - final CountStatistic r2 = s.getTotalNumSuccess(); - assert (r2 != null); - System.out.println(" total num success is " + r2.getCount()); - - final CountStatistic r3 = s.getAverageResponseTime(); - assert (r3 != null); - System.out.println("avg resp is " + r3.getCount()); - - final NumberStatistic c1 = s.getThroughput(); - assert (c1 != null); - System.out.println(" through put is " + c1.getCurrent()); - - final CountStatistic c2 = s.getTotalAuthFailures(); - assert (c2 != null); - System.out.println(" total num auth success is " + c2.getCount()); - - final CountStatistic c3 = s.getTotalAuthSuccesses(); - assert (c3 != null); - System.out.println(" total num auth failure is " + c3.getCount()); - - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceRuntimeTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceRuntimeTest.java deleted file mode 100644 index f8272a45c62..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/ext/wsmgmt/WebServiceRuntimeTest.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.ext.wsmgmt; - -import com.sun.appserv.management.ext.wsmgmt.MessageTrace; -import com.sun.appserv.management.j2ee.J2EETypes; -import com.sun.appserv.management.j2ee.WebServiceEndpoint; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import java.io.IOException; -import java.util.Set; - -/** - */ -public final class WebServiceRuntimeTest - extends AMXTestBase { - - public WebServiceRuntimeTest() - throws IOException { - } - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - public void testRuntimeMBeans() { - assert (getDomainRoot().getWebServiceMgr() != null); - - final Set s = - getDomainRoot().getQueryMgr().queryJ2EETypeSet(J2EETypes.WEB_SERVICE_ENDPOINT); - - for (final WebServiceEndpoint wsp : s) { - wsp.resetStats(); - - long ts = wsp.getLastResetTime(); - System.out.println("Web Service endpoint name is " + wsp.getName()); - System.out.println("Last reset time is " + ts); - - try { - Thread.currentThread().sleep(1); - } catch (Exception e) { - } - - wsp.resetStats(); - long ts2 = wsp.getLastResetTime(); - System.out.println("Last reset time is " + ts2); - if ((ts == 0) && (ts2 == 0)) { - assert (true); - } else { - assert (ts != ts2); - } - } - } - - public void testMessageTrace() { - assert (getDomainRoot().getWebServiceMgr() != null); - - final Set s = - getDomainRoot().getQueryMgr().queryJ2EETypeSet(J2EETypes.WEB_SERVICE_ENDPOINT); - - for (final WebServiceEndpoint wsp : s) { - final MessageTrace[] msgs = wsp.getMessagesInHistory(); - if (msgs == null) { - System.out.println(" No messages found"); - continue; - } - - System.out.println(" Collected messages " + msgs.length); - for (int idx = 0; idx < msgs.length; idx++) { - final MessageTrace msg = msgs[idx]; - - System.out.println(" message id " + msg.getMessageID()); - System.out.println(" application id " + msg.getApplicationID()); - System.out.println(" endpoint name " + msg.getEndpointName()); - System.out.println(" response size " + msg.getResponseSize()); - System.out.println(" request size " + msg.getRequestSize()); - System.out.println(" transport type is " + - msg.getTransportType()); - System.out.println(" request headers are " + - msg.getHTTPRequestHeaders()); - System.out.println(" response headers are " + - msg.getHTTPResponseHeaders()); - System.out.println(" fault code is " + msg.getFaultCode()); - System.out.println(" fault string is " + msg.getFaultString()); - System.out.println(" fault actor is " + msg.getFaultActor()); - System.out.println(" client host is " + msg.getClientHost()); - System.out.println(" principal name is " + - msg.getPrincipalName()); - System.out.println(" request content is " + - msg.getRequestContent()); - System.out.println(" response content is " + - msg.getResponseContent()); - System.out.println(" call flow enabled " + - msg.isCallFlowEnabled()); - } - } - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/helper/RefHelperTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/helper/RefHelperTest.java deleted file mode 100644 index babe81bbcb3..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/helper/RefHelperTest.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.helper; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.ClusterRefConfig; -import com.sun.appserv.management.config.DeployedItemRefConfig; -import com.sun.appserv.management.config.RefConfig; -import com.sun.appserv.management.config.ResourceRefConfig; -import com.sun.appserv.management.config.ServerRefConfig; -import com.sun.appserv.management.helper.RefHelper; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - - -/** - This test should normally be run before the generic tests - so that it can set up default items for many of the config elements - so that the generic tests will actually test them. Otherwise, - when the generic tests are run, they won't see any instances - of many of the AMXConfig MBeans. -

    - If there are errors doing this, disable this test in amxtest.classes, - fix the error in the specific place it's occurring, then re-enabled - this test. - */ -public final class RefHelperTest - extends AMXTestBase { - public RefHelperTest() { - } - - public void - testFindResourceRefs() { - final Set refs1 = - RefHelper.findAllRefConfigsByJ2EEType(getQueryMgr(), XTypes.RESOURCE_REF_CONFIG); - - final Set refs2 = - RefHelper.findAllResourceRefConfigs(getQueryMgr()); - - assertEquals(refs1, refs2); - } - - public void - testFindDeployedItemRefs() { - final Set refs1 = - RefHelper.findAllRefConfigsByJ2EEType(getQueryMgr(), XTypes.DEPLOYED_ITEM_REF_CONFIG); - - final Set refs2 = - RefHelper.findAllDeployedItemRefConfigs(getQueryMgr()); - - assertEquals(refs1, refs2); - } - - - public void - testFindServerRefs() { - final Set refs1 = - RefHelper.findAllRefConfigsByJ2EEType(getQueryMgr(), XTypes.SERVER_REF_CONFIG); - - final Set refs2 = - RefHelper.findAllServerRefConfigs(getQueryMgr()); - - assertEquals(refs1, refs2); - } - - public void - testFindClusterRefs() { - final Set refs1 = - RefHelper.findAllRefConfigsByJ2EEType(getQueryMgr(), XTypes.CLUSTER_REF_CONFIG); - - final Set refs2 = - RefHelper.findAllClusterRefConfigs(getQueryMgr()); - - assertEquals(refs1, refs2); - } - - public void - testFindAllRefConfigs() { - final Set all = - RefHelper.findAllRefConfigs(getQueryMgr()); - - final Set referentJ2EETypes = RefHelper.getReferentJ2EETypes(); - assert (referentJ2EETypes.size() >= 4); - - final Set allSeparately = new HashSet(); - - for (final String j2eeType : referentJ2EETypes) { - final Set refs = - RefHelper.findAllRefConfigsByJ2EEType(getQueryMgr(), j2eeType); - - for (final RefConfig ref : refs) { - allSeparately.add(ref); - } - } - - assertEquals(all, allSeparately); - } - - - public void - testFindAllRefConfigsByName() { - final Set refs = - RefHelper.findAllRefConfigs(getQueryMgr()); - - final Set names = Util.getNames(refs); - final Map> byName = - new HashMap>(); - - // initialize map, keyed by name - for (final String name : names) { - byName.put(name, new HashSet()); - } - - // populate each Set with RefConfig of the same name - for (final RefConfig ref : refs) { - final Set s = byName.get(ref.getName()); - - s.add(ref); - } - - // verify that the names all refer to the same type - for (final String name : byName.keySet()) { - final Set s = byName.get(name); - - final String lastJ2EEType = s.iterator().next().getJ2EEType(); - for (final RefConfig ref : s) { - assertEquals(ref.getJ2EEType(), lastJ2EEType); - } - } - - // now verify that we can get the same set another way - for (final String name : byName.keySet()) { - final Set s = byName.get(name); - - final String j2eeType = s.iterator().next().getJ2EEType(); - final Set s2 = - RefHelper.findAllRefConfigsWithName(getQueryMgr(), j2eeType, name); - - assertEquals(s, s2); - } - } - -} - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/J2EETest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/J2EETest.java deleted file mode 100644 index 86421b2c576..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/J2EETest.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.j2ee; - -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.config.ClusterConfig; -import com.sun.appserv.management.config.ServerConfig; -import com.sun.appserv.management.j2ee.EventProvider; -import com.sun.appserv.management.j2ee.J2EECluster; -import com.sun.appserv.management.j2ee.J2EEManagedObject; -import com.sun.appserv.management.j2ee.J2EEServer; -import com.sun.appserv.management.j2ee.J2EETypes; -import com.sun.appserv.management.j2ee.JVM; -import com.sun.appserv.management.j2ee.StateManageable; -import com.sun.appserv.management.monitor.Monitoring; -import com.sun.appserv.management.util.misc.CollectionUtil; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.MapUtil; -import org.glassfish.admin.amxtest.AMXTestBase; -import org.glassfish.admin.amxtest.Capabilities; - -import javax.management.ObjectName; -import java.io.IOException; -import java.util.Collections; -import java.util.Date; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - - -/** - */ -public final class J2EETest - extends AMXTestBase { - public J2EETest() - throws IOException { - turnOnMonitoring(); - } - - private static boolean FAILURES_WARNED = false; - - public static Capabilities - getCapabilities() { - return getOfflineCapableCapabilities(false); - } - - /** - Verify that there is one J2EEServer for each ServerConfig (standalone or not) - */ - public void - testJ2EEServerMatchesServerConfig() { - final Map serverConfigMap = getServerConfigMap( getDomainConfig().getServersConfig() ); - - final Map j2eeServerMap = - getDomainRoot().getJ2EEDomain().getJ2EEServerMap(); - - assert (serverConfigMap.keySet().equals(j2eeServerMap.keySet())) : - "ServerConfig names do not match J2EEServer names, ServerConfig names = " + - toString(serverConfigMap.keySet()) + ", J2EEServer names = " + - toString(j2eeServerMap.keySet()); - - } - - - /** - Verify that there is one J2EEServer for each ServerConfig (standalone or not) - */ - public void - testJ2EEClusterMatchesClusterConfig() { - final Map clusterConfigMap = getDomainConfig().getClustersConfig().getClusterConfigMap(); - final Map j2eeClusterMap = getJ2EEDomain().getJ2EEClusterMap(); - - assert (clusterConfigMap.keySet().equals(j2eeClusterMap.keySet())) : - "ClusterConfig names do not match J2EECluster names, ClusterConfig names = " + - toString(clusterConfigMap.keySet()) + ", J2EECluster names = " + - toString(j2eeClusterMap.keySet()); - } - - public void - testJVMs() { - final QueryMgr queryMgr = getQueryMgr(); - - final Set jvms = queryMgr.queryJ2EETypeSet(J2EETypes.JVM); - final Iterator iter = jvms.iterator(); - - String lastVendor = null; - String lastVersion = null; - while (iter.hasNext()) { - final JVM jvm = (JVM) iter.next(); - - // the ObjectName of the Node must match the String version for "node" - assert (jvm.getnode() != null); - - // the JVMs should all have the same vendor (presumably) - assert (jvm.getjavaVendor() != null); - if (lastVendor == null) { - lastVendor = jvm.getjavaVendor(); - } else { - assert (lastVendor.equals(jvm.getjavaVendor())); - } - - // the JVMs should all have the same version (presumably) - assert (jvm.getjavaVersion() != null); - if (lastVersion == null) { - lastVersion = jvm.getjavaVersion(); - } else { - assert (lastVersion.equals(jvm.getjavaVersion())); - } - } - } - - private boolean - appearsToBeDefaultWebModule(final String webModuleName) { - return webModuleName.startsWith("//") && webModuleName.endsWith("/"); - } - - /** - Map from JSR77 j2eeType to our config j2eeType. - */ - private static final Map ToConfigMap = MapUtil.newMap(new String[] - { - J2EETypes.J2EE_DOMAIN, XTypes.DOMAIN_CONFIG, - J2EETypes.J2EE_CLUSTER, XTypes.CLUSTER_CONFIG, - J2EETypes.J2EE_SERVER, XTypes.STANDALONE_SERVER_CONFIG, - J2EETypes.JVM, XTypes.JAVA_CONFIG, - - J2EETypes.J2EE_APPLICATION, XTypes.J2EE_APPLICATION_CONFIG, - J2EETypes.EJB_MODULE, XTypes.EJB_MODULE_CONFIG, - J2EETypes.WEB_MODULE, XTypes.WEB_MODULE_CONFIG, - J2EETypes.APP_CLIENT_MODULE, XTypes.APP_CLIENT_MODULE_CONFIG, - - J2EETypes.JAVA_MAIL_RESOURCE, XTypes.MAIL_RESOURCE_CONFIG, - J2EETypes.JDBC_RESOURCE, XTypes.JDBC_RESOURCE_CONFIG, - J2EETypes.JNDI_RESOURCE, XTypes.JNDI_RESOURCE_CONFIG, - J2EETypes.WEB_SERVICE_ENDPOINT, XTypes.WEB_SERVICE_ENDPOINT_CONFIG, - } - ); - - private static String - getConfigPeerJ2EEType(final String j2eeType) { - return ToConfigMap.get(j2eeType); - } - - /** - Maps a j2eeType to its peer monitoring j2eeType - */ - private static final Map ToMonitorMap = - Collections.unmodifiableMap(MapUtil.newMap(new String[] - { - J2EETypes.J2EE_SERVER, XTypes.SERVER_ROOT_MONITOR, - J2EETypes.J2EE_APPLICATION, XTypes.APPLICATION_MONITOR, - - J2EETypes.WEB_MODULE, XTypes.WEB_MODULE_VIRTUAL_SERVER_MONITOR, - J2EETypes.SERVLET, XTypes.SERVLET_MONITOR, - - J2EETypes.EJB_MODULE, XTypes.EJB_MODULE_MONITOR, - J2EETypes.STATELESS_SESSION_BEAN, XTypes.STATELESS_SESSION_BEAN_MONITOR, - J2EETypes.STATEFUL_SESSION_BEAN, XTypes.STATEFUL_SESSION_BEAN_MONITOR, - J2EETypes.ENTITY_BEAN, XTypes.ENTITY_BEAN_MONITOR, - J2EETypes.MESSAGE_DRIVEN_BEAN, XTypes.MESSAGE_DRIVEN_BEAN_MONITOR, - })); - - // has a monitoring peer, but no Stats - private static final Set HasNoStats = - GSetUtil.newUnmodifiableStringSet(J2EETypes.J2EE_SERVER); - - - protected String - getMonitoringPeerJ2EEType(final String j2eeType) { - return ToMonitorMap.get(j2eeType); - } - - protected String - getMonitoringPeerProps(final J2EEManagedObject item) { - final String j2eeType = item.getJ2EEType(); - final String monitoringPeerJ2EEType = getMonitoringPeerJ2EEType(j2eeType); - final ObjectName objectName = Util.getObjectName(item); - - String props = null; - if (monitoringPeerJ2EEType != null) { - props = Util.makeRequiredProps(monitoringPeerJ2EEType, item.getName()); - - for (final String propKey : ToMonitorMap.keySet()) { - final String value = objectName.getKeyProperty(propKey); - if (value != null) { - final String prop = - Util.makeProp(getMonitoringPeerJ2EEType(propKey), value); - props = Util.concatenateProps(props, prop); - } - } - } - - return props; - } - - public void - testJ2EE() - throws ClassNotFoundException { - final QueryMgr queryMgr = getQueryMgr(); - - final Set j2eeAll = - queryMgr.queryInterfaceSet(J2EEManagedObject.class.getName(), null); - - final Set failedSet = new HashSet(); - final Set noPeerSet = new HashSet(); - - for (final J2EEManagedObject item : j2eeAll) { - final ObjectName objectName = Util.getObjectName(item); - assert (objectName.equals(Util.newObjectName(item.getobjectName()))); - - final String j2eeType = item.getJ2EEType(); - - if (item.isstateManageable()) { - assert (item instanceof StateManageable); - - final StateManageable sm = (StateManageable) item; - - final int state = sm.getstate(); - assert ( - state == StateManageable.STATE_STARTING || - state == StateManageable.STATE_RUNNING || - state == StateManageable.STATE_STOPPING || - state == StateManageable.STATE_STOPPED || - state == StateManageable.STATE_FAILED); - - if (state == StateManageable.STATE_RUNNING) { - try { - final long startTime = sm.getstartTime(); - - // assume it was started less than 30 days ago - final long MILLIS_PER_DAY = 24L * 60L * 60L * 1000L; - final long days30 = 30L * MILLIS_PER_DAY; - if (startTime < now() - days30) { - warning("MBean " + quote(objectName) + - " claims a start time of " + new Date(startTime) + ", which is more than 30 days prior to now = " + - new Date(now())); - failedSet.add(objectName); - } - } - catch (Exception e) { - final Throwable rootCause = ExceptionUtil.getRootCause(e); - warning("MBean " + quote(objectName) + - " is 'stateManageable' and in 'STATE_RUNNING', but could not supply Attribute 'startTime', " + - "threw an exception of class " + - rootCause.getClass().getName()); - failedSet.add(objectName); - } - } - } - - if (item.iseventProvider()) { - assert (item instanceof EventProvider); - - final EventProvider ep = (EventProvider) item; - final String[] types = ep.gettypes(); - assert types != null : - "Item claims to be EventProvider, but provides null 'types': " + - toString(objectName); - } - - /* - monitoring was enabled so monitoring peers should exist - Can't just call isStatisticProvider(), since it will be false - if the monitoring peer is null (correctly or incorrectly). - */ - final String monitoringPeerJ2EEType = getMonitoringPeerJ2EEType(j2eeType); - final Monitoring monitoringPeer = item.getMonitoringPeer(); - if (monitoringPeerJ2EEType != null) { - // See if there actually is a monitoring peer, but null is being returned. - if (monitoringPeer == null) { - final String props = getMonitoringPeerProps(item); - final Set monitors = getQueryMgr().queryPropsSet(props); - if (monitors.size() != 0) { - warning("MBean " + quote(objectName) + - " returned null for its monitoring peer, but found the following:" + - NEWLINE + - CollectionUtil.toString(Util.toObjectNames(monitors), NEWLINE)); - - failedSet.add(objectName); - } - } else { - // we have a monitoring peer, verify that it states that it has - // statistics - if (!HasNoStats.contains(j2eeType)) { - assert item.isstatisticProvider() && item.isstatisticsProvider(); - } - } - } else { - // it has a monitoring peer - if (item.isstatisticProvider() || item.isstatisticsProvider()) { - warning("MBean " + quote(objectName) + - " should not have its statisticProvider set to true"); - failedSet.add(objectName); - } - } - - - if (item.isConfigProvider()) { - final AMXConfig config = item.getConfigPeer(); - - if (config == null) { - // Some auto-generated items do not have config. See if it's there - final String props = Util.makeRequiredProps( - getConfigPeerJ2EEType(j2eeType), item.getName()); - - if (getQueryMgr().queryPropsSet(props).size() != 0) { - warning("MBean " + quote(objectName) + - " has existing config peer, but returned null"); - failedSet.add(objectName); - } - } - } - } - - if (noPeerSet.size() != 0) { - warning("The following MBeans do not have a Monitoring peer:" + - NEWLINE + toString(noPeerSet)); - - } - - if (failedSet.size() != 0) { - failure("Failures in the following " + failedSet.size() + " MBeans:\n" + - toString(failedSet) ); - } - } -} - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/ServletTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/ServletTest.java deleted file mode 100644 index 94dfe025c6d..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/ServletTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.j2ee; - -import com.sun.appserv.management.j2ee.Servlet; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.util.Set; - -/** - Test serialization on the AMX Stats/Statistics classes which travel - from server to client. - */ -public final class ServletTest - extends AMXTestBase { - public ServletTest() { - } - - public void - testFindMappings() { - final Set servlets = getTestUtil().getAllAMX(Servlet.class); - - for (final Servlet servlet : servlets) { - final String[] mappings = servlet.findMappings(); - - servlet.getClassLoadTime(); - servlet.getEngineName(); - servlet.getLoadTime(); - servlet.getModelerType(); - } - } - -} - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/WSMsgTraceTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/WSMsgTraceTest.java deleted file mode 100644 index d47323b4e34..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/j2ee/WSMsgTraceTest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.j2ee; - -import com.sun.appserv.management.ext.wsmgmt.MessageTrace; -import com.sun.appserv.management.j2ee.J2EETypes; -import com.sun.appserv.management.j2ee.WebServiceEndpoint; -import org.glassfish.admin.amxtest.AMXTestBase; - -import java.io.IOException; -import java.util.Set; - - -/** - */ -public final class WSMsgTraceTest - extends AMXTestBase { - public WSMsgTraceTest() - throws IOException { - } - - public void - testMessageTrace() - throws ClassNotFoundException { - final Set s = - getQueryMgr().queryJ2EETypeSet(J2EETypes.WEB_SERVICE_ENDPOINT); - - for (final WebServiceEndpoint wsp : s) { - MessageTrace[] msgs = wsp.getMessagesInHistory(); - if (msgs == null) { - System.out.println(" No messages collected "); - return; - } - System.out.println(" Collected messages " + msgs.length); - for (int idx = 0; idx < msgs.length; idx++) { - final MessageTrace msg = msgs[idx]; - - System.out.println(" message id " + msg.getMessageID()); - System.out.println(" application id " + msg.getApplicationID()); - System.out.println(" endpoint name " + msg.getEndpointName()); - System.out.println(" response size " + msg.getResponseSize()); - System.out.println(" request size " + msg.getRequestSize()); - System.out.println(" transport type is " + - msg.getTransportType()); - System.out.println(" request headers are " + - msg.getHTTPRequestHeaders()); - System.out.println(" response headers are " + - msg.getHTTPResponseHeaders()); - System.out.println(" fault code is " + msg.getFaultCode()); - System.out.println(" fault string is " + msg.getFaultString()); - System.out.println(" fault actor is " + msg.getFaultActor()); - System.out.println(" client host is " + msg.getClientHost()); - System.out.println(" principal name is " + - msg.getPrincipalName()); - } - } - } - - -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/AMXMonitorTestBase.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/AMXMonitorTestBase.java deleted file mode 100644 index 9ce499a5e73..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/AMXMonitorTestBase.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/monitor/AMXMonitorTestBase.java,v 1.6 2007/05/05 05:24:05 tcfujii Exp $ -* $Revision: 1.6 $ -* $Date: 2007/05/05 05:24:05 $ -*/ -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.monitor.MonitoringRoot; -import com.sun.appserv.management.monitor.ServerRootMonitor; -import org.glassfish.admin.amxtest.AMXTestBase; - -/** - */ -public abstract class AMXMonitorTestBase - extends AMXTestBase { - public AMXMonitorTestBase() { - } - - protected final MonitoringRoot - getMonitoringRoot() { - return getDomainRoot().getMonitoringRoot(); - } - - protected final ServerRootMonitor - getServerRootMonitor(final String name) { - return - getMonitoringRoot().getServerRootMonitorMap().get(name); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/BeanCacheMonitorTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/BeanCacheMonitorTest.java deleted file mode 100644 index 3ea1431804d..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/BeanCacheMonitorTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/monitor/BeanCacheMonitorTest.java,v 1.5 2007/05/05 05:24:05 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:24:05 $ -*/ -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.monitor.BeanCacheMonitor; -import com.sun.appserv.management.monitor.statistics.EJBCacheStats; - -import javax.management.j2ee.statistics.BoundedRangeStatistic; -import javax.management.j2ee.statistics.CountStatistic; -import java.util.Iterator; -import java.util.Set; - - -public final class BeanCacheMonitorTest - extends AMXMonitorTestBase { - public BeanCacheMonitorTest() { - } - - - public void - testStats() { - final QueryMgr q = getQueryMgr(); - - final Set beanCacheMonitors = q.queryJ2EETypeSet(XTypes.BEAN_CACHE_MONITOR); - - if (beanCacheMonitors.size() == 0) { - warning("BeanCacheMonitorTest: no MBeans found to test."); - } else { - final Iterator iter = beanCacheMonitors.iterator(); - - while (iter.hasNext()) { - final BeanCacheMonitor m = (BeanCacheMonitor) iter.next(); - final EJBCacheStats s = m.getEJBCacheStats(); - - // verify that we can get each Statistic; there was a problem at one time - final BoundedRangeStatistic b1 = s.getCacheMisses(); - final BoundedRangeStatistic b2 = s.getCacheHits(); - final BoundedRangeStatistic b3 = s.getBeansInCache(); - - // these were failing - final CountStatistic c4 = s.getPassivationSuccesses(); - final CountStatistic c3 = s.getExpiredSessionsRemoved(); - final CountStatistic c2 = s.getPassivationErrors(); - final CountStatistic c1 = s.getPassivations(); - - } - } - } - -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/CallFlowMonitorTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/CallFlowMonitorTest.java deleted file mode 100644 index 2767ce94bdf..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/CallFlowMonitorTest.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.monitor.CallFlowMonitor; -import com.sun.appserv.management.monitor.ServerRootMonitor; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -public final class CallFlowMonitorTest - extends AMXMonitorTestBase { - private String IP_FILTER_NAME = "129.129.129.129"; - private String PRINCIPAL_FILTER_NAME = "Harry"; - - public CallFlowMonitorTest() { - } - - public void testCallFlowOn() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - try { - cfm.setEnabled(true); - assertTrue(cfm.getEnabled()); - } - catch (Throwable t) { - warning("testCallFlowOn: " + - "Can't enable callflow...has the callflow database been started?"); - } - } - - public void testIPFilter() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - cfm.setCallerIPFilter(IP_FILTER_NAME); - final String filter = cfm.getCallerIPFilter(); - boolean val = filter.equals(IP_FILTER_NAME); - assertTrue(val); - } - - public void testPrincipalFilter() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - cfm.setCallerPrincipalFilter(PRINCIPAL_FILTER_NAME); - final String filter = cfm.getCallerPrincipalFilter(); - boolean val = filter.equals(PRINCIPAL_FILTER_NAME); - assertTrue(val); - } - - /* - * Disable CallFlow - */ - public void testCallFlowOff() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - cfm.setEnabled(false); - assertFalse(cfm.getEnabled()); - } - - public void testQueryRequestInformation() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - final List> list = cfm.queryRequestInformation(); - if (list == null) - // int resultSize = list.size (); - // int CORRECT_RESULT_SIZE = 0; - // if (resultSize == CORRECT_RESULT_SIZE) - { - assertTrue(true); - } - } - - public void testQueryCallStackInformation() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - final List> list = cfm.queryCallStackForRequest("RequestID_1"); - if (list == null) - // int resultSize = list.size (); - // int CORRECT_RESULT_SIZE = 0; - // if (resultSize == CORRECT_RESULT_SIZE) - { - assertTrue(true); - } - } - - public void testQueryPieInformation() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - final Map map = cfm.queryPieInformation("RequestID_1"); - if (map != null) - // int resultSize = list.size (); - // int CORRECT_RESULT_SIZE = 0; - // if (resultSize == CORRECT_RESULT_SIZE) - { - assertTrue(true); - } - } - - - public void testClearData() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - cfm.clearData(); - } - - public void testQueryRequestTypeKeys() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - final String[] rT = cfm.queryRequestTypeKeys(); - if (rT.length == 5) { - assertTrue(true); - } else { - assertTrue(false); - } - } - - public void testQueryComponentTypeKeys() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - final String[] rT = cfm.queryComponentTypeKeys(); - assert rT.length == 7; - } - - public void testQueryContainerTypeOrApplicationTypeKeys() { - final CallFlowMonitor cfm = getCallFlowMonitor(); - final String[] rT = cfm.queryContainerTypeOrApplicationTypeKeys(); - assert rT.length == 6; - } - - - private CallFlowMonitor getCallFlowMonitor() { - Map serverRootMonitorMap = - getDomainRoot().getMonitoringRoot().getServerRootMonitorMap(); - // Get the server name from some MBean. Using the default value for now - ServerRootMonitor serverRootMonitor = serverRootMonitorMap.get("server"); - return serverRootMonitor.getCallFlowMonitor(); - } - - public void testExactlyOneDASCallFlowMonitor() { - final Set cfms = - getQueryMgr().queryJ2EETypeSet(XTypes.CALL_FLOW_MONITOR); - - int numDAS = 0; - int numNonDAS = 0; - for (final CallFlowMonitor cfm : cfms) { - if (cfm.isDAS()) { - ++numDAS; - } else { - ++numNonDAS; - } - } - - if (numNonDAS == 0) { - warning("testExactlyOneDASCallFlowMonitor: no instances other than DAS are running"); - } - - assert numDAS == 1 : - "There must be exactly one CallFlowMonitor in the DAS, but there are " + numDAS + - " and there are " + numNonDAS + " non-DAS CallFlowMonitor."; - - } -} - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/ConnectionPoolStatsTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/ConnectionPoolStatsTest.java deleted file mode 100644 index dc5aee875a1..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/ConnectionPoolStatsTest.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/monitor/ConnectionPoolStatsTest.java,v 1.5 2007/05/05 05:24:05 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:24:05 $ -*/ -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.monitor.MonitoringStats; -import com.sun.appserv.management.monitor.statistics.ConnectionPoolStats; - -import javax.management.j2ee.statistics.CountStatistic; -import javax.management.j2ee.statistics.RangeStatistic; -import java.util.Iterator; -import java.util.Set; - - -abstract class ConnectionPoolStatsTest - extends AMXMonitorTestBase { - public ConnectionPoolStatsTest() { - } - - - protected abstract void nextMonitor(final MonitoringStats ms); - - protected int - iterateAllMonitors(final String j2eeType) { - final Set monitors = getQueryMgr().queryJ2EETypeSet(j2eeType); - final Iterator iter = monitors.iterator(); - - int numMonitors = 0; - while (iter.hasNext()) { - final MonitoringStats ms = (MonitoringStats) iter.next(); - ++numMonitors; - nextMonitor(ms); - } - - return numMonitors; - } - - /** - Verify that every Statistic can be successfully accessed. - */ - protected void - accessAllStatistics(final ConnectionPoolStats s) { - final RangeStatistic r1 = s.getNumConnUsed(); - assert (r1 != null); - - final RangeStatistic r2 = s.getNumConnFree(); - assert (r2 != null); - - final RangeStatistic r3 = s.getConnRequestWaitTime(); - assert (r3 != null); - - final CountStatistic c1 = s.getNumConnFailedValidation(); - assert (c1 != null); - - final CountStatistic c2 = s.getNumConnTimedOut(); - assert (c2 != null); - - final CountStatistic c3 = s.getWaitQueueLength(); - assert (c3 != null); - - final CountStatistic c4 = s.getNumConnCreated(); - assert (c4 != null); - - final CountStatistic c5 = s.getNumConnDestroyed(); - assert (c5 != null); - - //final CountStatistic c6 = s.getNumConnOpened(); - // assert( c6 != null ); - - //final CountStatistic c7 = s.getNumConnClosed(); - // assert( c7 != null ); - - final CountStatistic c8 = s.getAverageConnWaitTime(); - assert (c8 != null); - } - -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/ConnectorConnectionPoolStatsTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/ConnectorConnectionPoolStatsTest.java deleted file mode 100644 index bc2b79abf80..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/ConnectorConnectionPoolStatsTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.monitor; - - -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.monitor.ConnectorConnectionPoolMonitor; -import com.sun.appserv.management.monitor.MonitoringStats; -import com.sun.appserv.management.monitor.statistics.ConnectorConnectionPoolStats; - - -public final class ConnectorConnectionPoolStatsTest - extends ConnectionPoolStatsTest { - public ConnectorConnectionPoolStatsTest() { - } - - public void - testConnectorConnectionPoolStats() { - final long start = now(); - - final int numMonitors = iterateAllMonitors(XTypes.CONNECTOR_CONNECTION_POOL_MONITOR); - - printElapsed("testConnectorConnectionPoolStats", numMonitors, start); - } - - public void - nextMonitor(final MonitoringStats ms) { - final ConnectorConnectionPoolMonitor m = (ConnectorConnectionPoolMonitor) ms; - final ConnectorConnectionPoolStats s = m.getConnectorConnectionPoolStats(); - - accessAllStatistics(s); - } - -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/JDBCConnectionPoolStatsTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/JDBCConnectionPoolStatsTest.java deleted file mode 100644 index cc4cfa7ca08..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/JDBCConnectionPoolStatsTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.monitor.JDBCConnectionPoolMonitor; -import com.sun.appserv.management.monitor.MonitoringStats; -import com.sun.appserv.management.monitor.statistics.AltJDBCConnectionPoolStats; - - -public final class JDBCConnectionPoolStatsTest - extends ConnectionPoolStatsTest { - public JDBCConnectionPoolStatsTest() { - } - - - public void - nextMonitor(final MonitoringStats ms) { - final JDBCConnectionPoolMonitor m = (JDBCConnectionPoolMonitor) ms; - final AltJDBCConnectionPoolStats s = m.getAltJDBCConnectionPoolStats(); - - accessAllStatistics(s); - } - - - public void - testJDBCConnectionPoolStats() { - final long start = now(); - - final int numMonitors = iterateAllMonitors(XTypes.JDBC_CONNECTION_POOL_MONITOR); - - printElapsed("testConnectorConnectionPoolStats", numMonitors, start); - } - -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/JMXMonitorMgrTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/JMXMonitorMgrTest.java deleted file mode 100644 index a108201179c..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/JMXMonitorMgrTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/monitor/JMXMonitorMgrTest.java,v 1.5 2007/05/05 05:24:05 tcfujii Exp $ -* $Revision: 1.5 $ -* $Date: 2007/05/05 05:24:05 $ -*/ -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.monitor.AMXStringMonitor; -import com.sun.appserv.management.monitor.JMXMonitorMgr; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.ObjectName; -import java.io.IOException; - -/** - */ -public final class JMXMonitorMgrTest - extends AMXTestBase { - public JMXMonitorMgrTest() { - } - - public JMXMonitorMgr - getMgr() { - return (getDomainRoot().getJMXMonitorMgr()); - } - - public void - testGetMgr() { - final JMXMonitorMgr mgr = getMgr(); - assert (mgr != null); - } - - public void - testCreateRemoveStringMonitor() - throws IOException { - final JMXMonitorMgr mgr = getMgr(); - - final AMXStringMonitor mon = mgr.createStringMonitor(getClass().getName() + "Test"); - final ObjectName objectName = Util.getObjectName(mon); - - mon.setObservedAttribute("Group"); - final ObjectName observee = Util.getObjectName(mgr); - assert (observee != null); - mon.addObservedObject(observee); - assert mon.containsObservedObject(observee); - mon.removeObservedObject(observee); - - assert (getConnection().isRegistered(objectName)); - mgr.remove(mon.getName()); - assert (!getConnection().isRegistered(objectName)); - } -} - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/MonitorTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/MonitorTest.java deleted file mode 100644 index 874e7ced7a8..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/MonitorTest.java +++ /dev/null @@ -1,494 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.j2ee.statistics.BoundaryStatisticImpl; -import com.sun.appserv.management.j2ee.statistics.BoundedRangeStatisticImpl; -import com.sun.appserv.management.j2ee.statistics.CountStatisticImpl; -import com.sun.appserv.management.j2ee.statistics.RangeStatisticImpl; -import com.sun.appserv.management.j2ee.statistics.StatisticFactory; -import com.sun.appserv.management.j2ee.statistics.StatsImpl; -import com.sun.appserv.management.j2ee.statistics.StringStatistic; -import com.sun.appserv.management.j2ee.statistics.StringStatisticImpl; -import com.sun.appserv.management.j2ee.statistics.TimeStatisticImpl; -import com.sun.appserv.management.monitor.MonitoringStats; -import com.sun.appserv.management.util.j2ee.J2EEUtil; -import com.sun.appserv.management.util.jmx.JMXUtil; -import com.sun.appserv.management.util.misc.ExceptionUtil; -import com.sun.appserv.management.util.misc.GSetUtil; -import com.sun.appserv.management.util.misc.StringUtil; - -import javax.management.ObjectName; -import javax.management.j2ee.statistics.BoundaryStatistic; -import javax.management.j2ee.statistics.BoundedRangeStatistic; -import javax.management.j2ee.statistics.CountStatistic; -import javax.management.j2ee.statistics.RangeStatistic; -import javax.management.j2ee.statistics.Statistic; -import javax.management.j2ee.statistics.Stats; -import javax.management.j2ee.statistics.TimeStatistic; -import javax.management.openmbean.CompositeData; -import javax.management.openmbean.CompositeDataSupport; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Set; - - -public final class MonitorTest - extends AMXMonitorTestBase { - public MonitorTest() { - } - - - public void - checkStatisticNames(final MonitoringStats mon) { - final Stats stats = mon.getStats(); - - final Set namesFromMon = GSetUtil.newStringSet(mon.getStatisticNames()); - final Set namesFromStats = GSetUtil.newStringSet(stats.getStatisticNames()); - - assert (namesFromStats.equals(namesFromMon)) : - "statistic names from stats.getStatisticNames() != mon.getStatisticNames(): " + - namesFromStats + " != " + namesFromMon; - } - - public void - checkNumStatistics(final MonitoringStats mon) { - final Stats stats = mon.getStats(); - assert (stats != null) : "null Stats from: " + Util.getObjectName(mon); - final String[] allNames = mon.getStatisticNames(); - - final Statistic[] statistics = mon.getStatistics(allNames); - assert (statistics.length == allNames.length) : - "wrong number of statistics from: " + Util.getObjectName(mon) + - ", got " + statistics.length + ", should be " + allNames.length; - } - - public void - checkOpenStats(final MonitoringStats mon) { - final CompositeDataSupport openStats = mon.getOpenStats(); - assert (openStats != null) : "null OpenStats from: " + Util.getObjectName(mon); - - final StatsImpl stats = new StatsImpl(openStats); - - final Set fromOpenStats = GSetUtil.newStringSet(stats.getStatisticNames()); - final Set fromStats = GSetUtil.newStringSet(mon.getStats().getStatisticNames()); - assert (fromOpenStats.equals(fromStats)) : - "openStats Statistic names don't match Stats Statistic names: " + - fromOpenStats + " != " + fromStats; - } - - private final boolean - isLegalStatistic(final Statistic s) { - // current, we do not allow MapStatistic as these types cover all - return ( - (s instanceof CountStatistic) || - (s instanceof BoundaryStatistic) || - (s instanceof RangeStatistic) || - (s instanceof BoundedRangeStatistic) || - (s instanceof TimeStatistic) || - (s instanceof StringStatistic)); - } - - private final boolean - isLegalStatisticImpl(final Statistic s) { - boolean isLegal = isLegalStatistic(s); - if (isLegal) { - final Class theClass = s.getClass(); - - if ((theClass == CountStatisticImpl.class) || - (theClass == BoundaryStatisticImpl.class) || - (theClass == RangeStatisticImpl.class) || - (theClass == BoundedRangeStatisticImpl.class) || - (theClass == TimeStatisticImpl.class) || - (theClass == StringStatisticImpl.class)) { - ; - } - } - return (isLegal); - } - - - private void - checkLegalStatistic( - final ObjectName objectName, - final Statistic s) { - assert (isLegalStatistic(s)) : "Statistic " + s.getName() + - " in \"" + objectName + - "\" is not a known type of Statistic"; - - assert (isLegalStatisticImpl(s)) : "Statistic " + s.getName() + - " in \"" + objectName + - "\" uses an implementation not intended by the API: " + - s.getClass(); - } - - public void - checkGetStatistic(final MonitoringStats mon) { - final Stats stats = mon.getStats(); - - final ObjectName objectName = Util.getObjectName(mon); - - final String[] names = mon.getStatisticNames(); - for (int i = 0; i < names.length; ++i) { - final String name = names[i]; - final Statistic s = mon.getStatistic(name); - assert (s != null); - assert (s.getName().equals(name)); - - checkLegalStatistic(objectName, s); - } - } - - public void - checkGetStats(final MonitoringStats mon) { - final Stats stats = mon.getStats(); - - final ObjectName objectName = Util.getObjectName(mon); - - final String[] names = stats.getStatisticNames(); - for (int i = 0; i < names.length; ++i) { - final Statistic s = stats.getStatistic(names[i]); - assert (s != null); - assert (s.getName().equals(names[i])); - - checkLegalStatistic(objectName, s); - } - } - - public void - checkGetOpenStatistic(final MonitoringStats mon) { - final Stats stats = mon.getStats(); - - final String[] names = mon.getStatisticNames(); - for (int i = 0; i < names.length; ++i) { - final String name = names[i]; - - final CompositeData d = mon.getOpenStatistic(name); - final Statistic s = StatisticFactory.create(d); - final Statistic s2 = mon.getStatistic(name); - - assert (s.getName().equals(name)); - // values may have changed, but check the static fields - } - - final CompositeDataSupport[] all = mon.getOpenStatistics(names); - assert (all != null); - assert (all.length == names.length); - } - - public void - checkMonitoringStats(final ObjectName objectName) - throws Exception { - final MonitoringStats mon = getProxyFactory().getProxy(objectName, MonitoringStats.class); - - mon.refresh(); - mon.getStatsInterfaceName(); - - checkNumStatistics(mon); - - checkStatisticNames(mon); - - checkGetStatistic(mon); - - checkGetStats(mon); - - checkGetOpenStatistic(mon); - - checkOpenStats(mon); - } - - private Set - getAllMonitoringStats() - throws ClassNotFoundException { - final long start = now(); - - final Set all = - getQueryMgr().queryInterfaceSet(MonitoringStats.class.getName(), null); - - for (final MonitoringStats stats : all) { - } - - printElapsed("getAllMonitoringStats", all.size(), start); - - return (all); - } - - - private String - getterToName(final String getterName) { - return StringUtil.stripPrefix(getterName, JMXUtil.GET); - } - - private String[] - methodsToNames(final Method[] methods) { - final String[] result = new String[methods.length]; - - for (int i = 0; i < methods.length; ++i) { - result[i] = getterToName(methods[i].getName()); - } - - Arrays.sort(result); - return (result); - } - - public void - checkStats( - final MonitoringStats mon, - final Stats stats) - throws InvocationTargetException, IllegalAccessException, NoSuchMethodException { - final ObjectName objectName = Util.getObjectName(mon); - - trace("checkStats: " + objectName); - - final Method[] methodsViaNames = J2EEUtil.getStatisticGetterMethodsUsingNames(stats); - - final Method[] methods = stats.getClass().getMethods(); - - final Set statisticNames = GSetUtil.newSet(stats.getStatisticNames()); - - for (int methodIdx = 0; methodIdx < methodsViaNames.length; ++methodIdx) { - final Method method = methodsViaNames[methodIdx]; - final String methodName = method.getName(); - - final Class returnType = method.getReturnType(); - - final String statisticName = getterToName(methodName); - if (!statisticNames.contains(statisticName)) { - warning("Statistic " + quote(statisticName) + " as derived from " + method + - " missing from " + quote(objectName) + - " available names = " + toString(statisticNames)); - } - - try { - final Object o = method.invoke(stats, (Object[]) null); - assert (o != null); - assert (Statistic.class.isAssignableFrom(o.getClass())); - - assert (returnType.isAssignableFrom(o.getClass())) : - "Method " + methodName + " of MBean " + objectName + - " returned object not assignable to " + returnType.getName(); - - final Statistic stat = (Statistic) method.invoke(stats, (Object[]) null); - assert (method.getReturnType().isAssignableFrom(stat.getClass())); - - final Statistic s = mon.getStatistic(stat.getName()); - assert (returnType.isAssignableFrom(s.getClass())) : - "getStatistic() of MBean " + objectName + - " returned Statistic not assignable to " + returnType.getName(); - - //printVerbose( "Verified " + stat.getClass().getName() + " " + stat.getName() ); - } - catch (Exception e) { - final Throwable rootCause = ExceptionUtil.getRootCause(e); - - warning( - "Failure calling " + method + " on Stats for " + objectName + " = " + - rootCause.getClass().getName() + "\n" + - "Statistic names = " + toString(stats.getStatisticNames())); - } - } - } - - public void - checkAllStats(final ObjectName objectName) - throws InvocationTargetException, IllegalAccessException, NoSuchMethodException { - trace("checkAllStats: " + objectName); - - final MonitoringStats mon = - getProxyFactory().getProxy(objectName, MonitoringStats.class); - - final Method[] methods = mon.getClass().getMethods(); - - final Method specificStatsMethod = getSpecificStatsGetterMethod(mon); - - // the type of Stats returned from getStats() should be the same as the type - // returned from the (only) specific getAbcStats() - final Stats plainStats = mon.getStats(); - assert (specificStatsMethod.getReturnType().isAssignableFrom(plainStats.getClass())) : - "Stats returned from " + objectName + " getStats() should be assignable to " + - specificStatsMethod.getReturnType().getName(); - checkStats(mon, plainStats); - - Stats stats = null; - try { - // verify that we can get it - stats = (Stats) specificStatsMethod.invoke(mon, (Object[]) null); - } - catch (Exception e) { - final Throwable rootCause = ExceptionUtil.getRootCause(e); - - failure( - "Failure calling " + specificStatsMethod.getName() + "() on " + objectName + " = " + - rootCause.getClass().getName()); - } - - assert (plainStats.getClass() == stats.getClass()); - checkStats(mon, stats); - } - - /** - Test the MonitoringStats interface. - */ - public void - testMonitoringStats() - throws Exception { - final long start = now(); - - final Set all = getAllMonitoringStats(); - - testAll(Util.toObjectNames(all), "checkMonitoringStats"); - - printElapsed("testMonitoringStats", all.size(), start); - } - - public void - xtestStats() - throws Exception { - trace("testStats: "); - final long start = now(); - - final Set all = getAllMonitoringStats(); - assert (all.size() >= 10) : "Monitoring is not turned on"; - - //final Set all = getQueryMgr().queryInterfaceSet( com.sun.appserv.management.monitor.HTTPServiceVirtualServerMonitor.class.getName(), null ); - - testAll(Util.toObjectNames(all), "checkAllStats"); - - printElapsed("testStats", all.size(), start); - } - - - /** - Get the specific (non-generic) Stats getter. Example: - getJVMStats() versus plain getStats(). - */ - public Method - getSpecificStatsGetterMethod(final MonitoringStats mon) - throws InvocationTargetException, IllegalAccessException, NoSuchMethodException { - final Method[] methods = mon.getClass().getMethods(); - - Method result = null; - - for (int methodIdx = 0; methodIdx < methods.length; ++methodIdx) { - final Method method = methods[methodIdx]; - final String methodName = method.getName(); - - if (JMXUtil.isGetter(method) && !methodName.equals("getStats") && - Stats.class.isAssignableFrom(method.getReturnType()) && - method.getParameterTypes().length == 0) { - result = method; - break; - } - } - - if (result == null) { - throw new NoSuchMethodException("Can't find specific Stats getter in " + - quote(Util.getObjectName(mon))); - } - - - return (result); - } - - - public void - checkStatsClassSuppliesAllStatistics(final ObjectName objectName) - throws InvocationTargetException, IllegalAccessException, NoSuchMethodException { - //trace( "testStatsClassSuppliesAllStatistics: " + objectName); - - try { - final MonitoringStats mon = getProxyFactory().getProxy(objectName, MonitoringStats.class); - - final Method m = getSpecificStatsGetterMethod(mon); - final Stats stats = (Stats) m.invoke(mon, (Object[]) null); - final Method[] methodsViaIntrospection = J2EEUtil.getStatisticGetterMethodsUsingIntrospection(stats); - final Method[] methodsViaNames = J2EEUtil.getStatisticGetterMethodsUsingNames(stats); - - assert GSetUtil.newSet(methodsViaNames).equals(GSetUtil.newSet(methodsViaIntrospection)) : - "Statistic names for " + quote(objectName) + - " obtained via Statistic names do not match those obtained via introspection: \n" + - "via names:" + toString(methodsToNames(methodsViaNames)) + - "\nvia introspection: " + toString(methodsToNames(methodsViaIntrospection)); - - final String[] namesFromMethods = methodsToNames(methodsViaNames); - - assert GSetUtil.newSet(namesFromMethods).equals(GSetUtil.newSet(stats.getStatisticNames())) : - "MBean " + quote(objectName) + " Stats object of class " + stats.getClass().getName() + - " has Statistic methods that don't match getStatisticNames() =>\n" + - toString(namesFromMethods) + " != " + - toString(stats.getStatisticNames()); - } - catch (Exception e) { - trace("Caught exception for " + StringUtil.quote(JMXUtil.toString(objectName)) + - " = " + e.getClass().getName() + ": " + StringUtil.quote(e.getMessage()) + "\n" + - ExceptionUtil.getStackTrace(ExceptionUtil.getRootCause(e))); - } - } - - /** - Verify that the Stats class for each MonitoringStats supplies all Statistics - found in itself, and that this matches those advertised by MonitoringStats. - */ - public void - testStatsClassSuppliesAllStatistics() - throws Exception { - //trace( "testStatsClassSuppliesAllStatistics: "); - final long start = now(); - - final Set all = getAllMonitoringStats(); - - testAll(Util.toObjectNames(all), "checkStatsClassSuppliesAllStatistics"); - - printElapsed("testStatsClassSuppliesAllStatistics", all.size(), start ); - } -} - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/StatisticTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/StatisticTest.java deleted file mode 100644 index 04c6958e8d4..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/StatisticTest.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.j2ee.statistics.*; -import com.sun.appserv.management.util.j2ee.J2EEUtil; -import com.sun.appserv.management.util.misc.TypeCast; -import org.glassfish.admin.amxtest.AMXTestBase; - -import javax.management.j2ee.statistics.Statistic; -import javax.management.openmbean.CompositeData; -import javax.management.openmbean.CompositeType; -import javax.management.openmbean.OpenDataException; -import java.util.Set; - - -public final class StatisticTest - extends AMXTestBase { - public StatisticTest() { - } - - private void - checkOpenDataConversion(final Statistic s) - throws OpenDataException { - final CompositeData d = J2EEUtil.statisticToCompositeData(s); - final Statistic roundTrip = StatisticFactory.create(d); - - assert (s.equals(roundTrip)) : - "Conversion to CompositeData and back to Statistic failed:\n" + - toString(s) + " != " + toString(roundTrip); - } - - public static final class TestStatistic - extends StatisticImpl { - public static final long serialVersionUID = 9999999; - - private final int Foo; - private final String Bar; - - public TestStatistic() { - super("Test", "test dummy", "none", 0, System.currentTimeMillis()); - - Foo = 999; - Bar = "Bar"; - } - - public int getFoo() { return (Foo); } - - public String getBar() { return (Bar); } - } - - public void - testAnyOpenDataConversion() - throws OpenDataException { - // verify that anything implementing Statistic works correctly - final TestStatistic test = new TestStatistic(); - final MapStatisticImpl testMap = new MapStatisticImpl(test); - assert (testMap.getValue("Foo").equals(new Integer(test.getFoo()))); - assert (testMap.getValue("Bar").equals(test.getBar())); - - final CompositeData d = J2EEUtil.statisticToCompositeData(testMap); - final CompositeType t = d.getCompositeType(); - final Set values = TypeCast.asSet(t.keySet()); - assert (values.contains("Name")); - assert (values.contains("Foo")); - assert (values.contains("Bar")); - - final MapStatisticImpl roundTrip = (MapStatisticImpl) StatisticFactory.create(d); - assert (new Integer(test.getFoo()).equals(roundTrip.getValue("Foo"))); - assert (test.getBar().equals(roundTrip.getValue("Bar"))); - } - - public void - testStdOpenDataConversion() - throws OpenDataException { - final CountStatisticImpl c = - new CountStatisticImpl("Count", "desc", "number", 0, now(), 99); - - final RangeStatisticImpl r = - new RangeStatisticImpl("Range", "desc", "number", 0, now(), 0, 50, 100); - - final BoundaryStatisticImpl b = - new BoundaryStatisticImpl("Boundary", "desc", "number", 0, now(), 0, 100); - - final BoundedRangeStatisticImpl br = - new BoundedRangeStatisticImpl("BoundedRange", "desc", "number", 0, now(), 0, 50, 100, 0, 100); - - final TimeStatisticImpl t = - new TimeStatisticImpl("Time", "desc", "seconds", 0, now(), 1, 10, 100, 1000); - - final StringStatisticImpl s = - new StringStatisticImpl("String", "desc", "chars", 0, now(), "hello"); - - final NumberStatisticImpl n = - new NumberStatisticImpl("Number", "desc", "number", 0, now(), 1234.56); - - checkOpenDataConversion(c); - checkOpenDataConversion(r); - checkOpenDataConversion(b); - checkOpenDataConversion(br); - checkOpenDataConversion(t); - checkOpenDataConversion(s); - checkOpenDataConversion(n); - } - -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/WebServiceEndpointMonitorTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/WebServiceEndpointMonitorTest.java deleted file mode 100644 index 4323778586b..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/monitor/WebServiceEndpointMonitorTest.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -/* -* $Header: /cvs/glassfish/admin/mbeanapi-impl/tests/org.glassfish.admin.amxtest/monitor/WebServiceEndpointMonitorTest.java,v 1.6 2007/05/05 05:24:05 tcfujii Exp $ -* $Revision: 1.6 $ -* $Date: 2007/05/05 05:24:05 $ -*/ -package org.glassfish.admin.amxtest.monitor; - -import com.sun.appserv.management.base.QueryMgr; -import com.sun.appserv.management.base.XTypes; -import com.sun.appserv.management.j2ee.statistics.NumberStatistic; -import com.sun.appserv.management.monitor.WebServiceEndpointMonitor; -import com.sun.appserv.management.monitor.statistics.WebServiceEndpointAggregateStats; - -import javax.management.j2ee.statistics.CountStatistic; -import java.util.Iterator; -import java.util.Set; - - -public final class WebServiceEndpointMonitorTest - extends AMXMonitorTestBase { - public WebServiceEndpointMonitorTest() { - } - - - public void - testStats() { - final QueryMgr q = getQueryMgr(); - - final Set wsMonitors = q.queryJ2EETypeSet( - XTypes.WEBSERVICE_ENDPOINT_MONITOR); - - if (wsMonitors.size() == 0) { - warning("WebServiceEndpointMonitorTest: no MBeans found to test."); - } else { - Iterator itr = wsMonitors.iterator(); - while (itr.hasNext()) { - WebServiceEndpointMonitor m = (WebServiceEndpointMonitor) - itr.next(); - - final WebServiceEndpointAggregateStats s = - m.getWebServiceEndpointAggregateStats(); - - // verify that we can get each Statistic; - // there was a problem at one time - - final CountStatistic r1 = s.getTotalFaults(); - assert (r1 != null); - - final CountStatistic r2 = s.getTotalNumSuccess(); - assert (r2 != null); - - //final AverageRangeStatistic r3 = s.getResponseTime(); - //assert( r3 != null ); - - final NumberStatistic c1 = s.getThroughput(); - assert (c1 != null); - - final CountStatistic c2 = s.getTotalAuthFailures(); - assert (c2 != null); - - final CountStatistic c3 = s.getTotalAuthSuccesses(); - assert (c3 != null); - - } - } - } - -} - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/AMXComparator.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/AMXComparator.java deleted file mode 100644 index c74e8a906d9..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/AMXComparator.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.support; - -import com.sun.appserv.management.base.AMX; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.util.jmx.ObjectNameComparator; - -import javax.management.ObjectName; - - -public final class AMXComparator - implements java.util.Comparator { - public AMXComparator() {} - - public int - compare( - final T lhs, - final T rhs) { - final ObjectName lhsName = Util.getObjectName(lhs); - final ObjectName rhsName = Util.getObjectName(rhs); - - return ObjectNameComparator.INSTANCE.compare(lhsName, rhsName); - } - - public boolean - equals(final Object other) { - return (other instanceof AMXComparator); - } -} - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/CoverageInfoTest.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/CoverageInfoTest.java deleted file mode 100644 index cd611e4f342..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/CoverageInfoTest.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.support; - -import com.sun.appserv.management.ext.coverage.CoverageInfoImpl; - -import javax.management.MBeanInfo; - -/** - */ -public final class CoverageInfoTest - extends junit.framework.TestCase { - public CoverageInfoTest() { - } - - - public CoverageInfoImpl - create(final MBeanInfo info) { - return new CoverageInfoImpl(info); - } - - - public void - testCreate() { - CoverageInfoImpl impl = create(null); - - // verify that we fail in null MBeanInfo case - try { - impl.getNumReadableAttributes(); - assert (false); - } catch (Exception e) { - } - try { - impl.getNumWriteableAttributes(); - assert (false); - } catch (Exception e) { - } - try { - impl.getNumWriteableAttributes(); - assert (false); - } catch (Exception e) { - } - - /* - impl = create(getTestMBeanInfo()); - assert (impl.getReadableAttributes() != null); - assert (impl.getWriteableAttributes() != null); - assert (impl.getOperations() != null); - assert impl.getNumReadableAttributes() != 0; - assert impl.getNumWriteableAttributes() != 0; - assert impl.getNumOperations() != 0; - assert impl.getAttributesRead().size() == 0; - assert impl.getAttributesWritten().size() == 0; - assert impl.getOperationsInvoked().size() == 0; - */ - } - - -/* - - - - private MBeanInfo - getTestMBeanInfo() { - return MBeanInfoConverter.getInstance().convert(DomainConfig.class, null); - } - - - public void - testAttributes() - { - final MBeanInfo mbeanInfo = getTestMBeanInfo(); - - final CoverageInfoImpl impl = create( mbeanInfo ); - assert( mbeanInfo == impl.getMBeanInfo() ); - - final MBeanAttributeInfo[] attrInfos = mbeanInfo.getAttributes(); - - for( final MBeanAttributeInfo attrInfo : attrInfos ) - { - final String name = attrInfo.getName(); - - if ( attrInfo.isReadable() ) - { - assert( impl.getReadableAttributes().contains( name ) ); - impl.attributeWasRead( name ); - assert( impl.getAttributesRead().contains( name ) ); - assert( ! impl.getAttributesNotRead().contains( name ) ); - } - - if ( attrInfo.isWritable() ) - { - assert( impl.getWriteableAttributes().contains( name ) ); - impl.attributeWasWritten( name ); - assert( impl.getAttributesWritten().contains( name ) ); - assert( ! impl.getAttributesNotWritten().contains( name ) ); - } - } - - assert( impl.getAttributesNotRead().size() == 0 ); - assert( impl.getAttributeReadCoverage() == 100 ); - assert( impl.getAttributeGetFailures().size() == 0 ); - - assert( impl.getAttributesNotWritten().size() == 0 ); - assert( impl.getAttributeWriteCoverage() == 100 ); - assert( impl.getAttributeSetFailures().size() == 0 ); - - - final String BOGUS = "bogus"; - impl.attributeWasRead( BOGUS ); - impl.attributeWasWritten( BOGUS ); - - assert( impl.getUnknownAttributes().keySet().contains( BOGUS ) ); - assert( impl.getUnknownAttributes().keySet().size() == 1 ); - assert( impl.getAttributeGetFailures().size() == 0 ); - assert( impl.getAttributeSetFailures().size() == 0 ); - - final MBeanAttributeInfo attr = attrInfos[ 0 ]; - impl.attributeGetFailure( attr.getName() ); - impl.attributeGetFailure( attr.getName() ); - assert( impl.getAttributeGetFailures().size() == 1 ); - impl.attributeSetFailure( attr.getName() ); - impl.attributeSetFailure( attr.getName() ); - assert( impl.getAttributeSetFailures().size() == 1 ); - } - - - public void - testOperations() - { - final MBeanInfo mbeanInfo = getTestMBeanInfo(); - final MBeanOperationInfo[] operationInfos = mbeanInfo.getOperations(); - - final CoverageInfoImpl impl = create( mbeanInfo ); - assert( mbeanInfo == impl.getMBeanInfo() ); - - //-------------------------------------------------------------------- - // verify that operationWasInvoked() works - - for( final MBeanOperationInfo operationInfo : operationInfos ) - { - final String name = operationInfo.getName(); - final String[] sig = JMXUtil.getSignature( operationInfo.getSignature() ); - - impl.operationWasInvoked( name, sig ); - } - - assert( impl.getOperationCoverage() == 100 ) : - "Expected coverage of 100%, got " + impl.getOperationCoverage(); - - assert( impl.getUnknownOperations().size() == 0 ); - assert( impl.getOperationsNotInvoked().size() == 0 ); - assert( impl.getInvocationFailures().size() == 0 ); - impl.toString( true ); - impl.toString( false ); - - - //-------------------------------------------------------------------- - // verify that markAsInvoked() works - - final Set invoked = impl.getOperationsInvoked(); - impl.clear(); - for( final String op : invoked ) - { - impl.markAsInvoked( op ); - } - - assert( impl.getOperationCoverage() == 100 ) : - "Expected coverage of 100%, got " + impl.getOperationCoverage(); - assert( impl.getUnknownOperations().size() == 0 ); - assert( impl.getOperationsNotInvoked().size() == 0 ); - assert( impl.getInvocationFailures().size() == 0 ); - - final String DUMMY_OPERATION = "dummyOperationName"; - impl.operationWasInvoked( DUMMY_OPERATION, null ); - impl.operationWasInvoked( DUMMY_OPERATION, null ); - assert( impl.getUnknownOperations().size() == 1 ); - impl.toString( true ); - impl.toString( false ); - - - //-------------------------------------------------------------------- - // verify that failures are tracked correctly - impl.clear(); - for( final MBeanOperationInfo operationInfo : operationInfos ) - { - final String name = operationInfo.getName(); - final String[] sig = JMXUtil.getSignature( operationInfo.getSignature() ); - - impl.operationWasInvoked( name, sig ); - impl.operationFailed( name, sig ); - } - assert( impl.getOperationCoverage() == 100 ) : - "Expected coverage of 100%, got " + impl.getOperationCoverage(); - assert( impl.getUnknownOperations().size() == 0 ); - assert( impl.getOperationsNotInvoked().size() == 0 ); - assert( impl.getOperationsInvoked().size() == operationInfos.length ); - assert( impl.getInvocationFailures().size() == operationInfos.length ); - impl.toString( true ); - impl.toString( false ); - - - //-------------------------------------------------------------------- - // verify that we can't call operationFailed() on an illegal operation - try - { - impl.operationFailed( "foo", null ); - assert( false ) : "expected failure when calling operationFailed()"; - } - catch( IllegalArgumentException e ) - { - } - impl.toString( true ); - impl.toString( false ); - impl.toString(); - }*/ -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/CreateRemoveListener.java b/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/CreateRemoveListener.java deleted file mode 100644 index 2392870f917..00000000000 --- a/appserver/tests/amx/src/org/glassfish/admin/amxtest/support/CreateRemoveListener.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.admin.amxtest.support; - -import com.sun.appserv.management.base.Container; -import com.sun.appserv.management.base.Util; -import com.sun.appserv.management.config.AMXConfig; -import com.sun.appserv.management.util.stringifier.SmartStringifier; - -import javax.management.ListenerNotFoundException; -import javax.management.Notification; -import javax.management.NotificationListener; -import javax.management.ObjectName; - - -/** - A NotificationListener which expects to receive a - CONFIG_CREATED_NOTIFICATION_TYPE and CONFIG_REMOVED_NOTIFICATION_TYPE - from an MBean with a particular j2eeType and name. - */ -public final class CreateRemoveListener - implements NotificationListener { - private final String mNameExpected; - private final String mJ2EETypeExpected; - private final Container mSource; - - private Notification mCreateNotif; - private Notification mRemoveNotif; - - public CreateRemoveListener( - final Container source, - final String j2eeTypeExpected, - final String nameExpected) { - mSource = source; - mNameExpected = nameExpected; - mJ2EETypeExpected = j2eeTypeExpected; - - mSource.addNotificationListener(this, null, null); - } - - public void - handleNotification( - final Notification notifIn, - final Object handback) { - final String type = notifIn.getType(); - - //final Map m = getAMXNotificationData * notifIn ); - final ObjectName objectName = - Util.getAMXNotificationValue(notifIn, AMXConfig.CONFIG_OBJECT_NAME_KEY, ObjectName.class); - - //trace( "CreateRemoveListener:\n" + SmartStringifier.toString( notifIn ) + ":\n" + objectName ); - - if (Util.getJ2EEType(objectName).equals(mJ2EETypeExpected) && - Util.getName(objectName).equals(mNameExpected)) { - if (type.equals(AMXConfig.CONFIG_CREATED_NOTIFICATION_TYPE)) { - mCreateNotif = notifIn; - } else if (type.equals(AMXConfig.CONFIG_REMOVED_NOTIFICATION_TYPE)) { - mRemoveNotif = notifIn; - } - } - } - - protected void - trace(Object o) { - System.out.println(SmartStringifier.toString(o)); - } - - public static void - mySleep(final long millis) { - try { - Thread.sleep(millis); - } - catch (InterruptedException e) { - } - } - - - public void - waitCreate() { - long millis = 10; - while (mCreateNotif == null) { - mySleep(millis); - trace("waiting " + millis + "ms for CONFIG_CREATED_NOTIFICATION_TYPE for " + mNameExpected); - millis *= 2; - } - } - - public void - waitRemove() { - long millis = 10; - while (mRemoveNotif == null) { - mySleep(millis); - trace("waiting " + millis + "ms for CONFIG_REMOVED_NOTIFICATION_TYPE for " + mNameExpected); - millis *= 2; - } - } - - - public void - waitNotifs() { - waitCreate(); - waitRemove(); - - try { - mSource.removeNotificationListener((NotificationListener) this, null, null); - } - catch (ListenerNotFoundException e) { - throw new RuntimeException(e); - } - } -} - diff --git a/appserver/tests/cdi/README.txt b/appserver/tests/cdi/README.txt deleted file mode 100644 index f12fde8754e..00000000000 --- a/appserver/tests/cdi/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - -This is a set of integrations tests for cdi. - -They currently require two parameters to be specified: -glassfish.home= The directory where glassfish is installed -source.home= The directory where the glassfish source is located - -To run the tests something like this line should be run: - -mvn -Dglassfish.home=/scratch/jwells/bg/installs/gf/glassfish4/glassfish \ - -Dsource.home=/scratch/jwells/bg/all/main \ - clean install 2>&1 | tee t.out - -UNDER CONSTRUCTION: We would like to get rid of the need for source.home - diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb1/pom.xml b/appserver/tests/cdi/cases/multiBeansXml/ejb1/pom.xml deleted file mode 100755 index 029fccb4452..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb1/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.cdi.cases - multiBeansXml - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.cdi.cases.multiBeansXml - ejb1 - 4.1-SNAPSHOT - - GlassFish Ejb1 With Specific beans.xml - - - - javax.enterprise - cdi-api - 1.1-PRD - provided - - - jakarta.ejb - jakarta.ejb-api - provided - - - diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/InterceptedEjb1.java b/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/InterceptedEjb1.java deleted file mode 100644 index ed8f7bb186a..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/InterceptedEjb1.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.multiejb1; - -import java.util.List; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.enterprise.inject.spi.BeanManager; -import javax.inject.Inject; - -/** - * - * @author jwells - * - */ -@Stateless -@Remote(MultiBeansXmlEjb1.class) -public class InterceptedEjb1 implements MultiBeansXmlEjb1 { - @SuppressWarnings("unused") - @Inject - private BeanManager manager; // Forces this to be a CDI bean - - @RecordingInterceptor - @Override - public List callMe(List callerList) { - callerList.add(CALL_ME1); - return callerList; - } -} diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/Interceptor1.java b/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/Interceptor1.java deleted file mode 100644 index 3d63fd67055..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/Interceptor1.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.multiejb1; - -import java.util.List; - -import javax.interceptor.AroundInvoke; -import javax.interceptor.Interceptor; -import javax.interceptor.InvocationContext; - -/** - * @author jwells - * - */ -@Interceptor -@RecordingInterceptor -public class Interceptor1 { - - @SuppressWarnings("unchecked") - @AroundInvoke - public Object intercept(InvocationContext context) throws Exception { - Object params[] = context.getParameters(); - if (params.length != 1 || !(params[0] instanceof List)) { - return context.proceed(); - } - - List param = (List) params[0]; - param.add(MultiBeansXmlEjb1.INTERCEPTOR1); - - return context.proceed(); - } - -} diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/MultiBeansXmlEjb1.java b/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/MultiBeansXmlEjb1.java deleted file mode 100644 index e0045d06023..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/MultiBeansXmlEjb1.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.multiejb1; - -import java.util.List; - -/** - * @author jwells - * - */ -public interface MultiBeansXmlEjb1 { - public final static String INTERCEPTOR1 = "Interceptor1"; - public final static String CALL_ME1 = "CallMe1"; - - /** - * This method should have all interceptors listed in the return list - * - * @param callerList An empty, non-null list - * @return The list of all the classes that intercepted (and the final impl class) this call - */ - public List callMe(List callerList); - -} diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/RecordingInterceptor.java b/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/RecordingInterceptor.java deleted file mode 100644 index daa3a06b0af..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/java/com/oracle/cdi/cases/devtests/multiejb1/RecordingInterceptor.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.multiejb1; - -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import javax.interceptor.InterceptorBinding; - -/** - * @author jwells - * - */ -@Inherited -@InterceptorBinding -@Retention(RUNTIME) -@Target({METHOD,TYPE}) -public @interface RecordingInterceptor { - -} diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/resources/META-INF/beans.xml b/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 8863c38799b..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb1/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - com.oracle.cdi.cases.devtests.multiejb1.Interceptor1 - - - \ No newline at end of file diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb2/pom.xml b/appserver/tests/cdi/cases/multiBeansXml/ejb2/pom.xml deleted file mode 100755 index 0d0e5d0709e..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb2/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.cdi.cases - multiBeansXml - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.cdi.cases.multiBeansXml - ejb2 - 4.1-SNAPSHOT - - GlassFish Ejb2 With Specific beans.xml - - - - javax.enterprise - cdi-api - 1.1-PRD - provided - - - jakarta.ejb - jakarta.ejb-api - provided - - - diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/InterceptedEjb2.java b/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/InterceptedEjb2.java deleted file mode 100644 index 4b6bbfbe40f..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/InterceptedEjb2.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.multiejb2; - -import java.util.List; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.enterprise.inject.spi.BeanManager; -import javax.inject.Inject; - -/** - * - * @author jwells - */ -@Stateless -@Remote(MultiBeansXmlEjb2.class) -public class InterceptedEjb2 implements MultiBeansXmlEjb2 { - @SuppressWarnings("unused") - @Inject - private BeanManager manager; // Forces this to be a CDI bean - - @RecordingInterceptor - @Override - public List callMe(List callerList) { - callerList.add(CALL_ME2); - return callerList; - } -} diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/Interceptor2.java b/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/Interceptor2.java deleted file mode 100644 index 6a539980876..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/Interceptor2.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.multiejb2; - -import java.util.List; - -import javax.interceptor.AroundInvoke; -import javax.interceptor.Interceptor; -import javax.interceptor.InvocationContext; - -/** - * @author jwells - * - */ -@Interceptor -@RecordingInterceptor -public class Interceptor2 { - @SuppressWarnings("unchecked") - @AroundInvoke - public Object intercept(InvocationContext context) throws Exception { - Object params[] = context.getParameters(); - if (params.length != 1 || !(params[0] instanceof List)) { - return context.proceed(); - } - - List param = (List) params[0]; - param.add(MultiBeansXmlEjb2.INTERCEPTOR2); - - return context.proceed(); - } - -} diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/MultiBeansXmlEjb2.java b/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/MultiBeansXmlEjb2.java deleted file mode 100644 index fbd30ef45b0..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/MultiBeansXmlEjb2.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.multiejb2; - -import java.util.List; - -/** - * @author jwells - * - */ -public interface MultiBeansXmlEjb2 { - public final static String INTERCEPTOR2 = "Interceptor2"; - public final static String CALL_ME2 = "CallMe2"; - - /** - * This method should have all interceptors listed in the return list - * - * @param callerList An empty, non-null list - * @return The list of all the classes that intercepted (and the final impl class) this call - */ - public List callMe(List callerList); - -} diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/RecordingInterceptor.java b/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/RecordingInterceptor.java deleted file mode 100644 index 5fa5f53af7d..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/java/com/oracle/cdi/cases/devtests/multiejb2/RecordingInterceptor.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.multiejb2; - -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import javax.interceptor.InterceptorBinding; - -/** - * @author jwells - * - */ -@Inherited -@InterceptorBinding -@Retention(RUNTIME) -@Target({METHOD,TYPE}) -public @interface RecordingInterceptor { - -} diff --git a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/resources/META-INF/beans.xml b/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 003187e53cd..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/ejb2/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - com.oracle.cdi.cases.devtests.multiejb2.Interceptor2 - - \ No newline at end of file diff --git a/appserver/tests/cdi/cases/multiBeansXml/multiBeansApp/pom.xml b/appserver/tests/cdi/cases/multiBeansXml/multiBeansApp/pom.xml deleted file mode 100644 index 2e9ce2068fd..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/multiBeansApp/pom.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.cdi.cases - multiBeansXml - 4.1-SNAPSHOT - - - org.glassfish.tests.cdi.cases.multiBeansXml - multiBeansApp - ear - - HK2 CDI MultiBeansApp EAR - - - - - org.apache.maven.plugins - maven-ear-plugin - - - - org.glassfish.tests.cdi.cases.multiBeansXml - ejb1 - ejb1.jar - - - org.glassfish.tests.cdi.cases.multiBeansXml - ejb2 - ejb2.jar - - - - - - - - - - org.glassfish.tests.cdi.cases.multiBeansXml - ejb1 - ejb - ${project.version} - - - org.glassfish.tests.cdi.cases.multiBeansXml - ejb2 - ejb - ${project.version} - - - jakarta.ejb - jakarta.ejb-api - provided - - - javax.xml.rpc - javax.xml.rpc-api - provided - - - jakarta.transaction - jakarta.transaction-api - provided - - - diff --git a/appserver/tests/cdi/cases/multiBeansXml/pom.xml b/appserver/tests/cdi/cases/multiBeansXml/pom.xml deleted file mode 100755 index 4cd33bfd6d0..00000000000 --- a/appserver/tests/cdi/cases/multiBeansXml/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.cdi - cases - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.cdi.cases - multiBeansXml - pom - 4.1-SNAPSHOT - - GlassFish CDI MultiBeanXml Test - - ejb1 - ejb2 - multiBeansApp - - diff --git a/appserver/tests/cdi/cases/pom.xml b/appserver/tests/cdi/cases/pom.xml deleted file mode 100755 index f09727fb96e..00000000000 --- a/appserver/tests/cdi/cases/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests - cdi - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.cdi - cases - pom - 4.1-SNAPSHOT - - GlassFish CDI Test Cases - - multiBeansXml - preDestroyScoping - runner - - diff --git a/appserver/tests/cdi/cases/preDestroyScoping/ear/pom.xml b/appserver/tests/cdi/cases/preDestroyScoping/ear/pom.xml deleted file mode 100644 index 3dd6bd9e285..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/ear/pom.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.cdi.cases - preDestroyScoping - 4.1-SNAPSHOT - - - org.glassfish.tests.cdi.cases.preDestroyScoping - preDestroyScoping - ear - - CDI PreDestroyScoping EAR - - - - - org.apache.maven.plugins - maven-ear-plugin - - - - org.glassfish.tests.cdi.cases.preDestroyScoping - web - web.war - - - org.glassfish.tests.cdi.cases.preDestroyScoping - lib - lib - lib.jar - - - - - - - - - - org.glassfish.tests.cdi.cases.preDestroyScoping - web - war - ${project.version} - - - org.glassfish.tests.cdi.cases.preDestroyScoping - lib - ${project.version} - - - jakarta.ejb - jakarta.ejb-api - provided - - - javax.xml.rpc - javax.xml.rpc-api - provided - - - jakarta.transaction - jakarta.transaction-api - provided - - - diff --git a/appserver/tests/cdi/cases/preDestroyScoping/lib/pom.xml b/appserver/tests/cdi/cases/preDestroyScoping/lib/pom.xml deleted file mode 100755 index 3990bc264ba..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/lib/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.cdi.cases - preDestroyScoping - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.cdi.cases.preDestroyScoping - lib - 4.1-SNAPSHOT - - GlassFish library for PreDestroyScoping test - - - - javax.enterprise - cdi-api - 1.1-PRD - provided - - - jakarta.ejb - jakarta.ejb-api - provided - - - diff --git a/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/EventLog.java b/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/EventLog.java deleted file mode 100644 index 17fed95ea1e..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/EventLog.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.predestroy.lib; - - -import javax.enterprise.context.ApplicationScoped; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; - - -@ApplicationScoped -public class EventLog { - public void add(String event) { - events.add(event); - } - - public List get() { - return Collections.unmodifiableList(events); - } - - public void clear() { - events.clear(); - } - - private final List events = new CopyOnWriteArrayList(); -} diff --git a/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/PreDestroyConstants.java b/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/PreDestroyConstants.java deleted file mode 100644 index dda1c541970..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/PreDestroyConstants.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.predestroy.lib; - -/** - * @author jwells - * - */ -public class PreDestroyConstants { - public static final String CREATED = "created "; - public static final String PRODUCER_PRE_DESTROY_IN = "calling request bean from preDestroy"; - public static final String EXPECTED_EXCEPTION = "request bean properly threw ContextNotActiveException"; - public static final String IN_REQUEST_METHOD = "beanMethod called"; - -} diff --git a/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/RequestBean.java b/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/RequestBean.java deleted file mode 100644 index 6abb8a658d8..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/java/com/oracle/cdi/cases/devtests/predestroy/lib/RequestBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.predestroy.lib; - -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; - -@RequestScoped -public class RequestBean { - public void beanMethod() { - eventLog.add(PreDestroyConstants.IN_REQUEST_METHOD); - } - - @Inject private EventLog eventLog; -} diff --git a/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/resources/META-INF/beans.xml b/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/resources/META-INF/beans.xml deleted file mode 100644 index dbf7103b991..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/lib/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/appserver/tests/cdi/cases/preDestroyScoping/pom.xml b/appserver/tests/cdi/cases/preDestroyScoping/pom.xml deleted file mode 100755 index 721a7f91b2e..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.cdi - cases - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.cdi.cases - preDestroyScoping - pom - 4.1-SNAPSHOT - - GlassFish CDI PreDestroyScoping Test - - lib - web - ear - - diff --git a/appserver/tests/cdi/cases/preDestroyScoping/web/pom.xml b/appserver/tests/cdi/cases/preDestroyScoping/web/pom.xml deleted file mode 100644 index 145c0d4d8f3..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/web/pom.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.cdi.cases - preDestroyScoping - 4.1-SNAPSHOT - - - org.glassfish.tests.cdi.cases.preDestroyScoping - web - war - - CDI Pre Destroy Scoping Case WebApp - - - - - org.apache.maven.plugins - maven-war-plugin - - - - true - - - - - - - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - org.glassfish.tests.cdi.cases.preDestroyScoping - lib - ${project.version} - provided - - - diff --git a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/EventLogServlet.java b/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/EventLogServlet.java deleted file mode 100644 index a9ef68e9ef3..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/EventLogServlet.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.predestroy.war; - - -import javax.inject.Inject; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.oracle.cdi.cases.devtests.predestroy.lib.EventLog; - -import java.io.IOException; - - -@WebServlet(urlPatterns = "/events") -public class EventLogServlet extends HttpServlet { - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, IOException { - for (String event : eventLog.get()) { - resp.getWriter().println(event); - } - eventLog.clear(); - } - - @Inject private EventLog eventLog; -} diff --git a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/LogoutServlet.java b/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/LogoutServlet.java deleted file mode 100644 index 0ba226e13f3..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/LogoutServlet.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.predestroy.war; - - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; -import java.io.IOException; - - -@WebServlet(urlPatterns = "/logout") -public class LogoutServlet extends HttpServlet { - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, IOException { - HttpSession session = req.getSession(false); - if (session != null) { - session.invalidate(); - } - } -} diff --git a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/SessionBeanProducer.java b/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/SessionBeanProducer.java deleted file mode 100644 index 4a633bf1e43..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/SessionBeanProducer.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.predestroy.war; - - -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.enterprise.context.ContextNotActiveException; -import javax.enterprise.context.SessionScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; - -import com.oracle.cdi.cases.devtests.predestroy.lib.EventLog; -import com.oracle.cdi.cases.devtests.predestroy.lib.PreDestroyConstants; -import com.oracle.cdi.cases.devtests.predestroy.lib.RequestBean; - -import java.io.Serializable; -import java.util.UUID; -import java.util.concurrent.atomic.AtomicReference; - - -@SessionScoped -public class SessionBeanProducer implements Serializable { - @Produces - public UUID getUUID() { - return uuidHolder.get(); - } - - @PostConstruct - void constructed() { - UUID uuid = UUID.randomUUID(); - uuidHolder.set(uuid); - eventLog.add(PreDestroyConstants.CREATED + uuid); - } - - @PreDestroy - void destroy() { - eventLog.add(PreDestroyConstants.PRODUCER_PRE_DESTROY_IN); - try { - requestBean.beanMethod(); - } - catch (ContextNotActiveException th) { - eventLog.add(PreDestroyConstants.EXPECTED_EXCEPTION); - } - } - - private final AtomicReference uuidHolder = new AtomicReference(); - @Inject private EventLog eventLog; - @Inject private RequestBean requestBean; -} diff --git a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/SessionBeanServlet.java b/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/SessionBeanServlet.java deleted file mode 100644 index 969a5dc842d..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/java/com/oracle/cdi/cases/devtests/predestroy/war/SessionBeanServlet.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.cases.devtests.predestroy.war; - - -import javax.inject.Inject; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.UUID; - - -@WebServlet(urlPatterns = "/bean") -public class SessionBeanServlet extends HttpServlet { - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, IOException { - resp.getWriter().println(bean.toString()); - resp.getWriter().println(req.getSession().getId()); - } - - @Inject private UUID bean; -} diff --git a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/webapp/WEB-INF/beans.xml b/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index dbf7103b991..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/webapp/WEB-INF/beans.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/webapp/WEB-INF/web.xml b/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1d5fa86146e..00000000000 --- a/appserver/tests/cdi/cases/preDestroyScoping/web/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - diff --git a/appserver/tests/cdi/cases/runner/pom.xml b/appserver/tests/cdi/cases/runner/pom.xml deleted file mode 100644 index f78c80c37c1..00000000000 --- a/appserver/tests/cdi/cases/runner/pom.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.cdi - cases - 4.1-SNAPSHOT - - - org.glassfish.tests.cdi.cases - runner - - CDI Test Case Runner - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${glassfish.home} - ${source.home} - - - - - - - - - org.glassfish.tests.cdi.cases.multiBeansXml - ejb1 - ${project.version} - - - org.glassfish.tests.cdi.cases.multiBeansXml - ejb2 - ${project.version} - - - org.glassfish.tests.cdi.cases.multiBeansXml - multiBeansApp - ear - ${project.version} - - - org.glassfish.tests.cdi.cases.preDestroyScoping - preDestroyScoping - ear - ${project.version} - - - org.glassfish.tests.cdi.cases.preDestroyScoping - lib - ${project.version} - - - org.testng - testng - 6.5.2 - test - - - org.glassfish.main.tests - utils-ng - ${project.version} - test - - - org.glassfish.main.appclient - gf-client - ${project.version} - - - diff --git a/appserver/tests/cdi/cases/runner/src/main/java/com/oracle/cdi/devtests/runner/main/Main.java b/appserver/tests/cdi/cases/runner/src/main/java/com/oracle/cdi/devtests/runner/main/Main.java deleted file mode 100644 index cdec7b0a4aa..00000000000 --- a/appserver/tests/cdi/cases/runner/src/main/java/com/oracle/cdi/devtests/runner/main/Main.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.devtests.runner.main; - -/** - * - * @author jwells - * - */ -public class Main { -} diff --git a/appserver/tests/cdi/cases/runner/src/test/java/com/oracle/cdi/devtests/cases/runner/CasesTest.java b/appserver/tests/cdi/cases/runner/src/test/java/com/oracle/cdi/devtests/cases/runner/CasesTest.java deleted file mode 100644 index ea116387af2..00000000000 --- a/appserver/tests/cdi/cases/runner/src/test/java/com/oracle/cdi/devtests/cases/runner/CasesTest.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.devtests.cases.runner; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.StringTokenizer; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.glassfish.tests.utils.NucleusStartStopTest; -import org.glassfish.tests.utils.NucleusTestUtils; -import org.testng.Assert; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import com.oracle.cdi.cases.devtests.multiejb1.MultiBeansXmlEjb1; -import com.oracle.cdi.cases.devtests.multiejb2.MultiBeansXmlEjb2; -import com.oracle.cdi.cases.devtests.predestroy.lib.PreDestroyConstants; - -/** - * - * @author jwells - */ -public class CasesTest extends NucleusStartStopTest { - private final static String SOURCE_HOME = System.getProperty("source.home", "$"); - private final static String SOURCE_HOME_CDI = "/appserver/tests/cdi/"; - - private Context context; - - @BeforeTest - public void beforeTest() throws NamingException { - context = new InitialContext(); - } - - private static String getDeployablePath(String endPath) { - if (!SOURCE_HOME.startsWith("$")) { - return SOURCE_HOME + SOURCE_HOME_CDI + endPath; - } - - return endPath; - } - - private static void deploy(String deployPath) { - String dp = getDeployablePath(deployPath); - - boolean success = NucleusTestUtils.nadmin("deploy", dp); - Assert.assertTrue(success); - } - - private static void undeploy(String appName) { - boolean success = NucleusTestUtils.nadmin("undeploy", appName); - Assert.assertTrue(success); - } - - private final static String MULTI_BEANS_XML_JAR = "cases/multiBeansXml/multiBeansApp/target/multiBeansApp.ear"; - private final static String MULTI_BEANS_XML_APP = "multiBeansApp"; - private final static String MULTI_BEANS_EJB1_JNDI = "java:global/multiBeansApp/ejb1/InterceptedEjb1!com.oracle.cdi.cases.devtests.multiejb1.MultiBeansXmlEjb1"; - private final static String MULTI_BEANS_EJB2_JNDI = "java:global/multiBeansApp/ejb2/InterceptedEjb2!com.oracle.cdi.cases.devtests.multiejb2.MultiBeansXmlEjb2"; - - @Test - public void testMultiBeansXml() throws NamingException { - deploy(MULTI_BEANS_XML_JAR); - try { - { - MultiBeansXmlEjb1 ejb1 = (MultiBeansXmlEjb1) context.lookup(MULTI_BEANS_EJB1_JNDI); - Assert.assertNotNull(ejb1); - - List ejb1List = ejb1.callMe(new LinkedList()); - Assert.assertNotNull(ejb1List); - - Assert.assertEquals(2, ejb1List.size()); - - String interceptor1 = ejb1List.get(0); - String callMe1 = ejb1List.get(1); - - Assert.assertEquals(MultiBeansXmlEjb1.INTERCEPTOR1, interceptor1); - Assert.assertEquals(MultiBeansXmlEjb1.CALL_ME1, callMe1); - } - - { - MultiBeansXmlEjb2 ejb2 = (MultiBeansXmlEjb2) context.lookup(MULTI_BEANS_EJB2_JNDI); - Assert.assertNotNull(ejb2); - - List ejb2List = ejb2.callMe(new LinkedList()); - Assert.assertNotNull(ejb2List); - - Assert.assertEquals(2, ejb2List.size()); - - String interceptor2 = ejb2List.get(0); - String callMe2 = ejb2List.get(1); - - Assert.assertEquals(MultiBeansXmlEjb2.INTERCEPTOR2, interceptor2); - Assert.assertEquals(MultiBeansXmlEjb2.CALL_ME2, callMe2); - } - - } - finally { - undeploy(MULTI_BEANS_XML_APP); - } - - } - - private final static String PRE_DESTROY_SCOPING_JAR = "cases/preDestroyScoping/ear/target/preDestroyScoping.ear"; - private final static String PRE_DESTROY_SCOPING_APP = "preDestroyScoping"; - private final static String BEAN_URL = "http://localhost:8080/web/bean"; - private final static String LOGOUT_BASE_URL = "http://localhost:8080/web/logout;jsessionid="; - private final static String EVENTS_URL = "http://localhost:8080/web/events"; - - private static List getLines(String lines) { - StringTokenizer st = new StringTokenizer(lines, "\n"); - - List retVal = new ArrayList(); - - while (st.hasMoreTokens()) { - retVal.add(st.nextToken()); - } - - return retVal; - } - - /** - * This test case is from https://java.net/jira/browse/GLASSFISH-18435 - */ - @Test - public void testPreDestroyScoping() { - deploy(PRE_DESTROY_SCOPING_JAR); - try { - String lines = NucleusTestUtils.getURL(BEAN_URL); - - List asArray = getLines(lines); - Assert.assertEquals(asArray.size(), 2, "Did not get the proper number of strings from getURL return of " + lines); - - String uuid = asArray.get(1); - - NucleusTestUtils.getURL(LOGOUT_BASE_URL + uuid); - - lines = NucleusTestUtils.getURL(EVENTS_URL); - - List results = getLines(lines); - - Assert.assertEquals(results.size(), 3); - - Assert.assertEquals(results.get(0), PreDestroyConstants.CREATED + asArray.get(0)); - Assert.assertEquals(results.get(1), PreDestroyConstants.PRODUCER_PRE_DESTROY_IN); - Assert.assertEquals(results.get(2), PreDestroyConstants.EXPECTED_EXCEPTION); - } - finally { - undeploy(PRE_DESTROY_SCOPING_APP); - } - - } -} diff --git a/appserver/tests/cdi/negative/normalScopeWithFinal/pom.xml b/appserver/tests/cdi/negative/normalScopeWithFinal/pom.xml deleted file mode 100755 index aedab6f5031..00000000000 --- a/appserver/tests/cdi/negative/normalScopeWithFinal/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.cdi - negative - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.cdi.negative - normalScopeWithFinal - 4.1-SNAPSHOT - - GlassFish Normal Scoped Bean With Final Methods - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - - - - - javax.enterprise - cdi-api - 1.1-PRD - provided - - - jakarta.ejb - jakarta.ejb-api - provided - - - diff --git a/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/IExtendAClassWithFinalMethods.java b/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/IExtendAClassWithFinalMethods.java deleted file mode 100644 index 5f2e87de6f7..00000000000 --- a/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/IExtendAClassWithFinalMethods.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.devtest.negative.normalScoped; - -import javax.enterprise.context.ApplicationScoped; - -/** - * This class extends a class with final methods, but does not have any final - * methods itself. However, it still cannot be proxied because of the final. - * - * This should cause a deployment failure - * methods in the superclass - * - * @author jwells - * - */ -@ApplicationScoped -public class IExtendAClassWithFinalMethods extends IHaveFinalMethods { -} diff --git a/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/IHaveFinalMethods.java b/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/IHaveFinalMethods.java deleted file mode 100644 index 6d7333c4c1d..00000000000 --- a/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/IHaveFinalMethods.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.devtest.negative.normalScoped; - -/** - * This class has final methods, and hence cannot - * be proxied - * - * @author jwells - * - */ -public class IHaveFinalMethods { - - - public final void iAmAFinalMethod() { - } - -} diff --git a/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/StatelessEjbWithInjectionPoint.java b/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/StatelessEjbWithInjectionPoint.java deleted file mode 100644 index 6394549ad7c..00000000000 --- a/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/java/com/oracle/cdi/devtest/negative/normalScoped/StatelessEjbWithInjectionPoint.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.devtest.negative.normalScoped; - -import javax.annotation.PostConstruct; -import javax.ejb.Stateless; -import javax.inject.Inject; - -/** - * This is a statless EJB that is injected with a service - * that has final methods in its superclass - * - * @author jwells - * - */ -@Stateless -public class StatelessEjbWithInjectionPoint { - @Inject - private IExtendAClassWithFinalMethods extender; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - extender.iAmAFinalMethod(); - } - -} diff --git a/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/resources/META-INF/beans.xml b/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 094e6e8ebe9..00000000000 --- a/appserver/tests/cdi/negative/normalScopeWithFinal/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/appserver/tests/cdi/negative/pom.xml b/appserver/tests/cdi/negative/pom.xml deleted file mode 100755 index 3fe916996ce..00000000000 --- a/appserver/tests/cdi/negative/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests - cdi - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.cdi - negative - pom - 4.1-SNAPSHOT - - GlassFish CDI Negative Tests - - normalScopeWithFinal - runner - - diff --git a/appserver/tests/cdi/negative/runner/pom.xml b/appserver/tests/cdi/negative/runner/pom.xml deleted file mode 100644 index 50880356d5e..00000000000 --- a/appserver/tests/cdi/negative/runner/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.cdi - negative - 4.1-SNAPSHOT - - - org.glassfish.tests.cdi.negative - runner - - CDI Negative Tests Runner - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${glassfish.home} - ${source.home} - - - - - - - - - org.glassfish.tests.cdi.negative - normalScopeWithFinal - ${project.version} - - - org.testng - testng - 6.5.2 - test - - - org.glassfish.main.tests - utils-ng - ${project.version} - test - - - org.glassfish.main.appclient - gf-client - ${project.version} - - - diff --git a/appserver/tests/cdi/negative/runner/src/main/java/com/oracle/cdi/devtest/runner/Main.java b/appserver/tests/cdi/negative/runner/src/main/java/com/oracle/cdi/devtest/runner/Main.java deleted file mode 100644 index c1bbc586a0c..00000000000 --- a/appserver/tests/cdi/negative/runner/src/main/java/com/oracle/cdi/devtest/runner/Main.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.devtest.runner; - -public class Main { -} diff --git a/appserver/tests/cdi/negative/runner/src/test/java/com/oracle/cdi/devtest/runner/test/NegativeTest.java b/appserver/tests/cdi/negative/runner/src/test/java/com/oracle/cdi/devtest/runner/test/NegativeTest.java deleted file mode 100644 index 29dcc5bcf91..00000000000 --- a/appserver/tests/cdi/negative/runner/src/test/java/com/oracle/cdi/devtest/runner/test/NegativeTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.cdi.devtest.runner.test; - -import org.glassfish.tests.utils.NucleusStartStopTest; -import org.glassfish.tests.utils.NucleusTestUtils; -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * This tests failure cases - * - * @author jwells - * - */ -public class NegativeTest extends NucleusStartStopTest { - private final static String NORMAL_WITH_FINALS_JAR = "negative/normalScopeWithFinal/target/normalScopeWithFinal.jar"; - private final static String SOURCE_HOME = System.getProperty("source.home", "$"); - private final static String SOURCE_HOME_CDI = "/appserver/tests/cdi/"; - - private static String getDeployablePath(String endPath) { - if (!SOURCE_HOME.startsWith("$")) { - return SOURCE_HOME + SOURCE_HOME_CDI + endPath; - } - - return endPath; - } - - /** - * This test currently fails due to a possible bug in Weld - */ - @Test - public void testNormalScopeWithFinalsDoesNotDeploy() { - String deployPath = getDeployablePath(NORMAL_WITH_FINALS_JAR); - - boolean success = NucleusTestUtils.nadmin("deploy", deployPath); - - // Should have failed - Assert.assertFalse(success); - } -} diff --git a/appserver/tests/cdi/pom.xml b/appserver/tests/cdi/pom.xml deleted file mode 100755 index e34600a8bb5..00000000000 --- a/appserver/tests/cdi/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.main.tests - tests - 4.1-SNAPSHOT - - - org.glassfish.tests - cdi - pom - - GlassFish CDI Tests - - negative - cases - - diff --git a/appserver/tests/community/QuickLook_Test_Instructions.html b/appserver/tests/community/QuickLook_Test_Instructions.html deleted file mode 100644 index feef80e3f2d..00000000000 --- a/appserver/tests/community/QuickLook_Test_Instructions.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - -

    Instructions -for running QuickLook test on GlassFish V3

    -


    -

    -

    Complete -paths are required for some of the properties as each testsuite can -be imported as an independent Netbeans project. -

    -

    There -is no need to setup an environment variable.

    -


    -

    -

    Setting -Up.

    -

    JDK -5.0 or above is required.

    -


    -

    -
      -
    • Unzip - in working directory <ws_root>

      -
    • Edit - <ws_root>/build.properties and mention deploy.platform=”v3” - and -

      -
        -
      • deploy.platform=v3

        -
      • glassfish.http.host=localhost

        -
      • glassfish.http.port=8080

        -
      -
    • Since - this is a v3 build, v3-config.properties file needs to be further - edited.

      -
        -
      • glassfish.home=complete - path

        -
      -
    -


    -

    -

    Starting -GlassFish and Derby

    -


    -

    -
      -
    • <ws_root>/ant - -f run.xml startDerby. (This should start derby in spawn mode).For - port information, <ws_root>/gfproject/derby.properties.Default - port is -

      -
    • If - you want to start in non-spawn mode, then please edit file - <ws_root>/gfproject/db-targets.xml and in startDerby and - stopDerby targets remove “spawn=true”

      -
    • To - start glassfish v3, go to ${glassfish.home}/bin/asadmin - start-domain. (usual instructions)

      -
    -


    -

    -

    Run -and Reporting Tests

    -
      -
    • <ws_root>/ant - build deploy runtest report | tee run.log

      -
    -


    -

    -

    Test -Report should be available at <ws_root>/test-output/index.html

    -


    -

    -

    If -tests are imported inside Netbeans for editing, please make sure that -Netbeans ANT version is 1.7 or higher.

    -


    -

    -

    Instructions -for running test on GlassFish V2

    -


    -

    -

    Complete -paths are required for some of the properties as each testsuite can -be imported as an independent Netbeans project. -

    -

    There -is no need to setup an environment variable.

    -


    -

    -

    Setting -Up.

    -

    JDK -5.0 or above is required

    -


    -

    -
      -
    • Unzip - in working directory <ws_root>

      -
    • Edit - <ws_root>/build.properties and mention deploy.platform=”v2” - and -

      -
        -
      • deploy.platform=v2

        -
      • glassfish.http.host=localhost

        -
      • glassfish.http.port=8080

        -
      -
    • Since - this is a v2 build, v2-config.properties file needs to be further - edited.

      -
        -
      • Glassfish.home=complete - path

        -
      • admin.password.file=complete - path for <ws_root>/gfproject/admin.password.file

        -
      -
    -


    -

    -

    Starting -GlassFish and Derby

    -


    -

    -
      -
    • <ws_root>/ant - -f run.xml startDerby. (This should start derby in spawn mode).For - port information, <ws_root>/gfproject/derby.properties.

      -
    • If - you want to start in non-spawn mode, then please edit file - <ws_root>/gfproject/db-targets.xml and in startDerby and - stopDerby targets remove “spawn=true”

      -
    • To - start glassfish v2, go to ${glassfish.home}/bin/asadmin - start-domain. (usual instructions

      -
    -


    -

    -

    Run -and Reporting Tests

    -
      -
    • <ws_root>/ant - build deploy runtest report | tee run.log

      -
    -


    -

    -

    Test -Report should be available at -

    -
      -
    • <ws_root>/test-output/index.html

      -
    -


    -

    -


    -

    - - diff --git a/appserver/tests/community/adminweb/basic/build.properties b/appserver/tests/community/adminweb/basic/build.properties deleted file mode 100644 index ef272c78b0e..00000000000 --- a/appserver/tests/community/adminweb/basic/build.properties +++ /dev/null @@ -1,51 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -admin.domain=domain1 -install.dir=c:/sun/glassfish -domains.dir=c:/sun/glassfish/domains -admin.domain.dir=${env.S1AS_HOME}/domains -admin.port=4848 -admin.user=admin -admin.host=localhost -admin.password=adminadmin -ssl.password=administrator -ee=false -cert.nickname=s1as diff --git a/appserver/tests/community/adminweb/basic/build.xml b/appserver/tests/community/adminweb/basic/build.xml deleted file mode 100644 index 27b3955fa8c..00000000000 --- a/appserver/tests/community/adminweb/basic/build.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - Builds, tests, and runs the GlassFish Admin GUI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/adminweb/basic/src/test/SeleniumTest.java b/appserver/tests/community/adminweb/basic/src/test/SeleniumTest.java deleted file mode 100644 index 1e6cd51d1f3..00000000000 --- a/appserver/tests/community/adminweb/basic/src/test/SeleniumTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -import com.thoughtworks.selenium.*; -import java.util.regex.Pattern; -import org.testng.annotations.*; -import org.testng.Assert; -import org.openqa.selenium.server.SeleniumServer; - -public class SeleniumTest { - - private DefaultSelenium selenium; - - //@Parameters({"selen-svr-addr","brwsr-path","aut-addr"}) - @BeforeClass - private void init() throws Exception { - System.out.println("Starting Selenium Launcher--->"); - selenium = new DefaultSelenium("localhost", - SeleniumServer.getDefaultPort(), "*iexplore", "http://localhost:4848"); - - - - /* selenium = new DefaultSelenium(selenSrvrAddr, - SeleniumServer.getDefaultPort(), bpath, appPath);*/ - - - /*selClient = new DefaultSelenium("localhost", 4444, - "*firefox", "http://localhost:" + PORT);*/ - - selenium.start(); - } - - @Test - public void test1(){ - Assert.assertTrue(true,"Pass"); - } - - @Test - @Parameters({"aut-addr"}) - public void testLoginScreen() throws Exception { - try{ - System.out.println("Running testSelenium--->"); - selenium.open("http://localhost:4848"); - selenium.open("/"); - /*selenium.type("sf", "glassfish"); - selenium.click("btnG"); - selenium.waitForPageToLoad("30000"); - selenium.click("//a/b[2]");*/ - selenium.waitForPageToLoad("30000"); - //verifyTrue(selenium.isTextPresent("JRuby")); - //verifyEquals("glassfish: GlassFish Community", selenium.getTitle()); - - - //Assert.assertEquals("", selenium.getText("//img[@alt='GlassFish V2']")); - - selenium.open("/login.jsf"); - selenium.waitForPageToLoad("30000"); - //selenium.type("Login.username", "admin"); - selenium.type("j_username", "admin"); - //selenium.waitForPageToLoad("30000"); - //selenium.type("Login.password", "adminadmin"); - selenium.type("j_password", "adminadmin"); - //selenium.waitForPageToLoad("3000"); - selenium.click("loginButton"); - //selenium.waitForPageToLoad("30000"); - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - - } - - @AfterClass - private void stop() throws Exception { - selenium.stop(); - } - - -} diff --git a/appserver/tests/community/adminweb/basic/testng.xml b/appserver/tests/community/adminweb/basic/testng.xml deleted file mode 100644 index 12c48067e7f..00000000000 --- a/appserver/tests/community/adminweb/basic/testng.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/build.properties b/appserver/tests/community/build.properties deleted file mode 100644 index 1e946144deb..00000000000 --- a/appserver/tests/community/build.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -#Edit these values for specific glassfish instance -deploy.platform=v3 -glassfish.http.host=localhost -glassfish.http.port=8080 -glassfish.home=C:\\Sun\\v3\\glassfish -v3=true - -maven.repo.local=${user.home}/.m2/repository -plugin_classpath=${maven.repo.local}/org/testng/testng/5.6/testng-5.6-jdk15.jar - -#v3=true -## Absolutely required. Please provide glassfish.home value either UNIX or Windows - -## do not change this --end - -##For future use -#deploy.url=http://${deploy.server}:${deploy.port}/ -#http://${admin.host}:${admin.port}/__asadmin/deploy?path=;name= - diff --git a/appserver/tests/community/build.xml b/appserver/tests/community/build.xml deleted file mode 100644 index 86dbe7c0f68..00000000000 --- a/appserver/tests/community/build.xml +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - Builds, tests, and runs the project V3 Quicklook - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-----------------------------+ - | | - | S T A R T I N G GLASSFISH | - | | - +-----------------------------+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/ejb30/session/hello/build.properties b/appserver/tests/community/ejb30/session/hello/build.properties deleted file mode 100644 index 94f91a44053..00000000000 --- a/appserver/tests/community/ejb30/session/hello/build.properties +++ /dev/null @@ -1,57 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -#war.file=ejb30-session-hello.jar -ejbjar.file=ejb30-session-hello.jar -#specify only if running locally. -result.output=..\..\test-output\ - -#deploy.server=lucky -admin.port=4848 -admin.host=localhost -admin.password=adminadmin -admin.user=admin -passwordfile="c:/Sun/as8ee/bin/password.txt" -install.dir=c:/sun/glassfish -asinstall.dir=c:/sun/glassfish -asinstall.dir=c:/sun/glassfish -sun.appserver.antjar=c:/Sun/glassfish/lib/sun-appserv-ant.jar -#deploy.url=http://${deploy.server}:${deploy.port}/ -#http://${admin.host}:${admin.port}/__asadmin/deploy?path=;name= diff --git a/appserver/tests/community/ejb30/session/hello/build.xml b/appserver/tests/community/ejb30/session/hello/build.xml deleted file mode 100644 index 7a9a4159ed5..00000000000 --- a/appserver/tests/community/ejb30/session/hello/build.xml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - Builds, tests, and runs the project Hello JSP Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/ejb30/session/hello/metadata/sun-ejb-jar.xml b/appserver/tests/community/ejb30/session/hello/metadata/sun-ejb-jar.xml deleted file mode 100644 index aba48055812..00000000000 --- a/appserver/tests/community/ejb30/session/hello/metadata/sun-ejb-jar.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - SfulEJB - jndi_Sful - - - SlessEJB - jndi_Sless - - - diff --git a/appserver/tests/community/gfproject/.asadminpass b/appserver/tests/community/gfproject/.asadminpass deleted file mode 100644 index 20cc0b0313b..00000000000 --- a/appserver/tests/community/gfproject/.asadminpass +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Do not edit this file by hand. Use login interface instead. -asadmin://admin@localhost:4848 YWRtaW5hZG1pbg== diff --git a/appserver/tests/community/gfproject/adminpassword.txt b/appserver/tests/community/gfproject/adminpassword.txt deleted file mode 100644 index 08153e31e64..00000000000 --- a/appserver/tests/community/gfproject/adminpassword.txt +++ /dev/null @@ -1,2 +0,0 @@ -AS_ADMIN_PASSWORD=adminadmin - diff --git a/appserver/tests/community/gfproject/build-impl.xml b/appserver/tests/community/gfproject/build-impl.xml deleted file mode 100644 index 46979a9bcb3..00000000000 --- a/appserver/tests/community/gfproject/build-impl.xml +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/gfproject/db-targets.xml b/appserver/tests/community/gfproject/db-targets.xml deleted file mode 100644 index f60fdad3ddf..00000000000 --- a/appserver/tests/community/gfproject/db-targets.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - database=${db.type} - driver=${db.driver} - url=${db.url} - user=${db.user} - password=${db.password} - db.class.path=db.class.path - - - - - - - - - - driver=${db.driver} - url=${db.url} - user=${db.user} - password=${db.password} - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/gfproject/derby.properties b/appserver/tests/community/gfproject/derby.properties deleted file mode 100644 index ecdb9937ee9..00000000000 --- a/appserver/tests/community/gfproject/derby.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Database properties are in derby.properties -db.type=derby -db.user=app -db.password=app -db.port=1527 -db.driver=org.apache.derby.jdbc.ClientDriver -db.datasource=org.apache.derby.jdbc.ClientDataSource -db.delimiter=; -db.sid=sun-appserv-samples -db.url=jdbc:derby://localhost:${db.port}/${db.sid};create=true; -db.create.src=create_derby.sql -db.delete.src=drop_derby.sql -derby.system.home=${glassfish.home}/javadb -##Edit asadminpassword.txt file in same directory diff --git a/appserver/tests/community/gfproject/v2-config.properties b/appserver/tests/community/gfproject/v2-config.properties deleted file mode 100644 index 7ec940d8609..00000000000 --- a/appserver/tests/community/gfproject/v2-config.properties +++ /dev/null @@ -1,64 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -admin.port=4848 -admin.host=localhost -admin.password=adminadmin -admin.user=admin -##Please mention complete qualified path -glassfish.home=C:\\Sun\\v2\\glassfish -deploy.platform=v2 -glassfish.http.host=localhost -glassfish.http.port=8080 -glassfish.https.port=8080 -glassfish.https.port=8181 -admin.domain=domain1 -admin.domain.dir=${glassfish.home}/domains -orb.port=3700 -ssl.password=changeit -master.password=changeit -testsuite.name=GlassFish_Community_JavaEE5_Tests -## Please mention complete qualified path -admin.password.file=C:\\ws\\framework\\community\\gfproject\\adminpassword.txt -#admin.password.file=C:\\ws\\framework\\glassfish\\appserv-tests\\community\\gfproject\\.asadminpass - -db.type=derby -deploy.platform=v2 - diff --git a/appserver/tests/community/gfproject/v2-targets.xml b/appserver/tests/community/gfproject/v2-targets.xml deleted file mode 100644 index a3d42df507e..00000000000 --- a/appserver/tests/community/gfproject/v2-targets.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/gfproject/v3-config.properties b/appserver/tests/community/gfproject/v3-config.properties deleted file mode 100644 index 4c6efdd3690..00000000000 --- a/appserver/tests/community/gfproject/v3-config.properties +++ /dev/null @@ -1,57 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -admin.port=4848 -admin.host=localhost -admin.password=adminadmin -admin.user=admin -glassfish.home=C:\\Sun\\v3\\glassfish -deploy.platform=v3 -glassfish.http.host=localhost -glassfish.http.port=8080 -glassfish.https.port=8080 -glassfish.https.port=8181 -admin.domain=domain1 -admin.domain.dir=${glassfish.home}/domains -orb.port=3700 -ssl.password=changeit -db.type=derby -master.password=changeit -testsuite.name=GlassFish_Community_JavaEE5_Tests diff --git a/appserver/tests/community/gfproject/v3-targets.xml b/appserver/tests/community/gfproject/v3-targets.xml deleted file mode 100644 index c90100d0670..00000000000 --- a/appserver/tests/community/gfproject/v3-targets.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - +-----------------------------+ - | | - | S T A R T I N G GLASSFISH | - | | - +-----------------------------+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/jdbc/jdbcusertx/build.properties b/appserver/tests/community/jdbc/jdbcusertx/build.properties deleted file mode 100644 index fb6a4f5a05e..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/build.properties +++ /dev/null @@ -1,51 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -war.file=jdbcusertx -testsuite.name=jdbcusertx -testng.test.name=jdbcusertx -#possible choices war|ear|jar -contextroot=jdbcusertx -archive.type=war -ws.root=../../ - -#Definitely need to set this at local level -deploy.platform=v3 - diff --git a/appserver/tests/community/jdbc/jdbcusertx/build.xml b/appserver/tests/community/jdbc/jdbcusertx/build.xml deleted file mode 100644 index 36c5710d2cb..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/build.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - Builds, tests, and runs the project JdbcUserTx Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/jdbc/jdbcusertx/metadata/sun-web.xml b/appserver/tests/community/jdbc/jdbcusertx/metadata/sun-web.xml deleted file mode 100644 index 3cf28ede771..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/metadata/sun-web.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - jdbc/__default - jdbc/__default - - diff --git a/appserver/tests/community/jdbc/jdbcusertx/metadata/web.xml b/appserver/tests/community/jdbc/jdbcusertx/metadata/web.xml deleted file mode 100644 index 9baa6e3023c..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/metadata/web.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - MyServlet - myapp.MyServlet - - - MyServlet - /MyServlet - - - - 30 - - - - index.html - - - jdbc/__default - javax.sql.DataSource - Container - Shareable - - diff --git a/appserver/tests/community/jdbc/jdbcusertx/src/java/MyServlet.java b/appserver/tests/community/jdbc/jdbcusertx/src/java/MyServlet.java deleted file mode 100644 index bd3048e933c..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/src/java/MyServlet.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -package myapp; - -import java.io.*; -import java.lang.reflect.Constructor; -import java.net.*; - -import javax.servlet.*; -import javax.servlet.http.*; -import javax.sql.DataSource; -import java.util.Map; -import javax.annotation.Resource; -import myapp.test.SimpleTest; -import myapp.util.HtmlUtil; - -public class MyServlet extends HttpServlet { - - @Resource(name = "jdbc/__default", mappedName = "jdbc/__default") - DataSource ds1; - - /** - * Processes requests for both HTTP GET and POST methods. - * @param request servlet request - * @param response servlet response - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/html;charset=UTF-8"); - PrintWriter out = response.getWriter(); - Boolean pass = false; - SimpleTest[] tests = null; - StringBuilder buf = null; - Boolean notestcase = false; - String testcase = request.getParameter("testcase"); - System.out.println("testcase="+testcase); - if (testcase != null) { - - out.println(""); - out.println(""); - out.println("Servlet MyServlet"); - out.println(""); - out.println(""); - out.println("

    Servlet MyServlet at " + request.getContextPath() + "

    "); - - buf = new StringBuilder(); - - try { - if ("usertx".equals(testcase)) { - tests = initializeUserTxTest(); - } else if ("noleak".equals(testcase)) { - tests = initializeLeakTest(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - try { - buf.append("Test Name:Pass
    "); - for (SimpleTest test : tests) { - Map map = test.runTest(ds1, out); - for (Map.Entry entry : map.entrySet()) { - buf.append(entry.getKey()); - buf.append(":"); - buf.append(entry.getValue()); - buf.append("
    "); - } - } - out.println(buf.toString()); - } catch (Throwable e) { - out.println("got outer excpetion"); - out.println(e); - e.printStackTrace(); - } finally { - out.println(""); - out.println(""); - out.close(); - out.flush(); - } - } - } - - private SimpleTest[] initializeUserTxTest() throws Exception { - String[] tests = { - "myapp.test.UserTxTest" - }; - - SimpleTest[] testInstances = new SimpleTest[tests.length]; - for (int i = 0; i < tests.length; i++) { - Class testClass = Class.forName(tests[i]); - Constructor c = testClass.getConstructor(); - testInstances[i] = (SimpleTest) c.newInstance(); - } - return testInstances; - } - - private SimpleTest[] initializeLeakTest() throws Exception { - String[] tests = { - "myapp.test.LeakTest" - }; - - SimpleTest[] testInstances = new SimpleTest[tests.length]; - for (int i = 0; i < tests.length; i++) { - Class testClass = Class.forName(tests[i]); - Constructor c = testClass.getConstructor(); - testInstances[i] = (SimpleTest) c.newInstance(); - } - return testInstances; - } - - // - /** - * Handles the HTTP GET method. - * @param request servlet request - * @param response servlet response - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * @param request servlet request - * @param response servlet response - */ - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Returns a short description of the servlet. - */ - public String getServletInfo() { - return "Short description"; - } - // -} diff --git a/appserver/tests/community/jdbc/jdbcusertx/src/java/test/LeakTest.java b/appserver/tests/community/jdbc/jdbcusertx/src/java/test/LeakTest.java deleted file mode 100644 index 995feb587d4..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/src/java/test/LeakTest.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package myapp.test; - -import java.io.PrintWriter; -import java.sql.Connection; -import java.util.HashMap; -import java.util.Map; -import javax.sql.DataSource; -import myapp.util.HtmlUtil; - -/** - * - * @author jagadish - */ -public class LeakTest implements SimpleTest{ - - - Map resultsMap = new HashMap(); - - public Map runTest(DataSource ds1, PrintWriter out) { - try { - if (checkForNoLeak(ds1, out)) { - resultsMap.put("no-leak-test", true); - }else{ - resultsMap.put("no-leak-test", false); - } - } catch (Exception e) { - resultsMap.put("no-leak-test", false); - } - - return resultsMap; - - } - private boolean checkForNoLeak(DataSource ds1, PrintWriter out) { - int count = 32; - boolean result = false; - Connection[] connections = new Connection[count]; - - HtmlUtil.printHR(out); - out.println("

    no leak test

    "); - try { - for (int i = 0; i < count; i++) { - connections[i] = ds1.getConnection(); - } - out.println("able to retrieve all 32 connections
    "); - result = true; - } catch (Exception e) { - HtmlUtil.printException(e, out); - result = false; - } finally { - - try { - for (Connection con : connections) { - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - - } - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - HtmlUtil.printHR(out); - return result; - } - } -} diff --git a/appserver/tests/community/jdbc/jdbcusertx/src/java/test/SimpleTest.java b/appserver/tests/community/jdbc/jdbcusertx/src/java/test/SimpleTest.java deleted file mode 100644 index d27ccb79c8d..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/src/java/test/SimpleTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package myapp.test; - -import java.io.PrintWriter; -import java.util.Map; -import javax.sql.DataSource; - -/** - * - * @author jagadish - */ -public interface SimpleTest { - Map runTest(DataSource ds, PrintWriter out); -} diff --git a/appserver/tests/community/jdbc/jdbcusertx/src/java/test/UserTxTest.java b/appserver/tests/community/jdbc/jdbcusertx/src/java/test/UserTxTest.java deleted file mode 100644 index 054a2f0c6e5..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/src/java/test/UserTxTest.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package myapp.test; - -import java.io.PrintWriter; -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.Statement; -import java.util.HashMap; -import java.util.Map; -import javax.naming.InitialContext; -import javax.sql.DataSource; -import javax.transaction.SystemException; -import myapp.util.HtmlUtil; -import myapp.util.TablesUtil; - -/** - * - * @author jagadish - */ -public class UserTxTest implements SimpleTest { - - Map resultsMap = new HashMap(); - - public Map runTest(DataSource ds1, PrintWriter out) { - try { - if (testUserTxWithRollback(ds1, out)) { - resultsMap.put("user-tx-rollback", true); - }else{ - resultsMap.put("user-tx-rollback", false); - } - } catch (Exception e) { - resultsMap.put("user-tx-rollback", false); - } - - try { - if (testUserTxWithCommit(ds1, out)) { - resultsMap.put("user-tx-commit", true); - }else{ - resultsMap.put("user-tx-commit", false); - } - } catch (Exception e) { - resultsMap.put("user-tx-commit", false); - } - - return resultsMap; - - } - - private boolean testUserTxWithRollback(DataSource ds1, PrintWriter out) throws SystemException { - boolean result = false; - Connection con = null; - - Statement stmt = null; - ResultSet rs = null; - - String tableName = "user_tx_table_rollback_test"; - String content = "testUserTxWithRollback"; - String columnName = "message"; - TablesUtil.createTables(ds1, out, tableName, columnName); - - HtmlUtil.printHR(out); - out.println("

    user-tx-rollback test

    "); - javax.transaction.UserTransaction ut = null; - try { - InitialContext ic = new InitialContext(); - ut = (javax.transaction.UserTransaction) ic.lookup("java:comp/UserTransaction"); - out.println("
    Able to lookup UserTransaction"); - ut.begin(); - out.println("
    "); - out.println("Started UserTransaction
    "); - - out.println("Trying to get connection ...
    "); - - out.println("ds value : " + ds1); - con = ds1.getConnection(); - out.println("Got connection : " + con); - stmt = con.createStatement(); - stmt.executeUpdate("insert into " + tableName + " values ('" + content + "')"); - out.println("
    "); - - out.println("Able to lookup datasource"); - out.println("
    "); - out.println("Rolling back transaction
    "); - ut.rollback(); - if (!TablesUtil.verifyTableContent(ds1, out, tableName, columnName, content)) { - result = true; - } - - } catch (Throwable e) { - HtmlUtil.printException(e, out); - result = false; - } finally { - try { - if (rs != null) { - rs.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - TablesUtil.deleteTables(ds1, out, tableName); - HtmlUtil.printHR(out); - return result; - } - } - - private boolean testUserTxWithCommit(DataSource ds1, PrintWriter out) throws SystemException, - IllegalStateException, SecurityException { - boolean result = false; - Connection con = null; - - Statement stmt = null; - ResultSet rs = null; - - String tableName = "user_tx_table_commit_test"; - String content = "testUserTxWithCommit"; - String columnName = "message"; - TablesUtil.createTables(ds1, out, tableName, columnName); - - HtmlUtil.printHR(out); - out.println("

    user-tx-commit test

    "); - javax.transaction.UserTransaction ut = null; - try { - InitialContext ic = new InitialContext(); - ut = (javax.transaction.UserTransaction) ic.lookup("java:comp/UserTransaction"); - out.println("
    Able to lookup UserTransaction"); - ut.begin(); - out.println("
    "); - out.println("Started UserTransaction
    "); - - out.println("Trying to get connection ...
    "); - - out.println("ds value : " + ds1); - con = ds1.getConnection(); - out.println("Got connection : " + con); - stmt = con.createStatement(); - stmt.executeUpdate("insert into " + tableName + " values ('" + content + "')"); - out.println("
    "); - - out.println("Able to lookup datasource"); - out.println("
    "); - ut.commit(); - result = TablesUtil.verifyTableContent(ds1, out, tableName, columnName, content); - - } catch (Throwable e) { - HtmlUtil.printException(e, out); - out.println("Rolling back transaction
    "); - ut.rollback(); - result = false; - } finally { - try { - if (rs != null) { - rs.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - TablesUtil.deleteTables(ds1, out, tableName); - HtmlUtil.printHR(out); - return result; - } - } -} diff --git a/appserver/tests/community/jdbc/jdbcusertx/src/java/util/HtmlUtil.java b/appserver/tests/community/jdbc/jdbcusertx/src/java/util/HtmlUtil.java deleted file mode 100644 index f5e1a1b5cd9..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/src/java/util/HtmlUtil.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package myapp.util; - -import java.io.PrintWriter; - -/** - * - * @author jagadish - */ -public class HtmlUtil { - - public static void printException(Throwable e, PrintWriter out) { - StackTraceElement elements[] = e.getStackTrace(); - out.println("Following exception occurred :
    "); - out.println(e.getMessage() + "
    "); - for (StackTraceElement element : elements) { - out.println(element.toString() + "
    "); - } - } - public static void printHR(PrintWriter out){ - out.println("
    "); - } - -} diff --git a/appserver/tests/community/jdbc/jdbcusertx/src/java/util/TablesUtil.java b/appserver/tests/community/jdbc/jdbcusertx/src/java/util/TablesUtil.java deleted file mode 100644 index 27b0293f746..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/src/java/util/TablesUtil.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package myapp.util; - -import java.io.PrintWriter; -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.Statement; -import javax.sql.DataSource; - -/** - * - * @author jagadish - */ -public class TablesUtil { - - public static void createTables(DataSource ds1, PrintWriter out, String tableName, String columnName) { - Connection con = null; - Statement stmt = null; - try { - - con = ds1.getConnection(); - stmt = con.createStatement(); - String query = "create table " + tableName + "(" + columnName + " char(50))"; - stmt.executeUpdate(query); - } catch (Exception e) { - HtmlUtil.printException(e, out); - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - } - } - - public static void deleteTables(DataSource ds1, PrintWriter out, String tableName) { - Connection con = null; - Statement stmt = null; - try { - - con = ds1.getConnection(); - stmt = con.createStatement(); - stmt.executeUpdate("drop table " + tableName); - } catch (Exception e) { - HtmlUtil.printException(e, out); - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - } - } - - public static boolean verifyTableContent(DataSource ds1, PrintWriter out, String tableName, String columnName, String content) { - Connection con = null; - Statement stmt = null; - ResultSet rs = null; - boolean result = false; - try { - - con = ds1.getConnection(); - stmt = con.createStatement(); - rs = stmt.executeQuery("select count(*) ROW_COUNT from " + tableName + " where " + columnName + " = '" + content + "'"); - if (rs.next()) { - if (rs.getInt("ROW_COUNT") > 0) { - result = true; - } - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - HtmlUtil.printException(e, out); - } - return result; - } - } - - -} diff --git a/appserver/tests/community/jdbc/jdbcusertx/src/test/JdbcUserTxTestNG.java b/appserver/tests/community/jdbc/jdbcusertx/src/test/JdbcUserTxTestNG.java deleted file mode 100644 index 0040de8e18b..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/src/test/JdbcUserTxTestNG.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test.jdbc.jdbcusertx; -import org.testng.annotations.Configuration; -import org.testng.annotations.ExpectedExceptions; -import org.testng.annotations.Test; -import org.testng.annotations.*; -import org.testng.Assert; - -import java.io.*; -import java.net.*; -import java.util.*; - -/** - * Simple TestNG client for basic WAR containing one JSP,one Servlet and one static - *HTML resource.Each resources (HTML,JSP,Servlet) is invoked as a separate test. - * - */ -public class JdbcUserTxTestNG { - - private static final String TEST_NAME = - "jdbc-jdbcusertx"; - - private String strContextRoot="jdbcusertx"; - - static String result = ""; - String host=System.getProperty("http.host"); - String port=System.getProperty("http.port"); - - /* - *If two asserts are mentioned in one method, then last assert is taken in - *to account. - *Each method can act as one test within one test suite - */ - - - @Test(groups ={ "pulse"} ) // test method - public void testUserTx() throws Exception{ - - try{ - - String testurl = "http://" + host + ":" + port + "/"+ - strContextRoot + "/MyServlet?testcase=usertx"; - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - String EXPECTED_RESPONSE ="user-tx-commit:true"; - String EXPECTED_RESPONSE2 ="user-tx-rollback:true"; - while ((line = input.readLine()) != null) { - // echo(line); - if(line.indexOf(EXPECTED_RESPONSE)!=-1 && - line.indexOf(EXPECTED_RESPONSE2)!=-1){ - testLine = line; - echo(testLine); - result=true; - break; - } - } - - Assert.assertEquals(result, true,"Unexpected Results"); - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - @Test(groups ={ "pulse"} ) // test method - public void testNoLeak() throws Exception{ - - try{ - - String testurl = "http://" + host + ":" + port + "/"+ - strContextRoot + "/MyServlet?testcase=noleak"; - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - String EXPECTED_RESPONSE ="no-leak-test:true"; - while ((line = input.readLine()) != null) { - // echo(line); - if(line.indexOf(EXPECTED_RESPONSE)!=-1){ - testLine = line; - echo(testLine); - result=true; - break; - } - } - - Assert.assertEquals(result, true,"Unexpected Results"); - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - public static void echo(String msg) { - System.out.println(msg); - } - -} diff --git a/appserver/tests/community/jdbc/jdbcusertx/web/html/index.html b/appserver/tests/community/jdbc/jdbcusertx/web/html/index.html deleted file mode 100644 index e332bc77a0e..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/web/html/index.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - Welcome to Jdbc Tests - - -
    Go to Tests Tests - - diff --git a/appserver/tests/community/jdbc/jdbcusertx/web/jsp/index.jsp b/appserver/tests/community/jdbc/jdbcusertx/web/jsp/index.jsp deleted file mode 100644 index c376daf045e..00000000000 --- a/appserver/tests/community/jdbc/jdbcusertx/web/jsp/index.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - - - -

    Hello!

    -User Transaction Tests
    -No Leak Tests
    - - diff --git a/appserver/tests/community/persistence/servlet-jpa-app/build.properties b/appserver/tests/community/persistence/servlet-jpa-app/build.properties deleted file mode 100644 index 68acba9dee2..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/build.properties +++ /dev/null @@ -1,55 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -war.file=jpaservlet -testsuite.name=jpaweb -testng.test.name=jpa_servlet_finder -contextroot=persistence -#possible choices war|ear|jar -archive.type=war -#specify only if running locally.Path to ${workspace_root}/test-output -ws.root=../../ - - - -#Definitely need to set this at local level -deploy.platform=v3 -#deploy.url=http://${deploy.server}:${deploy.port}/ -#http://${admin.host}:${admin.port}/__asadmin/deploy?path=;name= diff --git a/appserver/tests/community/persistence/servlet-jpa-app/build.xml b/appserver/tests/community/persistence/servlet-jpa-app/build.xml deleted file mode 100644 index aafbb3b9790..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/build.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - Builds, tests, and runs the project Hello JSP Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/persistence/servlet-jpa-app/metadata/persistence.xml b/appserver/tests/community/persistence/servlet-jpa-app/metadata/persistence.xml deleted file mode 100644 index 083e1bcb828..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/metadata/persistence.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider - jdbc/__default - - diff --git a/appserver/tests/community/persistence/servlet-jpa-app/metadata/sun-web.xml b/appserver/tests/community/persistence/servlet-jpa-app/metadata/sun-web.xml deleted file mode 100644 index d4971d2d3b0..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/metadata/sun-web.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - /persistence - - - - Enable debug info compilation in the generated servlet class - - - Maintain a one-to-one correspondence between static content and the generated servlet class' java code - - - diff --git a/appserver/tests/community/persistence/servlet-jpa-app/metadata/web.xml b/appserver/tests/community/persistence/servlet-jpa-app/metadata/web.xml deleted file mode 100644 index beaaf09139d..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/metadata/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - CustomerDetails - web.CustomerDetails - - - CustomerDetails - /details - - - - 30 - - - - - index.jsp - - - diff --git a/appserver/tests/community/persistence/servlet-jpa-app/sql/create_derby.sql b/appserver/tests/community/persistence/servlet-jpa-app/sql/create_derby.sql deleted file mode 100644 index dfe69e0aa91..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/sql/create_derby.sql +++ /dev/null @@ -1,18 +0,0 @@ -CREATE TABLE CMP3_CUSTOMER(CUST_ID INTEGER PRIMARY KEY NOT NULL,CUST_VERSION INTEGER,CITY VARCHAR(255),NAME VARCHAR(255)); -CREATE TABLE CMP3_ITEM(ITEM_ID INTEGER PRIMARY KEY NOT NULL,ITEM_VERSION INTEGER, DESCRIPTION VARCHAR(255),NAME VARCHAR(255)); -CREATE TABLE CMP3_ORDER(ORDER_ID INTEGER PRIMARY KEY NOT NULL,ORDER_VERSION INTEGER,QTY INTEGER,SHIPADD VARCHAR(255),CUST_ID INTEGER,ITEM_ID INTEGER); - -ALTER TABLE CMP3_ORDER ADD CONSTRAINT FK_ORDER FOREIGN KEY (CUST_ID) REFERENCES CMP3_CUSTOMER (CUST_ID) ; -ALTER TABLE CMP3_ORDER ADD CONSTRAINT FK_ITEM FOREIGN KEY (ITEM_ID) REFERENCES CMP3_ITEM(ITEM_ID) ; - -CREATE TABLE WEB_CUSTOMER(CUST_ID INTEGER PRIMARY KEY NOT NULL,CITY VARCHAR(255),CUSTNAME VARCHAR(255)); - -INSERT INTO WEB_CUSTOMER (CUST_ID,CITY,CUSTNAME) VALUES (1,'Santa Clara', 'Alice_1'); -INSERT INTO WEB_CUSTOMER (CUST_ID,CITY,CUSTNAME) VALUES (2,'Cupertino', 'Alice_2'); -INSERT INTO WEB_CUSTOMER (CUST_ID,CITY,CUSTNAME) VALUES (3,'Mountain View', 'Alice_3'); -INSERT INTO WEB_CUSTOMER (CUST_ID,CITY,CUSTNAME) VALUES (4,'Fremont', 'Alice_4'); - -select city from web_customer where cust_id=1; -select * from web_customer where custname Like 'Alice_1'; - - diff --git a/appserver/tests/community/persistence/servlet-jpa-app/sql/drop_derby.sql b/appserver/tests/community/persistence/servlet-jpa-app/sql/drop_derby.sql deleted file mode 100644 index 82aebe27799..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/sql/drop_derby.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE CMP3_ORDER DROP CONSTRAINT FK_ORDER; -ALTER TABLE CMP3_ORDER DROP CONSTRAINT FK_ITEM; - -DROP TABLE CMP3_CUSTOMER; -DROP TABLE CMP3_ITEM; -DROP TABLE CMP3_ORDER; -DROP TABLE WEB_CUSTOMER; diff --git a/appserver/tests/community/persistence/servlet-jpa-app/src/java/persistence/WebCustomer.java b/appserver/tests/community/persistence/servlet-jpa-app/src/java/persistence/WebCustomer.java deleted file mode 100644 index 8697f84af20..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/src/java/persistence/WebCustomer.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * WebCustomer.java - * - * Created on March 17, 2008, 12:59 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package persistence; - -import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; - - -/** - * Entity class WebCustomer - * - * @author adminuser - */ -@Entity -@Table(name = "WEB_CUSTOMER") -@NamedQueries( { - @NamedQuery(name = "WebCustomer.findByCustId", query = "SELECT w FROM WebCustomer w WHERE w.custId = :custId"), - @NamedQuery(name = "WebCustomer.findByCity", query = "SELECT w FROM WebCustomer w WHERE w.city = :city"), - @NamedQuery(name = "WebCustomer.findByCustname", query = "SELECT w FROM WebCustomer w WHERE w.custname = :custname") - }) -public class WebCustomer implements Serializable { - - @Id - @Column(name = "CUST_ID", nullable = false) - private Integer custId; - - @Column(name = "CITY") - private String city; - - @Column(name = "CUSTNAME") - private String custname; - - /** Creates a new instance of WebCustomer */ - public WebCustomer() { - } - - /** - * Creates a new instance of WebCustomer with the specified values. - * @param custId the custId of the WebCustomer - */ - public WebCustomer(Integer custId) { - this.custId = custId; - } - - /** - * Gets the custId of this WebCustomer. - * @return the custId - */ - public Integer getCustId() { - return this.custId; - } - - /** - * Sets the custId of this WebCustomer to the specified value. - * @param custId the new custId - */ - public void setCustId(Integer custId) { - this.custId = custId; - } - - /** - * Gets the city of this WebCustomer. - * @return the city - */ - public String getCity() { - return this.city; - } - - /** - * Sets the city of this WebCustomer to the specified value. - * @param city the new city - */ - public void setCity(String city) { - this.city = city; - } - - /** - * Gets the custname of this WebCustomer. - * @return the custname - */ - public String getCustname() { - return this.custname; - } - - /** - * Sets the custname of this WebCustomer to the specified value. - * @param custname the new custname - */ - public void setCustname(String custname) { - this.custname = custname; - } - - /** - * Returns a hash code value for the object. This implementation computes - * a hash code value based on the id fields in this object. - * @return a hash code value for this object. - */ - @Override - public int hashCode() { - int hash = 0; - hash += (this.custId != null ? this.custId.hashCode() : 0); - return hash; - } - - /** - * Determines whether another object is equal to this WebCustomer. The result is - * true if and only if the argument is not null and is a WebCustomer object that - * has the same id field values as this object. - * @param object the reference object with which to compare - * @return true if this object is the same as the argument; - * false otherwise. - */ - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof WebCustomer)) { - return false; - } - WebCustomer other = (WebCustomer)object; - if (this.custId != other.custId && (this.custId == null || !this.custId.equals(other.custId))) return false; - return true; - } - - /** - * Returns a string representation of the object. This implementation constructs - * that representation based on the id fields. - * @return a string representation of the object. - */ - @Override - public String toString() { - return "persistence.WebCustomer[custId=" + custId + "]"; - } - -} diff --git a/appserver/tests/community/persistence/servlet-jpa-app/src/java/web/CustomerDetails.java b/appserver/tests/community/persistence/servlet-jpa-app/src/java/web/CustomerDetails.java deleted file mode 100644 index eb20c0958d4..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/src/java/web/CustomerDetails.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * CustomerDetails.java - * - * Created on March 17, 2008, 1:00 AM - */ - -package web; - -import java.io.*; -import java.net.*; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.annotation.Resource; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -import javax.servlet.*; -import javax.servlet.http.*; -import javax.transaction.UserTransaction; -import persistence.*; - -/** - * - * @author adminuser - * @version - */ -@PersistenceContext(name = "persistence/LogicalName", unitName = "webappPU") -public class CustomerDetails extends HttpServlet { - - @Resource - private UserTransaction utx; - - /** Processes requests for both HTTP GET and POST methods. - * @param request servlet request - * @param response servlet response - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/html;charset=UTF-8"); - PrintWriter out = response.getWriter(); - // TODO output your page here - out.println(""); - out.println(""); - out.println("Servlet CustomerDetails"); - out.println(""); - out.println(""); - out.println("

    Servlet CustomerDetails at " + request.getContextPath () + "

    "); - - out.println("

    Search Customer Information

    "); - out.println("

    Pl. select from 1,2,3,4,5 as a customer number

    "); - String customerNr = request.getParameter("customer_nr"); - if((customerNr != null) && !(customerNr.equals(""))) { - - WebCustomer customer = findByID(new Integer(customerNr)); - if(customer != null){ - out.println("Customer's info for nr. " + customerNr + ": " + customer.getCustname()); - }else{ - out.println("Customer not found."); - } - } - out.println("
    "); - out.println("Customer number: "); - out.println(""); - out.println("
    "); - - - out.println(""); - out.println(""); - - out.close(); - } - - // - /** Handles the HTTP GET method. - * @param request servlet request - * @param response servlet response - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** Handles the HTTP POST method. - * @param request servlet request - * @param response servlet response - */ - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** Returns a short description of the servlet. - */ - public String getServletInfo() { - return "Short description"; - } - // - - protected WebCustomer findByID(Integer customerNr) { - WebCustomer customer=null; - try { - Context ctx = (Context) new InitialContext().lookup("java:comp/env"); - utx.begin(); - EntityManager em = (EntityManager) ctx.lookup("persistence/LogicalName"); - customer = em.find(WebCustomer.class, customerNr); - utx.commit(); - - - // TODO: - // em.persist(object); utx.commit(); - } catch(Exception e) { - Logger.getLogger(getClass().getName()).log(Level.SEVERE,"exception caught", e); - throw new RuntimeException(e); - } - - return customer; - } - - -} diff --git a/appserver/tests/community/persistence/servlet-jpa-app/src/test/PersistenceTestNG.java b/appserver/tests/community/persistence/servlet-jpa-app/src/test/PersistenceTestNG.java deleted file mode 100644 index 594a67aeab1..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/src/test/PersistenceTestNG.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * PersistenceTestNG.java - * - * Created on March 18, 2008, 8:36 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package test; - -import org.testng.annotations.Configuration; -import org.testng.annotations.ExpectedExceptions; -import org.testng.annotations.Test; -import org.testng.annotations.*; -import org.testng.Assert; - -import org.apache.commons.httpclient.*; -import org.apache.commons.httpclient.methods.*; -import org.apache.commons.httpclient.params.*; -import org.apache.commons.httpclient.cookie.*; - -import java.io.*; -import java.net.*; -import java.util.*; - - -public class PersistenceTestNG { - - private String strContextRoot="persistence"; - - static String result = ""; - String m_host=System.getProperty("http.host"); - String m_port=System.getProperty("http.port"); - HttpClient httpclient = new HttpClient(); - - - //@Parameters({"host","port"}) - @BeforeMethod - public void beforeTest(){ - m_host=System.getProperty("http.host"); - m_port=System.getProperty("http.port"); - - } - - @Test(groups={"pulse"}) - public void testIndexPage() throws Exception{ - GetMethod method=null; - System.out.println("Testing Index Page.."); - String comparedString="Hello-Java Persistence API Finder Test"; - try{ - System.out.println("Running method testRequestResponse"); - String testurl = "http://" + m_host + ":" + m_port + - "/"+ strContextRoot + "/index.jsp"; - - System.out.println("running URL-->"+testurl); - - - method = new GetMethod(testurl); - - - int statusCode = httpclient.executeMethod(method); - if (statusCode != HttpStatus.SC_OK) { - System.err.println("Method failed: " + method.getStatusLine()); - } else - System.out.println("print status ok "+statusCode); - - // Read the response body. - byte[] responseBody = method.getResponseBody(); - String responseHTML=new String(responseBody); - System.out.println(responseHTML); - - boolean result=false; - - if(responseHTML.indexOf(comparedString)!=-1){ - result=true; - } - - System.out.println("testIndexPage result :"+result); - Assert.assertEquals(result,true); - - }catch (HttpException e) { - System.err.println("Fatal protocol violation: " + e.getMessage()); - e.printStackTrace(); - } catch (IOException e) { - System.err.println("Fatal transport error: " + e.getMessage()); - e.printStackTrace(); - } - finally { - // Release the connection. - method.releaseConnection(); - } - } - - @Test(groups={"pulse"}) - public void testServletFormMethod() throws Exception{ - - GetMethod method=null; - System.out.println("Testing Customer Details Page.."); - String comparedString="Search Customer Information"; - try{ - - String testurl = "http://" + m_host + ":" + m_port + - "/"+ strContextRoot + "/details"; - - System.out.println("URL is:"+testurl); - method = new GetMethod(testurl); - - - int statusCode = httpclient.executeMethod(method); - if (statusCode != HttpStatus.SC_OK) { - System.err.println("Method failed: " + method.getStatusLine()); - } else - System.out.println("print status ok "+statusCode); - - byte[] responseBody = method.getResponseBody(); - String responseHTML=new String(responseBody); - //System.out.println(responseHTML); - - boolean result=false; - - if(responseHTML.indexOf(comparedString)!=-1){ - result=true; - System.out.println(result); - } - System.out.println("testServletForm result :"+result); - Assert.assertEquals(result,true); - }catch (HttpException e) { - System.err.println("Fatal protocol violation: " + e.getMessage()); - e.printStackTrace(); - } catch (IOException e) { - System.err.println("Fatal transport error: " + e.getMessage()); - e.printStackTrace(); - } - finally { - // Release the connection. - method.releaseConnection(); - } - } - - @Test(groups={"pulse"}) - public void testFinderMethod() throws Exception{ - - GetMethod method=null; - String comparedString="Alice_1"; - System.out.println("Testing Finder JPA method.."); - try{ - - String testurl = "http://" + m_host + ":" + m_port + - "/"+ strContextRoot + "/details?customer_nr=1"; - System.out.println("finding details of customer 1.."); - System.out.println("URL is:"+testurl); - System.out.println("Response should be Alice_1"); - - method = new GetMethod(testurl); - - - int statusCode = httpclient.executeMethod(method); - if (statusCode != HttpStatus.SC_OK) { - System.err.println("Method failed: " + method.getStatusLine()); - } else - System.out.println("print status ok "+statusCode); - - byte[] responseBody = method.getResponseBody(); - String responseHTML=new String(responseBody); - System.out.println(responseHTML); - - boolean result=false; - - if(responseHTML.indexOf(comparedString)!=-1){ - result=true; - System.out.println(result); - } - System.out.println("testFinderMethod result :"+result); - Assert.assertEquals(result,true); - - }catch (HttpException e) { - System.err.println("Fatal protocol violation: " + e.getMessage()); - e.printStackTrace(); - } catch (IOException e) { - System.err.println("Fatal transport error: " + e.getMessage()); - e.printStackTrace(); - } - finally { - // Release the connection. - method.releaseConnection(); - } - } -} - - /* String name="testuser"; - String birthday="121212"; - System.out.println("URL is: "+testurl); - GetMethod httpget=null; - PostMethod post=null; - httpget = new GetMethod(testurl); - post=new PostMethod("http://localhost:8080/jsfastrologer/faces/greetings.jsp"); - - - NameValuePair[] mydata = { - // new NameValuePair("loginID", itUser), - // new NameValuePair("password", itPwd), Not working for editing of bug - - new NameValuePair("name",name), - new NameValuePair("birthday",birthday) - }; - - post.setRequestBody(mydata); - int statusCode = httpclient.executeMethod(post); - System.out.println("print status ok "+statusCode); - Assert.assertEquals(statusCode, 200); - - if (statusCode != HttpStatus.SC_OK) { - System.err.println("Method failed: " + post.getStatusLine()); - } - post.getStatusLine(); - - String response=post.getResponseBodyAsString(); - System.out.println(response); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - -} - - - -}*/ diff --git a/appserver/tests/community/persistence/servlet-jpa-app/web/html/first.html b/appserver/tests/community/persistence/servlet-jpa-app/web/html/first.html deleted file mode 100644 index 5ed01b59202..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/web/html/first.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - Welcome to HTML Test Program. This tests following thing -
      -
    1. TestNG
    2. -
    3. build.xml
    4. -
    5. V2 & V3
    6. -
    7. New Framework
    8. -
    - - - diff --git a/appserver/tests/community/persistence/servlet-jpa-app/web/jsp/index.jsp b/appserver/tests/community/persistence/servlet-jpa-app/web/jsp/index.jsp deleted file mode 100644 index ff687efb07a..00000000000 --- a/appserver/tests/community/persistence/servlet-jpa-app/web/jsp/index.jsp +++ /dev/null @@ -1,79 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<%-- -The taglib directive below imports the JSTL library. If you uncomment it, -you must also add the JSTL library to the project. The Add Library... action -on Libraries node in Projects view can be used to add the JSTL 1.1 library. ---%> -<%-- -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ---%> - - - - - - - JPA Servlet Test - - - -

    Hello-Java Persistence API Finder Test

    - - - <%-- - This example uses JSTL, uncomment the taglib directive above. - To test, display the page like this: index.jsp?sayHello=true&name=Murphy - --%> - <%-- - - - Hello ${param.name}! - - --%> - - - diff --git a/appserver/tests/community/pom.xml b/appserver/tests/community/pom.xml deleted file mode 100644 index 34068defde4..00000000000 --- a/appserver/tests/community/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish - pom - 2 - - org.glassfish.quicklook - quicklook - Glassfish Quicklook Bundle - 4.1-SNAPSHOT - This pom describes how to run QuickLook tests on the Glassfish Bundle - - - - - org.jvnet.maven-antrun-extended-plugin - maven-antrun-extended-plugin - - - test - - - - - - - - - - - - - - run - - - - - - commons-codec - commons-codec - 1.3 - - - commons-httpclient - commons-httpclient - 3.0.1 - - - org.testng - testng - 5.6 - jdk15 - - - - - - - - diff --git a/appserver/tests/community/run.xml b/appserver/tests/community/run.xml deleted file mode 100644 index 1adbaf7cfd3..00000000000 --- a/appserver/tests/community/run.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - Builds, tests, and runs the project Hello JSP Application - - - - - - - Builds, tests, and runs the project Hello JSP Application - - - - - - - - - - - - - diff --git a/appserver/tests/community/testng.xml b/appserver/tests/community/testng.xml deleted file mode 100644 index 08097c4d8c7..00000000000 --- a/appserver/tests/community/testng.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/helloworld/build.properties b/appserver/tests/community/web/helloworld/build.properties deleted file mode 100644 index 1ed7df5860f..00000000000 --- a/appserver/tests/community/web/helloworld/build.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -war.file=hellojsp -testsuite.name=basicweb -testng.test.name=web_jsp_hello -#possible choices war|ear|jar -contextroot=hellojsp -archive.type=war -ws.root=../../ - -#Definitely need to set this at local level -deploy.platform=v3 -#deploy.url=http://${deploy.server}:${deploy.port}/ -#http://${admin.host}:${admin.port}/__asadmin/deploy?path=;name= diff --git a/appserver/tests/community/web/helloworld/build.xml b/appserver/tests/community/web/helloworld/build.xml deleted file mode 100644 index 98f0a3953d6..00000000000 --- a/appserver/tests/community/web/helloworld/build.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - Builds, tests, and runs the project Hello JSP Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/helloworld/metadata/sun-web.xml b/appserver/tests/community/web/helloworld/metadata/sun-web.xml deleted file mode 100644 index 5e7522e4486..00000000000 --- a/appserver/tests/community/web/helloworld/metadata/sun-web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/helloworld/metadata/web.xml b/appserver/tests/community/web/helloworld/metadata/web.xml deleted file mode 100644 index 18fd01c041c..00000000000 --- a/appserver/tests/community/web/helloworld/metadata/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - simpleservlettest - - - simpleservlettest - myapp.HelloServlet - 0 - - - simpleservlettest - /simpleservlet - - - hello.jsp - - - BASIC - - - - - - - - - diff --git a/appserver/tests/community/web/helloworld/src/java/HelloServlet.java b/appserver/tests/community/web/helloworld/src/java/HelloServlet.java deleted file mode 100644 index bcca069d6b7..00000000000 --- a/appserver/tests/community/web/helloworld/src/java/HelloServlet.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package myapp; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Enumeration; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - - -/** - * Simple servlet to validate that the Hello, World example can - * execute servlets. In the web application deployment descriptor, - * this servlet must be mapped to correspond to the link in the - * "index.html" file. - * - * @author Craig R. McClanahan - */ - -public final class HelloServlet extends HttpServlet { - - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * - * @exception IOException if an input/output error occurs - * @exception ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Sample Application Servlet Page"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Sample Application Servlet

    "); - writer.println("This is the output of a servlet that is part of"); - writer.println("the Hello, World application. It displays the"); - writer.println("request headers from the request we are currently"); - writer.println("processing."); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - - writer.println(""); - writer.println(""); - - } - - -} - diff --git a/appserver/tests/community/web/helloworld/src/test/HelloJSPTestNG.java b/appserver/tests/community/web/helloworld/src/test/HelloJSPTestNG.java deleted file mode 100644 index 3a95b11d393..00000000000 --- a/appserver/tests/community/web/helloworld/src/test/HelloJSPTestNG.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test.web.jsp.hello; -import org.testng.annotations.Configuration; -import org.testng.annotations.ExpectedExceptions; -import org.testng.annotations.Test; -import org.testng.annotations.*; -import org.testng.Assert; - -import java.io.*; -import java.net.*; -import java.util.*; - -/** - * Simple TestNG client for basic WAR containing one JSP,one Servlet and one static - *HTML resource.Each resources (HTML,JSP,Servlet) is invoked as a separate test. - * - */ -public class HelloJSPTestNG { - - private static final String TEST_NAME = - "simple-webapp-jspservlet-noresource"; - - private String strContextRoot="hellojsp"; - - static String result = ""; - String host=System.getProperty("http.host"); - String port=System.getProperty("http.port"); - - /* - *If two asserts are mentioned in one method, then last assert is taken in - *to account. - *Each method can act as one test within one test suite - */ - - - //@Parameters({ "host", "port", "contextroot" }) - @Test(groups ={ "pulse"} ) // test method - //public void webtest(String host, String port, String contextroot) throws Exception{ - public void simpleJSPTestPage() throws Exception{ - - try{ - - - String testurl = "http://" + host + ":" + port + "/"+ strContextRoot + "/hello.jsp"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - String EXPECTED_RESPONSE ="JSP Test Page"; - while ((line = input.readLine()) != null) { - if(line.indexOf(EXPECTED_RESPONSE)!=-1){ - result=true; - testLine = line; - System.out.println(testLine); - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - @Test(groups={"pulse"}) //test method for server - public void testServerRunning() throws Exception{ - //Your server is up and running! - // - String testurl = "http://" + host + ":" + port; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - while ((line = input.readLine()) != null) { - echo(line); - if(line.indexOf("Your Application Server is now running")!=-1){ - result=true; - testLine = line; - echo(testLine); - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - } - - - @Test(groups ={ "pulse"} ) // test method - public void staticHTMLPageTest() throws Exception{ - try{ - - - String testurl = "http://" + host + ":" + port + "/"+ strContextRoot + "/first.html"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - //Assert.assertEquals(responseCode, 200); - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - while ((line = input.readLine()) != null) { - if(line.indexOf("Welcome to HTML Test Program")!=-1){ - result=true; - testLine = line; - System.out.println(testLine); - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - @Test(groups ={ "pulse"} ) // test method - public void simpleServletTest() throws Exception{ - try{ - - - String testurl = "http://" + host + ":" + port + "/"+ strContextRoot + "/simpleservlet"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - while ((line = input.readLine()) != null) { - if(line.indexOf("Sample Application Servlet")!=-1){ - result=true; - testLine = line; - echo(testLine); - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - public static void echo(String msg) { - System.out.println(msg); - } - -} diff --git a/appserver/tests/community/web/helloworld/web/html/first.html b/appserver/tests/community/web/helloworld/web/html/first.html deleted file mode 100644 index 5ed01b59202..00000000000 --- a/appserver/tests/community/web/helloworld/web/html/first.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - Welcome to HTML Test Program. This tests following thing -
      -
    1. TestNG
    2. -
    3. build.xml
    4. -
    5. V2 & V3
    6. -
    7. New Framework
    8. -
    - - - diff --git a/appserver/tests/community/web/helloworld/web/jsp/hello.jsp b/appserver/tests/community/web/helloworld/web/jsp/hello.jsp deleted file mode 100644 index eff97e7850f..00000000000 --- a/appserver/tests/community/web/helloworld/web/jsp/hello.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<%-- -The taglib directive below imports the JSTL library. If you uncomment it, -you must also add the JSTL library to the project. The Add Library... action -on Libraries node in Projects view can be used to add the JSTL 1.1 library. ---%> -<%-- -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ---%> - - - - - - - JSP Page - - - -

    JSP Test Page

    - <% out.println(" Hello World-JSP basic testing"); %> - - - - diff --git a/appserver/tests/community/web/helloworld/web/jsp/index.jsp b/appserver/tests/community/web/helloworld/web/jsp/index.jsp deleted file mode 100644 index eff97e7850f..00000000000 --- a/appserver/tests/community/web/helloworld/web/jsp/index.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<%-- -The taglib directive below imports the JSTL library. If you uncomment it, -you must also add the JSTL library to the project. The Add Library... action -on Libraries node in Projects view can be used to add the JSTL 1.1 library. ---%> -<%-- -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ---%> - - - - - - - JSP Page - - - -

    JSP Test Page

    - <% out.println(" Hello World-JSP basic testing"); %> - - - - diff --git a/appserver/tests/community/web/jruby/build.properties b/appserver/tests/community/web/jruby/build.properties deleted file mode 100644 index a435244805f..00000000000 --- a/appserver/tests/community/web/jruby/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -#glassfish.home=c:\\v3\\glassfish -#JRUBY_HOME=${glassfish.home}/modules/jruby -JRUBY_HOME=/opt/jruby-1.0.3 -http.port=8080 - -JRUBY=jruby-1.1RC2 -JRUBYZIP=jruby-bin-1.1RC2.zip -JRUBY_URL=http://dist.codehaus.org/jruby/${JRUBYZIP} -v3=true - diff --git a/appserver/tests/community/web/jruby/build.xml b/appserver/tests/community/web/jruby/build.xml deleted file mode 100644 index fcb4f3a9e09..00000000000 --- a/appserver/tests/community/web/jruby/build.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - -Builds, tests, and runs the JRuby Applications - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/jruby/helloapp/README b/appserver/tests/community/web/jruby/helloapp/README deleted file mode 100644 index 7cd111f63b3..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/README +++ /dev/null @@ -1,211 +0,0 @@ -== Welcome to Rails - -Rails is a web-application and persistence framework that includes everything -needed to create database-backed web-applications according to the -Model-View-Control pattern of separation. This pattern splits the view (also -called the presentation) into "dumb" templates that are primarily responsible -for inserting pre-built data in between HTML tags. The model contains the -"smart" domain objects (such as Account, Product, Person, Post) that holds all -the business logic and knows how to persist themselves to a database. The -controller handles the incoming requests (such as Save New Account, Update -Product, Show Post) by manipulating the model and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting started - -1. At the command prompt, start a new rails application using the rails command - and your application name. Ex: rails myapp - (If you've downloaded rails in a complete tgz or zip, this step is already done) -2. Change directory into myapp and start the web server: script/server (run with --help for options) -3. Go to http://localhost:3000/ and get "Welcome aboard: You’re riding the Rails!" -4. Follow the guidelines to start developing your application - - -== Web Servers - -By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise -Rails will use the WEBrick, the webserver that ships with Ruby. When you run script/server, -Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures -that you can always get up and running quickly. - -Mongrel is a Ruby-based webserver with a C-component (which requires compilation) that is -suitable for development and deployment of Rails applications. If you have Ruby Gems installed, -getting up and running with mongrel is as easy as: gem install mongrel. -More info at: http://mongrel.rubyforge.org - -If Mongrel is not installed, Rails will look for lighttpd. It's considerably faster than -Mongrel and WEBrick and also suited for production use, but requires additional -installation and currently only works well on OS X/Unix (Windows users are encouraged -to start with Mongrel). We recommend version 1.4.11 and higher. You can download it from -http://www.lighttpd.net. - -And finally, if neither Mongrel or lighttpd are installed, Rails will use the built-in Ruby -web server, WEBrick. WEBrick is a small Ruby web server suitable for development, but not -for production. - -But of course its also possible to run Rails on any platform that supports FCGI. -Apache, LiteSpeed, IIS are just a few. For more information on FCGI, -please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands running -on the server.log and development.log. Rails will automatically display debugging -and runtime information to these files. Debugging info will also be shown in the -browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code using -the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1 - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/ including: - -* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/ -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two online (and free) books will bring you up to speed on the Ruby language -and also on programming in general. - - -== Breakpoints - -Breakpoint support is available through the script/breakpointer client. This -means that you can break out of execution at any point in the code, investigate -and change the model, AND then resume execution! Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.find(:all) - breakpoint "Breaking out from the list" - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the breakpointer window. Here you can do things like: - -Executing breakpoint "Breaking out from the list" at .../webrick_server.rb:16 in 'breakpoint' - - >> @posts.inspect - => "[#nil, \"body\"=>nil, \"id\"=>\"1\"}>, - #\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]" - >> @posts.first.title = "hello from a breakpoint" - => "hello from a breakpoint" - -...and even better is that you can examine how your runtime objects actually work: - - >> f = @posts.first - => #nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you press CTRL-D - - -== Console - -You can interact with the domain model by starting the console through script/console. -Here you'll have all parts of the application configured, just like it is when the -application is running. You can inspect domain models, change values, and save to the -database. Starting the script without arguments will launch it in the development environment. -Passing an argument will specify a different environment, like script/console production. - -To reload your controllers and models after launching the console run reload! - -To reload your controllers and models after launching the console run reload! - - - -== Description of contents - -app - Holds all the code that's specific to this particular application. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from ApplicationController - which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. - Most models will descend from ActiveRecord::Base. - -app/views - Holds the template files for the view that should be named like - weblogs/index.rhtml for the WeblogsController#index action. All views use eRuby - syntax. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the common - header/footer method of wrapping views. In your views, define a layout using the - layout :default and create a file named default.rhtml. Inside default.rhtml, - call <% yield %> to render the view using this layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are generated - for you automatically when using script/generate for controllers. Helpers can be used to - wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, and other dependencies. - -components - Self-contained mini-applications that can bundle together controllers, models, and views. - -db - Contains the database schema in schema.rb. db/migrate contains all - the sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when generated - using rake doc:app - -lib - Application specific libraries. Basically, any kind of custom code that doesn't - belong under controllers, models, or helpers. This directory is in the load path. - -public - The directory available for the web server. Contains subdirectories for images, stylesheets, - and javascripts. Also contains the dispatchers and the default HTML files. This should be - set as the DOCUMENT_ROOT of your web server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the script/generate scripts, template - test files will be generated for you and placed in this directory. - -vendor - External libraries that the application depends on. Also includes the plugins subdirectory. - This directory is in the load path. diff --git a/appserver/tests/community/web/jruby/helloapp/Rakefile b/appserver/tests/community/web/jruby/helloapp/Rakefile deleted file mode 100644 index 430df96fdaf..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/Rakefile +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require(File.join(File.dirname(__FILE__), 'config', 'boot')) - -require 'rake' -require 'rake/testtask' -require 'rake/rdoctask' - -require 'tasks/rails' diff --git a/appserver/tests/community/web/jruby/helloapp/app/controllers/application.rb b/appserver/tests/community/web/jruby/helloapp/app/controllers/application.rb deleted file mode 100644 index c42a9579b5b..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/app/controllers/application.rb +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Filters added to this controller apply to all controllers in the application. -# Likewise, all the methods added will be available for all controllers. - -class ApplicationController < ActionController::Base - # Pick a unique cookie name to distinguish our session data from others' - session :session_key => '_helloapp_session_id' -end diff --git a/appserver/tests/community/web/jruby/helloapp/app/controllers/mycontroller_controller.rb b/appserver/tests/community/web/jruby/helloapp/app/controllers/mycontroller_controller.rb deleted file mode 100644 index 8a29dd94e26..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/app/controllers/mycontroller_controller.rb +++ /dev/null @@ -1,45 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -class MycontrollerController < ApplicationController - - def testview - end -end diff --git a/appserver/tests/community/web/jruby/helloapp/app/helpers/application_helper.rb b/appserver/tests/community/web/jruby/helloapp/app/helpers/application_helper.rb deleted file mode 100644 index bffbd65ef95..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/app/helpers/application_helper.rb +++ /dev/null @@ -1,43 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Methods added to this helper will be available to all templates in the application. -module ApplicationHelper -end diff --git a/appserver/tests/community/web/jruby/helloapp/app/helpers/mycontroller_helper.rb b/appserver/tests/community/web/jruby/helloapp/app/helpers/mycontroller_helper.rb deleted file mode 100644 index 27f98f85ff6..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/app/helpers/mycontroller_helper.rb +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -module MycontrollerHelper -end diff --git a/appserver/tests/community/web/jruby/helloapp/app/views/mycontroller/testview.rhtml b/appserver/tests/community/web/jruby/helloapp/app/views/mycontroller/testview.rhtml deleted file mode 100644 index bfd8b88d534..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/app/views/mycontroller/testview.rhtml +++ /dev/null @@ -1,44 +0,0 @@ - - -

    Mycontroller#testview

    -

    Find me in app/views/mycontroller/testview.rhtml

    diff --git a/appserver/tests/community/web/jruby/helloapp/build.properties b/appserver/tests/community/web/jruby/helloapp/build.properties deleted file mode 100644 index 4958074d774..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/build.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -result.output=../../../test-output/ -class.output=../../../classes/${ant.project.name} -test.class.output=../../../classes/test -testsuite.name=jrubyhello -testng.test.name=jruby_hello -contextroot=helloapp - -appName=helloworld -controller=say -view=hello - -maven.repo.local=${user.home}/.m2/repository -plugin_classpath=${maven.repo.local}/org/testng/testng/5.6/testng-5.6-jdk15.jar - diff --git a/appserver/tests/community/web/jruby/helloapp/build.xml b/appserver/tests/community/web/jruby/helloapp/build.xml deleted file mode 100644 index cae88884eb2..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/build.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/jruby/helloapp/config/boot.rb b/appserver/tests/community/web/jruby/helloapp/config/boot.rb deleted file mode 100644 index 90576f26756..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/config/boot.rb +++ /dev/null @@ -1,79 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb - -RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) - -unless defined?(Rails::Initializer) - if File.directory?("#{RAILS_ROOT}/vendor/rails") - require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" - else - require 'rubygems' - - rails_gem_version = - if defined? RAILS_GEM_VERSION - RAILS_GEM_VERSION - else - File.read("#{File.dirname(__FILE__)}/environment.rb") =~ /^[^#]*RAILS_GEM_VERSION\s+=\s+'([\d.]+)'/ - $1 - end - - if rails_gem_version - rails_gem = Gem.cache.search('rails', "=#{rails_gem_version}.0").sort_by { |g| g.version.version }.last - - if rails_gem - gem "rails", "=#{rails_gem.version.version}" - require rails_gem.full_gem_path + '/lib/initializer' - else - STDERR.puts %(Cannot find gem for Rails =#{rails_gem_version}.0: - Install the missing gem with 'gem install -v=#{rails_gem_version} rails', or - change environment.rb to define RAILS_GEM_VERSION with your desired version. - ) - exit 1 - end - else - gem "rails" - require 'initializer' - end - end - - Rails::Initializer.run(:set_load_path) -end diff --git a/appserver/tests/community/web/jruby/helloapp/config/database.yml b/appserver/tests/community/web/jruby/helloapp/config/database.yml deleted file mode 100644 index e04723ca7a3..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/config/database.yml +++ /dev/null @@ -1,76 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# MySQL (default setup). Versions 4.1 and 5.0 are recommended. -# -# Install the MySQL driver: -# gem install mysql -# On MacOS X: -# gem install mysql -- --include=/usr/local/lib -# On Windows: -# gem install mysql -# Choose the win32 build. -# Install MySQL and put its /bin directory on your path. -# -# And be sure to use new-style password hashing: -# http://dev.mysql.com/doc/refman/5.0/en/old-client.html -development: - adapter: mysql - database: helloapp_development - username: root - password: - host: localhost - -# Warning: The database defined as 'test' will be erased and -# re-generated from your development database when you run 'rake'. -# Do not set this db to the same as development or production. -test: - adapter: mysql - database: helloapp_test - username: root - password: - host: localhost - -production: - adapter: mysql - database: helloapp_production - username: root - password: - host: localhost diff --git a/appserver/tests/community/web/jruby/helloapp/config/environment.rb b/appserver/tests/community/web/jruby/helloapp/config/environment.rb deleted file mode 100644 index a846f87d5c9..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/config/environment.rb +++ /dev/null @@ -1,100 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Be sure to restart your web server when you modify this file. - -# Uncomment below to force Rails into production mode when -# you don't control web/app server and can't set it the proper way -# ENV['RAILS_ENV'] ||= 'production' - -# Specifies gem version of Rails to use when vendor/rails is not present -RAILS_GEM_VERSION = '1.2.3' unless defined? RAILS_GEM_VERSION - -# Bootstrap the Rails environment, frameworks, and default configuration -require File.join(File.dirname(__FILE__), 'boot') - -Rails::Initializer.run do |config| - # Settings in config/environments/* take precedence over those specified here - - # Skip frameworks you're not going to use (only works if using vendor/rails) - # config.frameworks -= [ :action_web_service, :action_mailer ] - - # Only load the plugins named here, by default all plugins in vendor/plugins are loaded - # config.plugins = %W( exception_notification ssl_requirement ) - - # Add additional load paths for your own custom dirs - # config.load_paths += %W( #{RAILS_ROOT}/extras ) - - # Force all environments to use the same logger level - # (by default production uses :info, the others :debug) - # config.log_level = :debug - - # Use the database for sessions instead of the file system - # (create the session table with 'rake db:sessions:create') - # config.action_controller.session_store = :active_record_store - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Activate observers that should always be running - # config.active_record.observers = :cacher, :garbage_collector - - # Make Active Record use UTC-base instead of local time - # config.active_record.default_timezone = :utc - - # Add new inflection rules using the following format - # (all these examples are active by default): - # Inflector.inflections do |inflect| - # inflect.plural /^(ox)$/i, '\1en' - # inflect.singular /^(ox)en/i, '\1' - # inflect.irregular 'person', 'people' - # inflect.uncountable %w( fish sheep ) - # end - - # See Rails::Configuration for more options -end - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register "application/x-mobile", :mobile - -# Include your application configuration below diff --git a/appserver/tests/community/web/jruby/helloapp/config/environments/development.rb b/appserver/tests/community/web/jruby/helloapp/config/environments/development.rb deleted file mode 100644 index b77e08a6ab7..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/config/environments/development.rb +++ /dev/null @@ -1,61 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Settings specified here will take precedence over those in config/environment.rb - -# In the development environment your application's code is reloaded on -# every request. This slows down response time but is perfect for development -# since you don't have to restart the webserver when you make code changes. -config.cache_classes = false - -# Log error messages when you accidentally call methods on nil. -config.whiny_nils = true - -# Enable the breakpoint server that script/breakpointer connects to -config.breakpoint_server = true - -# Show full error reports and disable caching -config.action_controller.consider_all_requests_local = true -config.action_controller.perform_caching = false -config.action_view.cache_template_extensions = false -config.action_view.debug_rjs = true - -# Don't care if the mailer can't send -config.action_mailer.raise_delivery_errors = false diff --git a/appserver/tests/community/web/jruby/helloapp/config/environments/production.rb b/appserver/tests/community/web/jruby/helloapp/config/environments/production.rb deleted file mode 100644 index 5d373267fce..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/config/environments/production.rb +++ /dev/null @@ -1,58 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Settings specified here will take precedence over those in config/environment.rb - -# The production environment is meant for finished, "live" apps. -# Code is not reloaded between requests -config.cache_classes = true - -# Use a different logger for distributed setups -# config.logger = SyslogLogger.new - -# Full error reports are disabled and caching is turned on -config.action_controller.consider_all_requests_local = false -config.action_controller.perform_caching = true - -# Enable serving of images, stylesheets, and javascripts from an asset server -# config.action_controller.asset_host = "http://assets.example.com" - -# Disable delivery errors, bad email addresses will be ignored -# config.action_mailer.raise_delivery_errors = false diff --git a/appserver/tests/community/web/jruby/helloapp/config/environments/test.rb b/appserver/tests/community/web/jruby/helloapp/config/environments/test.rb deleted file mode 100644 index a46d5c4a8be..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/config/environments/test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Settings specified here will take precedence over those in config/environment.rb - -# The test environment is used exclusively to run your application's -# test suite. You never need to work with it otherwise. Remember that -# your test database is "scratch space" for the test suite and is wiped -# and recreated between test runs. Don't rely on the data there! -config.cache_classes = true - -# Log error messages when you accidentally call methods on nil. -config.whiny_nils = true - -# Show full error reports and disable caching -config.action_controller.consider_all_requests_local = true -config.action_controller.perform_caching = false - -# Tell ActionMailer not to deliver emails to the real world. -# The :test delivery method accumulates sent emails in the -# ActionMailer::Base.deliveries array. -config.action_mailer.delivery_method = :test diff --git a/appserver/tests/community/web/jruby/helloapp/config/routes.rb b/appserver/tests/community/web/jruby/helloapp/config/routes.rb deleted file mode 100644 index acd6ce063b4..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/config/routes.rb +++ /dev/null @@ -1,63 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -ActionController::Routing::Routes.draw do |map| - # The priority is based upon order of creation: first created -> highest priority. - - # Sample of regular route: - # map.connect 'products/:id', :controller => 'catalog', :action => 'view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' - # This route can be invoked with purchase_url(:id => product.id) - - # You can have the root of your site routed by hooking up '' - # -- just remember to delete public/index.html. - # map.connect '', :controller => "welcome" - - # Allow downloading Web Service WSDL as a file with an extension - # instead of a file named 'wsdl' - map.connect ':controller/service.wsdl', :action => 'wsdl' - - # Install the default route as the lowest priority. - map.connect ':controller/:action/:id.:format' - map.connect ':controller/:action/:id' -end diff --git a/appserver/tests/community/web/jruby/helloapp/public/404.html b/appserver/tests/community/web/jruby/helloapp/public/404.html deleted file mode 100644 index 279870685a6..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/404.html +++ /dev/null @@ -1,72 +0,0 @@ - - - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - - - - - - The page you were looking for doesn't exist (404) - - - - - -
    -

    The page you were looking for doesn't exist.

    -

    You may have mistyped the address or the page may have moved.

    -
    - - diff --git a/appserver/tests/community/web/jruby/helloapp/public/500.html b/appserver/tests/community/web/jruby/helloapp/public/500.html deleted file mode 100644 index 2823574bf80..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/500.html +++ /dev/null @@ -1,72 +0,0 @@ - - - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - - - - - - We're sorry, but something went wrong - - - - - -
    -

    We're sorry, but something went wrong.

    -

    We've been notified about this issue and we'll take a look at it shortly.

    -
    - - diff --git a/appserver/tests/community/web/jruby/helloapp/public/dispatch.cgi b/appserver/tests/community/web/jruby/helloapp/public/dispatch.cgi deleted file mode 100644 index 85e7d03c810..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/dispatch.cgi +++ /dev/null @@ -1,49 +0,0 @@ -#!C:/Sun/v3/jruby-src-1.0.2/jruby-1.0.2/bin/jruby.bat -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) - -# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: -# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired -require "dispatcher" - -ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) -Dispatcher.dispatch diff --git a/appserver/tests/community/web/jruby/helloapp/public/dispatch.fcgi b/appserver/tests/community/web/jruby/helloapp/public/dispatch.fcgi deleted file mode 100644 index c244e7fc863..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/dispatch.fcgi +++ /dev/null @@ -1,64 +0,0 @@ -#!C:/Sun/v3/jruby-src-1.0.2/jruby-1.0.2/bin/jruby.bat -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# -# You may specify the path to the FastCGI crash log (a log of unhandled -# exceptions which forced the FastCGI instance to exit, great for debugging) -# and the number of requests to process before running garbage collection. -# -# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log -# and the GC period is nil (turned off). A reasonable number of requests -# could range from 10-100 depending on the memory footprint of your app. -# -# Example: -# # Default log path, normal GC behavior. -# RailsFCGIHandler.process! -# -# # Default log path, 50 requests between GC. -# RailsFCGIHandler.process! nil, 50 -# -# # Custom log path, normal GC behavior. -# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log' -# -require File.dirname(__FILE__) + "/../config/environment" -require 'fcgi_handler' - -RailsFCGIHandler.process! diff --git a/appserver/tests/community/web/jruby/helloapp/public/dispatch.rb b/appserver/tests/community/web/jruby/helloapp/public/dispatch.rb deleted file mode 100644 index 85e7d03c810..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/dispatch.rb +++ /dev/null @@ -1,49 +0,0 @@ -#!C:/Sun/v3/jruby-src-1.0.2/jruby-1.0.2/bin/jruby.bat -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) - -# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: -# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired -require "dispatcher" - -ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) -Dispatcher.dispatch diff --git a/appserver/tests/community/web/jruby/helloapp/public/favicon.ico b/appserver/tests/community/web/jruby/helloapp/public/favicon.ico deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/appserver/tests/community/web/jruby/helloapp/public/images/rails.png b/appserver/tests/community/web/jruby/helloapp/public/images/rails.png deleted file mode 100644 index b8441f182e06974083cf08f0acaf0e2fd612bd40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1787 zcmVCLdthj)A!BBmWB&y|X`RY;f`BJ<_ju%@N||NoLFD~mQl$aHGjq>;5dG_D{h(5s}0 z6&=HANU$m__3PuddU(lvR_xWj`}Oho@9EyQt-n!E*P(KhM@X_VFV2l&>deNZJT%y8iwA zoG>u1B`p2=_u9k4v1Mud`1+qvOZoHg#bITJ9U`qBAek?40RR96!AV3xRCwBy*IQ$v zN(=yC9IhRft9V64L`77pqF_Cx@c;kSNoGK)`?Ps*cP(EtGlYZ{D5cxspMQvjKH)Oh6X(pa|J{ zGy1J$Ej7=Z{uvmMfRRsE;v`p;45B~6*ep#hM^ji zl$+7qoWq~}ewG=61uFw0He{tJurMU&4Iv?=B^eR(wAHk!miA)O7p_+YR>lbmU3rmn ze?+ze(+sEd6foB&*l9+?zkr_a-5*v&p*?c}HOGtyHg6r{WFYpQ=#z0Hc7VWLx$>M3|b0|Gn z+5t#z6*ffSVc6DjpmB2?AAR@@vB!wCK?9Yl;33;Q7^%(401QW|k=R8b!OwtLJPjjm zO9Ia;qCq)rOq!1Ia*6#A%#xb}yDx1P*pWla>9j$bnMn3CBqe4`TRll_Iy29kmG?4fbKuF=XqU|?3b@B zA`&a?KIgZ|KJx5eND_c3Em=WZn@xW8hRJ^G&sY^b(FW?WC9W_sb;+lAPdLTdBaKIK;-f}*h4|1aTjw7qX_k~e{TWO7jqcekERN;Jyh%67)q4rKpL*CEYL;|#GY{B@5 zi52XoC?xsoorJKxsliugF#z38MJqrYCWV(t<=G&f;^Me13&AiI9{3jUZ$ zFM`*L(9qc^VMxkz1oaDH!1pcD^IXp>Z0Jb=_qs?Vsrs{mp<^{$N!EC9o+`CO-(o}E zJ`y{*;9s|wr22-QoJ87y^~;)Q@b%P4UgSSsx>2$o@Vd{%Pk0@4qZ^fhB(vt$c1TG> z*{Ad;foraENbld`=MCNm4?9kvlgK~&J>ialpJ7nua zx0oRzwG5;}Qne)Fg(N3kf?JVmB;}y&5(0+~r*aL$0Zof8fe!AtHWH>A^1Y)@G@GsA zup`R{Qg?{+MaxTq#2n{6w|)c&yaJ7{U4ngAH5v6I)*;@rEBE*ehIPBwKBQU)YKE8F0lR!Sm?sE4Xk-sj&E$|A-9n dP56HS1^^A-61FoN)nxzx002ovPDHLkV1kw_Sd9Px diff --git a/appserver/tests/community/web/jruby/helloapp/public/index.html b/appserver/tests/community/web/jruby/helloapp/public/index.html deleted file mode 100644 index 80898a2e266..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/index.html +++ /dev/null @@ -1,319 +0,0 @@ - - - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - - - - Ruby on Rails: Welcome aboard - - - - - - -
    - - -
    - - - - -
    -

    Getting started

    -

    Here’s how to get rolling:

    - -
      -
    1. -

      Create your databases and edit config/database.yml

      -

      Rails needs to know your login and password.

      -
    2. - -
    3. -

      Use script/generate to create your models and controllers

      -

      To see all available options, run it without parameters.

      -
    4. - -
    5. -

      Set up a default route and remove or rename this file

      -

      Routes are setup in config/routes.rb.

      -
    6. -
    -
    -
    - - -
    - - diff --git a/appserver/tests/community/web/jruby/helloapp/public/javascripts/application.js b/appserver/tests/community/web/jruby/helloapp/public/javascripts/application.js deleted file mode 100644 index fe4577696b2..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/javascripts/application.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place your application-specific JavaScript functions and classes here -// This file is automatically included by javascript_include_tag :defaults diff --git a/appserver/tests/community/web/jruby/helloapp/public/javascripts/controls.js b/appserver/tests/community/web/jruby/helloapp/public/javascripts/controls.js deleted file mode 100644 index 8c273f874f9..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/javascripts/controls.js +++ /dev/null @@ -1,833 +0,0 @@ -// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// (c) 2005, 2006 Ivan Krstic (http://blogs.law.harvard.edu/ivan) -// (c) 2005, 2006 Jon Tirsen (http://www.tirsen.com) -// Contributors: -// Richard Livsey -// Rahul Bhargava -// Rob Wills -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -// Autocompleter.Base handles all the autocompletion functionality -// that's independent of the data source for autocompletion. This -// includes drawing the autocompletion menu, observing keyboard -// and mouse events, and similar. -// -// Specific autocompleters need to provide, at the very least, -// a getUpdatedChoices function that will be invoked every time -// the text inside the monitored textbox changes. This method -// should get the text for which to provide autocompletion by -// invoking this.getToken(), NOT by directly accessing -// this.element.value. This is to allow incremental tokenized -// autocompletion. Specific auto-completion logic (AJAX, etc) -// belongs in getUpdatedChoices. -// -// Tokenized incremental autocompletion is enabled automatically -// when an autocompleter is instantiated with the 'tokens' option -// in the options parameter, e.g.: -// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' }); -// will incrementally autocomplete with a comma as the token. -// Additionally, ',' in the above example can be replaced with -// a token array, e.g. { tokens: [',', '\n'] } which -// enables autocompletion on multiple tokens. This is most -// useful when one of the tokens is \n (a newline), as it -// allows smart autocompletion after linebreaks. - -if(typeof Effect == 'undefined') - throw("controls.js requires including script.aculo.us' effects.js library"); - -var Autocompleter = {} -Autocompleter.Base = function() {}; -Autocompleter.Base.prototype = { - baseInitialize: function(element, update, options) { - this.element = $(element); - this.update = $(update); - this.hasFocus = false; - this.changed = false; - this.active = false; - this.index = 0; - this.entryCount = 0; - - if(this.setOptions) - this.setOptions(options); - else - this.options = options || {}; - - this.options.paramName = this.options.paramName || this.element.name; - this.options.tokens = this.options.tokens || []; - this.options.frequency = this.options.frequency || 0.4; - this.options.minChars = this.options.minChars || 1; - this.options.onShow = this.options.onShow || - function(element, update){ - if(!update.style.position || update.style.position=='absolute') { - update.style.position = 'absolute'; - Position.clone(element, update, { - setHeight: false, - offsetTop: element.offsetHeight - }); - } - Effect.Appear(update,{duration:0.15}); - }; - this.options.onHide = this.options.onHide || - function(element, update){ new Effect.Fade(update,{duration:0.15}) }; - - if(typeof(this.options.tokens) == 'string') - this.options.tokens = new Array(this.options.tokens); - - this.observer = null; - - this.element.setAttribute('autocomplete','off'); - - Element.hide(this.update); - - Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this)); - Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this)); - }, - - show: function() { - if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update); - if(!this.iefix && - (navigator.appVersion.indexOf('MSIE')>0) && - (navigator.userAgent.indexOf('Opera')<0) && - (Element.getStyle(this.update, 'position')=='absolute')) { - new Insertion.After(this.update, - ''); - this.iefix = $(this.update.id+'_iefix'); - } - if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); - }, - - fixIEOverlapping: function() { - Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)}); - this.iefix.style.zIndex = 1; - this.update.style.zIndex = 2; - Element.show(this.iefix); - }, - - hide: function() { - this.stopIndicator(); - if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); - if(this.iefix) Element.hide(this.iefix); - }, - - startIndicator: function() { - if(this.options.indicator) Element.show(this.options.indicator); - }, - - stopIndicator: function() { - if(this.options.indicator) Element.hide(this.options.indicator); - }, - - onKeyPress: function(event) { - if(this.active) - switch(event.keyCode) { - case Event.KEY_TAB: - case Event.KEY_RETURN: - this.selectEntry(); - Event.stop(event); - case Event.KEY_ESC: - this.hide(); - this.active = false; - Event.stop(event); - return; - case Event.KEY_LEFT: - case Event.KEY_RIGHT: - return; - case Event.KEY_UP: - this.markPrevious(); - this.render(); - if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); - return; - case Event.KEY_DOWN: - this.markNext(); - this.render(); - if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); - return; - } - else - if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || - (navigator.appVersion.indexOf('AppleWebKit') > 0 && event.keyCode == 0)) return; - - this.changed = true; - this.hasFocus = true; - - if(this.observer) clearTimeout(this.observer); - this.observer = - setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); - }, - - activate: function() { - this.changed = false; - this.hasFocus = true; - this.getUpdatedChoices(); - }, - - onHover: function(event) { - var element = Event.findElement(event, 'LI'); - if(this.index != element.autocompleteIndex) - { - this.index = element.autocompleteIndex; - this.render(); - } - Event.stop(event); - }, - - onClick: function(event) { - var element = Event.findElement(event, 'LI'); - this.index = element.autocompleteIndex; - this.selectEntry(); - this.hide(); - }, - - onBlur: function(event) { - // needed to make click events working - setTimeout(this.hide.bind(this), 250); - this.hasFocus = false; - this.active = false; - }, - - render: function() { - if(this.entryCount > 0) { - for (var i = 0; i < this.entryCount; i++) - this.index==i ? - Element.addClassName(this.getEntry(i),"selected") : - Element.removeClassName(this.getEntry(i),"selected"); - - if(this.hasFocus) { - this.show(); - this.active = true; - } - } else { - this.active = false; - this.hide(); - } - }, - - markPrevious: function() { - if(this.index > 0) this.index-- - else this.index = this.entryCount-1; - this.getEntry(this.index).scrollIntoView(true); - }, - - markNext: function() { - if(this.index < this.entryCount-1) this.index++ - else this.index = 0; - this.getEntry(this.index).scrollIntoView(false); - }, - - getEntry: function(index) { - return this.update.firstChild.childNodes[index]; - }, - - getCurrentEntry: function() { - return this.getEntry(this.index); - }, - - selectEntry: function() { - this.active = false; - this.updateElement(this.getCurrentEntry()); - }, - - updateElement: function(selectedElement) { - if (this.options.updateElement) { - this.options.updateElement(selectedElement); - return; - } - var value = ''; - if (this.options.select) { - var nodes = document.getElementsByClassName(this.options.select, selectedElement) || []; - if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); - } else - value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); - - var lastTokenPos = this.findLastToken(); - if (lastTokenPos != -1) { - var newValue = this.element.value.substr(0, lastTokenPos + 1); - var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/); - if (whitespace) - newValue += whitespace[0]; - this.element.value = newValue + value; - } else { - this.element.value = value; - } - this.element.focus(); - - if (this.options.afterUpdateElement) - this.options.afterUpdateElement(this.element, selectedElement); - }, - - updateChoices: function(choices) { - if(!this.changed && this.hasFocus) { - this.update.innerHTML = choices; - Element.cleanWhitespace(this.update); - Element.cleanWhitespace(this.update.down()); - - if(this.update.firstChild && this.update.down().childNodes) { - this.entryCount = - this.update.down().childNodes.length; - for (var i = 0; i < this.entryCount; i++) { - var entry = this.getEntry(i); - entry.autocompleteIndex = i; - this.addObservers(entry); - } - } else { - this.entryCount = 0; - } - - this.stopIndicator(); - this.index = 0; - - if(this.entryCount==1 && this.options.autoSelect) { - this.selectEntry(); - this.hide(); - } else { - this.render(); - } - } - }, - - addObservers: function(element) { - Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); - Event.observe(element, "click", this.onClick.bindAsEventListener(this)); - }, - - onObserverEvent: function() { - this.changed = false; - if(this.getToken().length>=this.options.minChars) { - this.startIndicator(); - this.getUpdatedChoices(); - } else { - this.active = false; - this.hide(); - } - }, - - getToken: function() { - var tokenPos = this.findLastToken(); - if (tokenPos != -1) - var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,''); - else - var ret = this.element.value; - - return /\n/.test(ret) ? '' : ret; - }, - - findLastToken: function() { - var lastTokenPos = -1; - - for (var i=0; i lastTokenPos) - lastTokenPos = thisTokenPos; - } - return lastTokenPos; - } -} - -Ajax.Autocompleter = Class.create(); -Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), { - initialize: function(element, update, url, options) { - this.baseInitialize(element, update, options); - this.options.asynchronous = true; - this.options.onComplete = this.onComplete.bind(this); - this.options.defaultParams = this.options.parameters || null; - this.url = url; - }, - - getUpdatedChoices: function() { - entry = encodeURIComponent(this.options.paramName) + '=' + - encodeURIComponent(this.getToken()); - - this.options.parameters = this.options.callback ? - this.options.callback(this.element, entry) : entry; - - if(this.options.defaultParams) - this.options.parameters += '&' + this.options.defaultParams; - - new Ajax.Request(this.url, this.options); - }, - - onComplete: function(request) { - this.updateChoices(request.responseText); - } - -}); - -// The local array autocompleter. Used when you'd prefer to -// inject an array of autocompletion options into the page, rather -// than sending out Ajax queries, which can be quite slow sometimes. -// -// The constructor takes four parameters. The first two are, as usual, -// the id of the monitored textbox, and id of the autocompletion menu. -// The third is the array you want to autocomplete from, and the fourth -// is the options block. -// -// Extra local autocompletion options: -// - choices - How many autocompletion choices to offer -// -// - partialSearch - If false, the autocompleter will match entered -// text only at the beginning of strings in the -// autocomplete array. Defaults to true, which will -// match text at the beginning of any *word* in the -// strings in the autocomplete array. If you want to -// search anywhere in the string, additionally set -// the option fullSearch to true (default: off). -// -// - fullSsearch - Search anywhere in autocomplete array strings. -// -// - partialChars - How many characters to enter before triggering -// a partial match (unlike minChars, which defines -// how many characters are required to do any match -// at all). Defaults to 2. -// -// - ignoreCase - Whether to ignore case when autocompleting. -// Defaults to true. -// -// It's possible to pass in a custom function as the 'selector' -// option, if you prefer to write your own autocompletion logic. -// In that case, the other options above will not apply unless -// you support them. - -Autocompleter.Local = Class.create(); -Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), { - initialize: function(element, update, array, options) { - this.baseInitialize(element, update, options); - this.options.array = array; - }, - - getUpdatedChoices: function() { - this.updateChoices(this.options.selector(this)); - }, - - setOptions: function(options) { - this.options = Object.extend({ - choices: 10, - partialSearch: true, - partialChars: 2, - ignoreCase: true, - fullSearch: false, - selector: function(instance) { - var ret = []; // Beginning matches - var partial = []; // Inside matches - var entry = instance.getToken(); - var count = 0; - - for (var i = 0; i < instance.options.array.length && - ret.length < instance.options.choices ; i++) { - - var elem = instance.options.array[i]; - var foundPos = instance.options.ignoreCase ? - elem.toLowerCase().indexOf(entry.toLowerCase()) : - elem.indexOf(entry); - - while (foundPos != -1) { - if (foundPos == 0 && elem.length != entry.length) { - ret.push("
  • " + elem.substr(0, entry.length) + "" + - elem.substr(entry.length) + "
  • "); - break; - } else if (entry.length >= instance.options.partialChars && - instance.options.partialSearch && foundPos != -1) { - if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { - partial.push("
  • " + elem.substr(0, foundPos) + "" + - elem.substr(foundPos, entry.length) + "" + elem.substr( - foundPos + entry.length) + "
  • "); - break; - } - } - - foundPos = instance.options.ignoreCase ? - elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : - elem.indexOf(entry, foundPos + 1); - - } - } - if (partial.length) - ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) - return "
      " + ret.join('') + "
    "; - } - }, options || {}); - } -}); - -// AJAX in-place editor -// -// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor - -// Use this if you notice weird scrolling problems on some browsers, -// the DOM might be a bit confused when this gets called so do this -// waits 1 ms (with setTimeout) until it does the activation -Field.scrollFreeActivate = function(field) { - setTimeout(function() { - Field.activate(field); - }, 1); -} - -Ajax.InPlaceEditor = Class.create(); -Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99"; -Ajax.InPlaceEditor.prototype = { - initialize: function(element, url, options) { - this.url = url; - this.element = $(element); - - this.options = Object.extend({ - paramName: "value", - okButton: true, - okText: "ok", - cancelLink: true, - cancelText: "cancel", - savingText: "Saving...", - clickToEditText: "Click to edit", - okText: "ok", - rows: 1, - onComplete: function(transport, element) { - new Effect.Highlight(element, {startcolor: this.options.highlightcolor}); - }, - onFailure: function(transport) { - alert("Error communicating with the server: " + transport.responseText.stripTags()); - }, - callback: function(form) { - return Form.serialize(form); - }, - handleLineBreaks: true, - loadingText: 'Loading...', - savingClassName: 'inplaceeditor-saving', - loadingClassName: 'inplaceeditor-loading', - formClassName: 'inplaceeditor-form', - highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor, - highlightendcolor: "#FFFFFF", - externalControl: null, - submitOnBlur: false, - ajaxOptions: {}, - evalScripts: false - }, options || {}); - - if(!this.options.formId && this.element.id) { - this.options.formId = this.element.id + "-inplaceeditor"; - if ($(this.options.formId)) { - // there's already a form with that name, don't specify an id - this.options.formId = null; - } - } - - if (this.options.externalControl) { - this.options.externalControl = $(this.options.externalControl); - } - - this.originalBackground = Element.getStyle(this.element, 'background-color'); - if (!this.originalBackground) { - this.originalBackground = "transparent"; - } - - this.element.title = this.options.clickToEditText; - - this.onclickListener = this.enterEditMode.bindAsEventListener(this); - this.mouseoverListener = this.enterHover.bindAsEventListener(this); - this.mouseoutListener = this.leaveHover.bindAsEventListener(this); - Event.observe(this.element, 'click', this.onclickListener); - Event.observe(this.element, 'mouseover', this.mouseoverListener); - Event.observe(this.element, 'mouseout', this.mouseoutListener); - if (this.options.externalControl) { - Event.observe(this.options.externalControl, 'click', this.onclickListener); - Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener); - Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener); - } - }, - enterEditMode: function(evt) { - if (this.saving) return; - if (this.editing) return; - this.editing = true; - this.onEnterEditMode(); - if (this.options.externalControl) { - Element.hide(this.options.externalControl); - } - Element.hide(this.element); - this.createForm(); - this.element.parentNode.insertBefore(this.form, this.element); - if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField); - // stop the event to avoid a page refresh in Safari - if (evt) { - Event.stop(evt); - } - return false; - }, - createForm: function() { - this.form = document.createElement("form"); - this.form.id = this.options.formId; - Element.addClassName(this.form, this.options.formClassName) - this.form.onsubmit = this.onSubmit.bind(this); - - this.createEditField(); - - if (this.options.textarea) { - var br = document.createElement("br"); - this.form.appendChild(br); - } - - if (this.options.okButton) { - okButton = document.createElement("input"); - okButton.type = "submit"; - okButton.value = this.options.okText; - okButton.className = 'editor_ok_button'; - this.form.appendChild(okButton); - } - - if (this.options.cancelLink) { - cancelLink = document.createElement("a"); - cancelLink.href = "#"; - cancelLink.appendChild(document.createTextNode(this.options.cancelText)); - cancelLink.onclick = this.onclickCancel.bind(this); - cancelLink.className = 'editor_cancel'; - this.form.appendChild(cancelLink); - } - }, - hasHTMLLineBreaks: function(string) { - if (!this.options.handleLineBreaks) return false; - return string.match(/
    /i); - }, - convertHTMLLineBreaks: function(string) { - return string.replace(/
    /gi, "\n").replace(//gi, "\n").replace(/<\/p>/gi, "\n").replace(/

    /gi, ""); - }, - createEditField: function() { - var text; - if(this.options.loadTextURL) { - text = this.options.loadingText; - } else { - text = this.getText(); - } - - var obj = this; - - if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) { - this.options.textarea = false; - var textField = document.createElement("input"); - textField.obj = this; - textField.type = "text"; - textField.name = this.options.paramName; - textField.value = text; - textField.style.backgroundColor = this.options.highlightcolor; - textField.className = 'editor_field'; - var size = this.options.size || this.options.cols || 0; - if (size != 0) textField.size = size; - if (this.options.submitOnBlur) - textField.onblur = this.onSubmit.bind(this); - this.editField = textField; - } else { - this.options.textarea = true; - var textArea = document.createElement("textarea"); - textArea.obj = this; - textArea.name = this.options.paramName; - textArea.value = this.convertHTMLLineBreaks(text); - textArea.rows = this.options.rows; - textArea.cols = this.options.cols || 40; - textArea.className = 'editor_field'; - if (this.options.submitOnBlur) - textArea.onblur = this.onSubmit.bind(this); - this.editField = textArea; - } - - if(this.options.loadTextURL) { - this.loadExternalText(); - } - this.form.appendChild(this.editField); - }, - getText: function() { - return this.element.innerHTML; - }, - loadExternalText: function() { - Element.addClassName(this.form, this.options.loadingClassName); - this.editField.disabled = true; - new Ajax.Request( - this.options.loadTextURL, - Object.extend({ - asynchronous: true, - onComplete: this.onLoadedExternalText.bind(this) - }, this.options.ajaxOptions) - ); - }, - onLoadedExternalText: function(transport) { - Element.removeClassName(this.form, this.options.loadingClassName); - this.editField.disabled = false; - this.editField.value = transport.responseText.stripTags(); - Field.scrollFreeActivate(this.editField); - }, - onclickCancel: function() { - this.onComplete(); - this.leaveEditMode(); - return false; - }, - onFailure: function(transport) { - this.options.onFailure(transport); - if (this.oldInnerHTML) { - this.element.innerHTML = this.oldInnerHTML; - this.oldInnerHTML = null; - } - return false; - }, - onSubmit: function() { - // onLoading resets these so we need to save them away for the Ajax call - var form = this.form; - var value = this.editField.value; - - // do this first, sometimes the ajax call returns before we get a chance to switch on Saving... - // which means this will actually switch on Saving... *after* we've left edit mode causing Saving... - // to be displayed indefinitely - this.onLoading(); - - if (this.options.evalScripts) { - new Ajax.Request( - this.url, Object.extend({ - parameters: this.options.callback(form, value), - onComplete: this.onComplete.bind(this), - onFailure: this.onFailure.bind(this), - asynchronous:true, - evalScripts:true - }, this.options.ajaxOptions)); - } else { - new Ajax.Updater( - { success: this.element, - // don't update on failure (this could be an option) - failure: null }, - this.url, Object.extend({ - parameters: this.options.callback(form, value), - onComplete: this.onComplete.bind(this), - onFailure: this.onFailure.bind(this) - }, this.options.ajaxOptions)); - } - // stop the event to avoid a page refresh in Safari - if (arguments.length > 1) { - Event.stop(arguments[0]); - } - return false; - }, - onLoading: function() { - this.saving = true; - this.removeForm(); - this.leaveHover(); - this.showSaving(); - }, - showSaving: function() { - this.oldInnerHTML = this.element.innerHTML; - this.element.innerHTML = this.options.savingText; - Element.addClassName(this.element, this.options.savingClassName); - this.element.style.backgroundColor = this.originalBackground; - Element.show(this.element); - }, - removeForm: function() { - if(this.form) { - if (this.form.parentNode) Element.remove(this.form); - this.form = null; - } - }, - enterHover: function() { - if (this.saving) return; - this.element.style.backgroundColor = this.options.highlightcolor; - if (this.effect) { - this.effect.cancel(); - } - Element.addClassName(this.element, this.options.hoverClassName) - }, - leaveHover: function() { - if (this.options.backgroundColor) { - this.element.style.backgroundColor = this.oldBackground; - } - Element.removeClassName(this.element, this.options.hoverClassName) - if (this.saving) return; - this.effect = new Effect.Highlight(this.element, { - startcolor: this.options.highlightcolor, - endcolor: this.options.highlightendcolor, - restorecolor: this.originalBackground - }); - }, - leaveEditMode: function() { - Element.removeClassName(this.element, this.options.savingClassName); - this.removeForm(); - this.leaveHover(); - this.element.style.backgroundColor = this.originalBackground; - Element.show(this.element); - if (this.options.externalControl) { - Element.show(this.options.externalControl); - } - this.editing = false; - this.saving = false; - this.oldInnerHTML = null; - this.onLeaveEditMode(); - }, - onComplete: function(transport) { - this.leaveEditMode(); - this.options.onComplete.bind(this)(transport, this.element); - }, - onEnterEditMode: function() {}, - onLeaveEditMode: function() {}, - dispose: function() { - if (this.oldInnerHTML) { - this.element.innerHTML = this.oldInnerHTML; - } - this.leaveEditMode(); - Event.stopObserving(this.element, 'click', this.onclickListener); - Event.stopObserving(this.element, 'mouseover', this.mouseoverListener); - Event.stopObserving(this.element, 'mouseout', this.mouseoutListener); - if (this.options.externalControl) { - Event.stopObserving(this.options.externalControl, 'click', this.onclickListener); - Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener); - Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener); - } - } -}; - -Ajax.InPlaceCollectionEditor = Class.create(); -Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype); -Object.extend(Ajax.InPlaceCollectionEditor.prototype, { - createEditField: function() { - if (!this.cached_selectTag) { - var selectTag = document.createElement("select"); - var collection = this.options.collection || []; - var optionTag; - collection.each(function(e,i) { - optionTag = document.createElement("option"); - optionTag.value = (e instanceof Array) ? e[0] : e; - if((typeof this.options.value == 'undefined') && - ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true; - if(this.options.value==optionTag.value) optionTag.selected = true; - optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e)); - selectTag.appendChild(optionTag); - }.bind(this)); - this.cached_selectTag = selectTag; - } - - this.editField = this.cached_selectTag; - if(this.options.loadTextURL) this.loadExternalText(); - this.form.appendChild(this.editField); - this.options.callback = function(form, value) { - return "value=" + encodeURIComponent(value); - } - } -}); - -// Delayed observer, like Form.Element.Observer, -// but waits for delay after last key input -// Ideal for live-search fields - -Form.Element.DelayedObserver = Class.create(); -Form.Element.DelayedObserver.prototype = { - initialize: function(element, delay, callback) { - this.delay = delay || 0.5; - this.element = $(element); - this.callback = callback; - this.timer = null; - this.lastValue = $F(this.element); - Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); - }, - delayedListener: function(event) { - if(this.lastValue == $F(this.element)) return; - if(this.timer) clearTimeout(this.timer); - this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); - this.lastValue = $F(this.element); - }, - onTimerEvent: function() { - this.timer = null; - this.callback(this.element, $F(this.element)); - } -}; diff --git a/appserver/tests/community/web/jruby/helloapp/public/javascripts/dragdrop.js b/appserver/tests/community/web/jruby/helloapp/public/javascripts/dragdrop.js deleted file mode 100644 index c71ddb82746..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/javascripts/dragdrop.js +++ /dev/null @@ -1,942 +0,0 @@ -// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// (c) 2005, 2006 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz) -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -if(typeof Effect == 'undefined') - throw("dragdrop.js requires including script.aculo.us' effects.js library"); - -var Droppables = { - drops: [], - - remove: function(element) { - this.drops = this.drops.reject(function(d) { return d.element==$(element) }); - }, - - add: function(element) { - element = $(element); - var options = Object.extend({ - greedy: true, - hoverclass: null, - tree: false - }, arguments[1] || {}); - - // cache containers - if(options.containment) { - options._containers = []; - var containment = options.containment; - if((typeof containment == 'object') && - (containment.constructor == Array)) { - containment.each( function(c) { options._containers.push($(c)) }); - } else { - options._containers.push($(containment)); - } - } - - if(options.accept) options.accept = [options.accept].flatten(); - - Element.makePositioned(element); // fix IE - options.element = element; - - this.drops.push(options); - }, - - findDeepestChild: function(drops) { - deepest = drops[0]; - - for (i = 1; i < drops.length; ++i) - if (Element.isParent(drops[i].element, deepest.element)) - deepest = drops[i]; - - return deepest; - }, - - isContained: function(element, drop) { - var containmentNode; - if(drop.tree) { - containmentNode = element.treeNode; - } else { - containmentNode = element.parentNode; - } - return drop._containers.detect(function(c) { return containmentNode == c }); - }, - - isAffected: function(point, element, drop) { - return ( - (drop.element!=element) && - ((!drop._containers) || - this.isContained(element, drop)) && - ((!drop.accept) || - (Element.classNames(element).detect( - function(v) { return drop.accept.include(v) } ) )) && - Position.within(drop.element, point[0], point[1]) ); - }, - - deactivate: function(drop) { - if(drop.hoverclass) - Element.removeClassName(drop.element, drop.hoverclass); - this.last_active = null; - }, - - activate: function(drop) { - if(drop.hoverclass) - Element.addClassName(drop.element, drop.hoverclass); - this.last_active = drop; - }, - - show: function(point, element) { - if(!this.drops.length) return; - var affected = []; - - if(this.last_active) this.deactivate(this.last_active); - this.drops.each( function(drop) { - if(Droppables.isAffected(point, element, drop)) - affected.push(drop); - }); - - if(affected.length>0) { - drop = Droppables.findDeepestChild(affected); - Position.within(drop.element, point[0], point[1]); - if(drop.onHover) - drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); - - Droppables.activate(drop); - } - }, - - fire: function(event, element) { - if(!this.last_active) return; - Position.prepare(); - - if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) - if (this.last_active.onDrop) - this.last_active.onDrop(element, this.last_active.element, event); - }, - - reset: function() { - if(this.last_active) - this.deactivate(this.last_active); - } -} - -var Draggables = { - drags: [], - observers: [], - - register: function(draggable) { - if(this.drags.length == 0) { - this.eventMouseUp = this.endDrag.bindAsEventListener(this); - this.eventMouseMove = this.updateDrag.bindAsEventListener(this); - this.eventKeypress = this.keyPress.bindAsEventListener(this); - - Event.observe(document, "mouseup", this.eventMouseUp); - Event.observe(document, "mousemove", this.eventMouseMove); - Event.observe(document, "keypress", this.eventKeypress); - } - this.drags.push(draggable); - }, - - unregister: function(draggable) { - this.drags = this.drags.reject(function(d) { return d==draggable }); - if(this.drags.length == 0) { - Event.stopObserving(document, "mouseup", this.eventMouseUp); - Event.stopObserving(document, "mousemove", this.eventMouseMove); - Event.stopObserving(document, "keypress", this.eventKeypress); - } - }, - - activate: function(draggable) { - if(draggable.options.delay) { - this._timeout = setTimeout(function() { - Draggables._timeout = null; - window.focus(); - Draggables.activeDraggable = draggable; - }.bind(this), draggable.options.delay); - } else { - window.focus(); // allows keypress events if window isn't currently focused, fails for Safari - this.activeDraggable = draggable; - } - }, - - deactivate: function() { - this.activeDraggable = null; - }, - - updateDrag: function(event) { - if(!this.activeDraggable) return; - var pointer = [Event.pointerX(event), Event.pointerY(event)]; - // Mozilla-based browsers fire successive mousemove events with - // the same coordinates, prevent needless redrawing (moz bug?) - if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; - this._lastPointer = pointer; - - this.activeDraggable.updateDrag(event, pointer); - }, - - endDrag: function(event) { - if(this._timeout) { - clearTimeout(this._timeout); - this._timeout = null; - } - if(!this.activeDraggable) return; - this._lastPointer = null; - this.activeDraggable.endDrag(event); - this.activeDraggable = null; - }, - - keyPress: function(event) { - if(this.activeDraggable) - this.activeDraggable.keyPress(event); - }, - - addObserver: function(observer) { - this.observers.push(observer); - this._cacheObserverCallbacks(); - }, - - removeObserver: function(element) { // element instead of observer fixes mem leaks - this.observers = this.observers.reject( function(o) { return o.element==element }); - this._cacheObserverCallbacks(); - }, - - notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' - if(this[eventName+'Count'] > 0) - this.observers.each( function(o) { - if(o[eventName]) o[eventName](eventName, draggable, event); - }); - if(draggable.options[eventName]) draggable.options[eventName](draggable, event); - }, - - _cacheObserverCallbacks: function() { - ['onStart','onEnd','onDrag'].each( function(eventName) { - Draggables[eventName+'Count'] = Draggables.observers.select( - function(o) { return o[eventName]; } - ).length; - }); - } -} - -/*--------------------------------------------------------------------------*/ - -var Draggable = Class.create(); -Draggable._dragging = {}; - -Draggable.prototype = { - initialize: function(element) { - var defaults = { - handle: false, - reverteffect: function(element, top_offset, left_offset) { - var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; - new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, - queue: {scope:'_draggable', position:'end'} - }); - }, - endeffect: function(element) { - var toOpacity = typeof element._opacity == 'number' ? element._opacity : 1.0; - new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, - queue: {scope:'_draggable', position:'end'}, - afterFinish: function(){ - Draggable._dragging[element] = false - } - }); - }, - zindex: 1000, - revert: false, - scroll: false, - scrollSensitivity: 20, - scrollSpeed: 15, - snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } - delay: 0 - }; - - if(!arguments[1] || typeof arguments[1].endeffect == 'undefined') - Object.extend(defaults, { - starteffect: function(element) { - element._opacity = Element.getOpacity(element); - Draggable._dragging[element] = true; - new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); - } - }); - - var options = Object.extend(defaults, arguments[1] || {}); - - this.element = $(element); - - if(options.handle && (typeof options.handle == 'string')) - this.handle = this.element.down('.'+options.handle, 0); - - if(!this.handle) this.handle = $(options.handle); - if(!this.handle) this.handle = this.element; - - if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { - options.scroll = $(options.scroll); - this._isScrollChild = Element.childOf(this.element, options.scroll); - } - - Element.makePositioned(this.element); // fix IE - - this.delta = this.currentDelta(); - this.options = options; - this.dragging = false; - - this.eventMouseDown = this.initDrag.bindAsEventListener(this); - Event.observe(this.handle, "mousedown", this.eventMouseDown); - - Draggables.register(this); - }, - - destroy: function() { - Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); - Draggables.unregister(this); - }, - - currentDelta: function() { - return([ - parseInt(Element.getStyle(this.element,'left') || '0'), - parseInt(Element.getStyle(this.element,'top') || '0')]); - }, - - initDrag: function(event) { - if(typeof Draggable._dragging[this.element] != 'undefined' && - Draggable._dragging[this.element]) return; - if(Event.isLeftClick(event)) { - // abort on form elements, fixes a Firefox issue - var src = Event.element(event); - if(src.tagName && ( - src.tagName=='INPUT' || - src.tagName=='SELECT' || - src.tagName=='OPTION' || - src.tagName=='BUTTON' || - src.tagName=='TEXTAREA')) return; - - var pointer = [Event.pointerX(event), Event.pointerY(event)]; - var pos = Position.cumulativeOffset(this.element); - this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); - - Draggables.activate(this); - Event.stop(event); - } - }, - - startDrag: function(event) { - this.dragging = true; - - if(this.options.zindex) { - this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); - this.element.style.zIndex = this.options.zindex; - } - - if(this.options.ghosting) { - this._clone = this.element.cloneNode(true); - Position.absolutize(this.element); - this.element.parentNode.insertBefore(this._clone, this.element); - } - - if(this.options.scroll) { - if (this.options.scroll == window) { - var where = this._getWindowScroll(this.options.scroll); - this.originalScrollLeft = where.left; - this.originalScrollTop = where.top; - } else { - this.originalScrollLeft = this.options.scroll.scrollLeft; - this.originalScrollTop = this.options.scroll.scrollTop; - } - } - - Draggables.notify('onStart', this, event); - - if(this.options.starteffect) this.options.starteffect(this.element); - }, - - updateDrag: function(event, pointer) { - if(!this.dragging) this.startDrag(event); - Position.prepare(); - Droppables.show(pointer, this.element); - Draggables.notify('onDrag', this, event); - - this.draw(pointer); - if(this.options.change) this.options.change(this); - - if(this.options.scroll) { - this.stopScrolling(); - - var p; - if (this.options.scroll == window) { - with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } - } else { - p = Position.page(this.options.scroll); - p[0] += this.options.scroll.scrollLeft + Position.deltaX; - p[1] += this.options.scroll.scrollTop + Position.deltaY; - p.push(p[0]+this.options.scroll.offsetWidth); - p.push(p[1]+this.options.scroll.offsetHeight); - } - var speed = [0,0]; - if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); - if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); - if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); - if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); - this.startScrolling(speed); - } - - // fix AppleWebKit rendering - if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); - - Event.stop(event); - }, - - finishDrag: function(event, success) { - this.dragging = false; - - if(this.options.ghosting) { - Position.relativize(this.element); - Element.remove(this._clone); - this._clone = null; - } - - if(success) Droppables.fire(event, this.element); - Draggables.notify('onEnd', this, event); - - var revert = this.options.revert; - if(revert && typeof revert == 'function') revert = revert(this.element); - - var d = this.currentDelta(); - if(revert && this.options.reverteffect) { - this.options.reverteffect(this.element, - d[1]-this.delta[1], d[0]-this.delta[0]); - } else { - this.delta = d; - } - - if(this.options.zindex) - this.element.style.zIndex = this.originalZ; - - if(this.options.endeffect) - this.options.endeffect(this.element); - - Draggables.deactivate(this); - Droppables.reset(); - }, - - keyPress: function(event) { - if(event.keyCode!=Event.KEY_ESC) return; - this.finishDrag(event, false); - Event.stop(event); - }, - - endDrag: function(event) { - if(!this.dragging) return; - this.stopScrolling(); - this.finishDrag(event, true); - Event.stop(event); - }, - - draw: function(point) { - var pos = Position.cumulativeOffset(this.element); - if(this.options.ghosting) { - var r = Position.realOffset(this.element); - pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; - } - - var d = this.currentDelta(); - pos[0] -= d[0]; pos[1] -= d[1]; - - if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { - pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; - pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; - } - - var p = [0,1].map(function(i){ - return (point[i]-pos[i]-this.offset[i]) - }.bind(this)); - - if(this.options.snap) { - if(typeof this.options.snap == 'function') { - p = this.options.snap(p[0],p[1],this); - } else { - if(this.options.snap instanceof Array) { - p = p.map( function(v, i) { - return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this)) - } else { - p = p.map( function(v) { - return Math.round(v/this.options.snap)*this.options.snap }.bind(this)) - } - }} - - var style = this.element.style; - if((!this.options.constraint) || (this.options.constraint=='horizontal')) - style.left = p[0] + "px"; - if((!this.options.constraint) || (this.options.constraint=='vertical')) - style.top = p[1] + "px"; - - if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering - }, - - stopScrolling: function() { - if(this.scrollInterval) { - clearInterval(this.scrollInterval); - this.scrollInterval = null; - Draggables._lastScrollPointer = null; - } - }, - - startScrolling: function(speed) { - if(!(speed[0] || speed[1])) return; - this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; - this.lastScrolled = new Date(); - this.scrollInterval = setInterval(this.scroll.bind(this), 10); - }, - - scroll: function() { - var current = new Date(); - var delta = current - this.lastScrolled; - this.lastScrolled = current; - if(this.options.scroll == window) { - with (this._getWindowScroll(this.options.scroll)) { - if (this.scrollSpeed[0] || this.scrollSpeed[1]) { - var d = delta / 1000; - this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); - } - } - } else { - this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; - this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; - } - - Position.prepare(); - Droppables.show(Draggables._lastPointer, this.element); - Draggables.notify('onDrag', this); - if (this._isScrollChild) { - Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); - Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; - Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; - if (Draggables._lastScrollPointer[0] < 0) - Draggables._lastScrollPointer[0] = 0; - if (Draggables._lastScrollPointer[1] < 0) - Draggables._lastScrollPointer[1] = 0; - this.draw(Draggables._lastScrollPointer); - } - - if(this.options.change) this.options.change(this); - }, - - _getWindowScroll: function(w) { - var T, L, W, H; - with (w.document) { - if (w.document.documentElement && documentElement.scrollTop) { - T = documentElement.scrollTop; - L = documentElement.scrollLeft; - } else if (w.document.body) { - T = body.scrollTop; - L = body.scrollLeft; - } - if (w.innerWidth) { - W = w.innerWidth; - H = w.innerHeight; - } else if (w.document.documentElement && documentElement.clientWidth) { - W = documentElement.clientWidth; - H = documentElement.clientHeight; - } else { - W = body.offsetWidth; - H = body.offsetHeight - } - } - return { top: T, left: L, width: W, height: H }; - } -} - -/*--------------------------------------------------------------------------*/ - -var SortableObserver = Class.create(); -SortableObserver.prototype = { - initialize: function(element, observer) { - this.element = $(element); - this.observer = observer; - this.lastValue = Sortable.serialize(this.element); - }, - - onStart: function() { - this.lastValue = Sortable.serialize(this.element); - }, - - onEnd: function() { - Sortable.unmark(); - if(this.lastValue != Sortable.serialize(this.element)) - this.observer(this.element) - } -} - -var Sortable = { - SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, - - sortables: {}, - - _findRootElement: function(element) { - while (element.tagName != "BODY") { - if(element.id && Sortable.sortables[element.id]) return element; - element = element.parentNode; - } - }, - - options: function(element) { - element = Sortable._findRootElement($(element)); - if(!element) return; - return Sortable.sortables[element.id]; - }, - - destroy: function(element){ - var s = Sortable.options(element); - - if(s) { - Draggables.removeObserver(s.element); - s.droppables.each(function(d){ Droppables.remove(d) }); - s.draggables.invoke('destroy'); - - delete Sortable.sortables[s.element.id]; - } - }, - - create: function(element) { - element = $(element); - var options = Object.extend({ - element: element, - tag: 'li', // assumes li children, override with tag: 'tagname' - dropOnEmpty: false, - tree: false, - treeTag: 'ul', - overlap: 'vertical', // one of 'vertical', 'horizontal' - constraint: 'vertical', // one of 'vertical', 'horizontal', false - containment: element, // also takes array of elements (or id's); or false - handle: false, // or a CSS class - only: false, - delay: 0, - hoverclass: null, - ghosting: false, - scroll: false, - scrollSensitivity: 20, - scrollSpeed: 15, - format: this.SERIALIZE_RULE, - onChange: Prototype.emptyFunction, - onUpdate: Prototype.emptyFunction - }, arguments[1] || {}); - - // clear any old sortable with same element - this.destroy(element); - - // build options for the draggables - var options_for_draggable = { - revert: true, - scroll: options.scroll, - scrollSpeed: options.scrollSpeed, - scrollSensitivity: options.scrollSensitivity, - delay: options.delay, - ghosting: options.ghosting, - constraint: options.constraint, - handle: options.handle }; - - if(options.starteffect) - options_for_draggable.starteffect = options.starteffect; - - if(options.reverteffect) - options_for_draggable.reverteffect = options.reverteffect; - else - if(options.ghosting) options_for_draggable.reverteffect = function(element) { - element.style.top = 0; - element.style.left = 0; - }; - - if(options.endeffect) - options_for_draggable.endeffect = options.endeffect; - - if(options.zindex) - options_for_draggable.zindex = options.zindex; - - // build options for the droppables - var options_for_droppable = { - overlap: options.overlap, - containment: options.containment, - tree: options.tree, - hoverclass: options.hoverclass, - onHover: Sortable.onHover - } - - var options_for_tree = { - onHover: Sortable.onEmptyHover, - overlap: options.overlap, - containment: options.containment, - hoverclass: options.hoverclass - } - - // fix for gecko engine - Element.cleanWhitespace(element); - - options.draggables = []; - options.droppables = []; - - // drop on empty handling - if(options.dropOnEmpty || options.tree) { - Droppables.add(element, options_for_tree); - options.droppables.push(element); - } - - (this.findElements(element, options) || []).each( function(e) { - // handles are per-draggable - var handle = options.handle ? - $(e).down('.'+options.handle,0) : e; - options.draggables.push( - new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); - Droppables.add(e, options_for_droppable); - if(options.tree) e.treeNode = element; - options.droppables.push(e); - }); - - if(options.tree) { - (Sortable.findTreeElements(element, options) || []).each( function(e) { - Droppables.add(e, options_for_tree); - e.treeNode = element; - options.droppables.push(e); - }); - } - - // keep reference - this.sortables[element.id] = options; - - // for onupdate - Draggables.addObserver(new SortableObserver(element, options.onUpdate)); - - }, - - // return all suitable-for-sortable elements in a guaranteed order - findElements: function(element, options) { - return Element.findChildren( - element, options.only, options.tree ? true : false, options.tag); - }, - - findTreeElements: function(element, options) { - return Element.findChildren( - element, options.only, options.tree ? true : false, options.treeTag); - }, - - onHover: function(element, dropon, overlap) { - if(Element.isParent(dropon, element)) return; - - if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { - return; - } else if(overlap>0.5) { - Sortable.mark(dropon, 'before'); - if(dropon.previousSibling != element) { - var oldParentNode = element.parentNode; - element.style.visibility = "hidden"; // fix gecko rendering - dropon.parentNode.insertBefore(element, dropon); - if(dropon.parentNode!=oldParentNode) - Sortable.options(oldParentNode).onChange(element); - Sortable.options(dropon.parentNode).onChange(element); - } - } else { - Sortable.mark(dropon, 'after'); - var nextElement = dropon.nextSibling || null; - if(nextElement != element) { - var oldParentNode = element.parentNode; - element.style.visibility = "hidden"; // fix gecko rendering - dropon.parentNode.insertBefore(element, nextElement); - if(dropon.parentNode!=oldParentNode) - Sortable.options(oldParentNode).onChange(element); - Sortable.options(dropon.parentNode).onChange(element); - } - } - }, - - onEmptyHover: function(element, dropon, overlap) { - var oldParentNode = element.parentNode; - var droponOptions = Sortable.options(dropon); - - if(!Element.isParent(dropon, element)) { - var index; - - var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); - var child = null; - - if(children) { - var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); - - for (index = 0; index < children.length; index += 1) { - if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { - offset -= Element.offsetSize (children[index], droponOptions.overlap); - } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { - child = index + 1 < children.length ? children[index + 1] : null; - break; - } else { - child = children[index]; - break; - } - } - } - - dropon.insertBefore(element, child); - - Sortable.options(oldParentNode).onChange(element); - droponOptions.onChange(element); - } - }, - - unmark: function() { - if(Sortable._marker) Sortable._marker.hide(); - }, - - mark: function(dropon, position) { - // mark on ghosting only - var sortable = Sortable.options(dropon.parentNode); - if(sortable && !sortable.ghosting) return; - - if(!Sortable._marker) { - Sortable._marker = - ($('dropmarker') || Element.extend(document.createElement('DIV'))). - hide().addClassName('dropmarker').setStyle({position:'absolute'}); - document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); - } - var offsets = Position.cumulativeOffset(dropon); - Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); - - if(position=='after') - if(sortable.overlap == 'horizontal') - Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); - else - Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); - - Sortable._marker.show(); - }, - - _tree: function(element, options, parent) { - var children = Sortable.findElements(element, options) || []; - - for (var i = 0; i < children.length; ++i) { - var match = children[i].id.match(options.format); - - if (!match) continue; - - var child = { - id: encodeURIComponent(match ? match[1] : null), - element: element, - parent: parent, - children: [], - position: parent.children.length, - container: $(children[i]).down(options.treeTag) - } - - /* Get the element containing the children and recurse over it */ - if (child.container) - this._tree(child.container, options, child) - - parent.children.push (child); - } - - return parent; - }, - - tree: function(element) { - element = $(element); - var sortableOptions = this.options(element); - var options = Object.extend({ - tag: sortableOptions.tag, - treeTag: sortableOptions.treeTag, - only: sortableOptions.only, - name: element.id, - format: sortableOptions.format - }, arguments[1] || {}); - - var root = { - id: null, - parent: null, - children: [], - container: element, - position: 0 - } - - return Sortable._tree(element, options, root); - }, - - /* Construct a [i] index for a particular node */ - _constructIndex: function(node) { - var index = ''; - do { - if (node.id) index = '[' + node.position + ']' + index; - } while ((node = node.parent) != null); - return index; - }, - - sequence: function(element) { - element = $(element); - var options = Object.extend(this.options(element), arguments[1] || {}); - - return $(this.findElements(element, options) || []).map( function(item) { - return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; - }); - }, - - setSequence: function(element, new_sequence) { - element = $(element); - var options = Object.extend(this.options(element), arguments[2] || {}); - - var nodeMap = {}; - this.findElements(element, options).each( function(n) { - if (n.id.match(options.format)) - nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; - n.parentNode.removeChild(n); - }); - - new_sequence.each(function(ident) { - var n = nodeMap[ident]; - if (n) { - n[1].appendChild(n[0]); - delete nodeMap[ident]; - } - }); - }, - - serialize: function(element) { - element = $(element); - var options = Object.extend(Sortable.options(element), arguments[1] || {}); - var name = encodeURIComponent( - (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); - - if (options.tree) { - return Sortable.tree(element, arguments[1]).children.map( function (item) { - return [name + Sortable._constructIndex(item) + "[id]=" + - encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); - }).flatten().join('&'); - } else { - return Sortable.sequence(element, arguments[1]).map( function(item) { - return name + "[]=" + encodeURIComponent(item); - }).join('&'); - } - } -} - -// Returns true if child is contained within element -Element.isParent = function(child, element) { - if (!child.parentNode || child == element) return false; - if (child.parentNode == element) return true; - return Element.isParent(child.parentNode, element); -} - -Element.findChildren = function(element, only, recursive, tagName) { - if(!element.hasChildNodes()) return null; - tagName = tagName.toUpperCase(); - if(only) only = [only].flatten(); - var elements = []; - $A(element.childNodes).each( function(e) { - if(e.tagName && e.tagName.toUpperCase()==tagName && - (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) - elements.push(e); - if(recursive) { - var grandchildren = Element.findChildren(e, only, recursive, tagName); - if(grandchildren) elements.push(grandchildren); - } - }); - - return (elements.length>0 ? elements.flatten() : []); -} - -Element.offsetSize = function (element, type) { - return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; -} diff --git a/appserver/tests/community/web/jruby/helloapp/public/javascripts/effects.js b/appserver/tests/community/web/jruby/helloapp/public/javascripts/effects.js deleted file mode 100644 index 3b02eda2b29..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/javascripts/effects.js +++ /dev/null @@ -1,1088 +0,0 @@ -// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// Contributors: -// Justin Palmer (http://encytemedia.com/) -// Mark Pilgrim (http://diveintomark.org/) -// Martin Bialasinki -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -// converts rgb() and #xxx to #xxxxxx format, -// returns self (or first argument) if not convertable -String.prototype.parseColor = function() { - var color = '#'; - if(this.slice(0,4) == 'rgb(') { - var cols = this.slice(4,this.length-1).split(','); - var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); - } else { - if(this.slice(0,1) == '#') { - if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); - if(this.length==7) color = this.toLowerCase(); - } - } - return(color.length==7 ? color : (arguments[0] || this)); -} - -/*--------------------------------------------------------------------------*/ - -Element.collectTextNodes = function(element) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); - }).flatten().join(''); -} - -Element.collectTextNodesIgnoreClass = function(element, className) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? - Element.collectTextNodesIgnoreClass(node, className) : '')); - }).flatten().join(''); -} - -Element.setContentZoom = function(element, percent) { - element = $(element); - element.setStyle({fontSize: (percent/100) + 'em'}); - if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); - return element; -} - -Element.getOpacity = function(element){ - element = $(element); - var opacity; - if (opacity = element.getStyle('opacity')) - return parseFloat(opacity); - if (opacity = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) - if(opacity[1]) return parseFloat(opacity[1]) / 100; - return 1.0; -} - -Element.setOpacity = function(element, value){ - element= $(element); - if (value == 1){ - element.setStyle({ opacity: - (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? - 0.999999 : 1.0 }); - if(/MSIE/.test(navigator.userAgent) && !window.opera) - element.setStyle({filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')}); - } else { - if(value < 0.00001) value = 0; - element.setStyle({opacity: value}); - if(/MSIE/.test(navigator.userAgent) && !window.opera) - element.setStyle( - { filter: element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + - 'alpha(opacity='+value*100+')' }); - } - return element; -} - -Element.getInlineOpacity = function(element){ - return $(element).style.opacity || ''; -} - -Element.forceRerendering = function(element) { - try { - element = $(element); - var n = document.createTextNode(' '); - element.appendChild(n); - element.removeChild(n); - } catch(e) { } -}; - -/*--------------------------------------------------------------------------*/ - -Array.prototype.call = function() { - var args = arguments; - this.each(function(f){ f.apply(this, args) }); -} - -/*--------------------------------------------------------------------------*/ - -var Effect = { - _elementDoesNotExistError: { - name: 'ElementDoesNotExistError', - message: 'The specified DOM element does not exist, but is required for this effect to operate' - }, - tagifyText: function(element) { - if(typeof Builder == 'undefined') - throw("Effect.tagifyText requires including script.aculo.us' builder.js library"); - - var tagifyStyle = 'position:relative'; - if(/MSIE/.test(navigator.userAgent) && !window.opera) tagifyStyle += ';zoom:1'; - - element = $(element); - $A(element.childNodes).each( function(child) { - if(child.nodeType==3) { - child.nodeValue.toArray().each( function(character) { - element.insertBefore( - Builder.node('span',{style: tagifyStyle}, - character == ' ' ? String.fromCharCode(160) : character), - child); - }); - Element.remove(child); - } - }); - }, - multiple: function(element, effect) { - var elements; - if(((typeof element == 'object') || - (typeof element == 'function')) && - (element.length)) - elements = element; - else - elements = $(element).childNodes; - - var options = Object.extend({ - speed: 0.1, - delay: 0.0 - }, arguments[2] || {}); - var masterDelay = options.delay; - - $A(elements).each( function(element, index) { - new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); - }); - }, - PAIRS: { - 'slide': ['SlideDown','SlideUp'], - 'blind': ['BlindDown','BlindUp'], - 'appear': ['Appear','Fade'] - }, - toggle: function(element, effect) { - element = $(element); - effect = (effect || 'appear').toLowerCase(); - var options = Object.extend({ - queue: { position:'end', scope:(element.id || 'global'), limit: 1 } - }, arguments[2] || {}); - Effect[element.visible() ? - Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); - } -}; - -var Effect2 = Effect; // deprecated - -/* ------------- transitions ------------- */ - -Effect.Transitions = { - linear: Prototype.K, - sinoidal: function(pos) { - return (-Math.cos(pos*Math.PI)/2) + 0.5; - }, - reverse: function(pos) { - return 1-pos; - }, - flicker: function(pos) { - return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; - }, - wobble: function(pos) { - return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; - }, - pulse: function(pos, pulses) { - pulses = pulses || 5; - return ( - Math.round((pos % (1/pulses)) * pulses) == 0 ? - ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) : - 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) - ); - }, - none: function(pos) { - return 0; - }, - full: function(pos) { - return 1; - } -}; - -/* ------------- core effects ------------- */ - -Effect.ScopedQueue = Class.create(); -Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), { - initialize: function() { - this.effects = []; - this.interval = null; - }, - _each: function(iterator) { - this.effects._each(iterator); - }, - add: function(effect) { - var timestamp = new Date().getTime(); - - var position = (typeof effect.options.queue == 'string') ? - effect.options.queue : effect.options.queue.position; - - switch(position) { - case 'front': - // move unstarted effects after this effect - this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { - e.startOn += effect.finishOn; - e.finishOn += effect.finishOn; - }); - break; - case 'with-last': - timestamp = this.effects.pluck('startOn').max() || timestamp; - break; - case 'end': - // start effect after last queued effect has finished - timestamp = this.effects.pluck('finishOn').max() || timestamp; - break; - } - - effect.startOn += timestamp; - effect.finishOn += timestamp; - - if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) - this.effects.push(effect); - - if(!this.interval) - this.interval = setInterval(this.loop.bind(this), 40); - }, - remove: function(effect) { - this.effects = this.effects.reject(function(e) { return e==effect }); - if(this.effects.length == 0) { - clearInterval(this.interval); - this.interval = null; - } - }, - loop: function() { - var timePos = new Date().getTime(); - this.effects.invoke('loop', timePos); - } -}); - -Effect.Queues = { - instances: $H(), - get: function(queueName) { - if(typeof queueName != 'string') return queueName; - - if(!this.instances[queueName]) - this.instances[queueName] = new Effect.ScopedQueue(); - - return this.instances[queueName]; - } -} -Effect.Queue = Effect.Queues.get('global'); - -Effect.DefaultOptions = { - transition: Effect.Transitions.sinoidal, - duration: 1.0, // seconds - fps: 25.0, // max. 25fps due to Effect.Queue implementation - sync: false, // true for combining - from: 0.0, - to: 1.0, - delay: 0.0, - queue: 'parallel' -} - -Effect.Base = function() {}; -Effect.Base.prototype = { - position: null, - start: function(options) { - this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {}); - this.currentFrame = 0; - this.state = 'idle'; - this.startOn = this.options.delay*1000; - this.finishOn = this.startOn + (this.options.duration*1000); - this.event('beforeStart'); - if(!this.options.sync) - Effect.Queues.get(typeof this.options.queue == 'string' ? - 'global' : this.options.queue.scope).add(this); - }, - loop: function(timePos) { - if(timePos >= this.startOn) { - if(timePos >= this.finishOn) { - this.render(1.0); - this.cancel(); - this.event('beforeFinish'); - if(this.finish) this.finish(); - this.event('afterFinish'); - return; - } - var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); - var frame = Math.round(pos * this.options.fps * this.options.duration); - if(frame > this.currentFrame) { - this.render(pos); - this.currentFrame = frame; - } - } - }, - render: function(pos) { - if(this.state == 'idle') { - this.state = 'running'; - this.event('beforeSetup'); - if(this.setup) this.setup(); - this.event('afterSetup'); - } - if(this.state == 'running') { - if(this.options.transition) pos = this.options.transition(pos); - pos *= (this.options.to-this.options.from); - pos += this.options.from; - this.position = pos; - this.event('beforeUpdate'); - if(this.update) this.update(pos); - this.event('afterUpdate'); - } - }, - cancel: function() { - if(!this.options.sync) - Effect.Queues.get(typeof this.options.queue == 'string' ? - 'global' : this.options.queue.scope).remove(this); - this.state = 'finished'; - }, - event: function(eventName) { - if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); - if(this.options[eventName]) this.options[eventName](this); - }, - inspect: function() { - return '#'; - } -} - -Effect.Parallel = Class.create(); -Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), { - initialize: function(effects) { - this.effects = effects || []; - this.start(arguments[1]); - }, - update: function(position) { - this.effects.invoke('render', position); - }, - finish: function(position) { - this.effects.each( function(effect) { - effect.render(1.0); - effect.cancel(); - effect.event('beforeFinish'); - if(effect.finish) effect.finish(position); - effect.event('afterFinish'); - }); - } -}); - -Effect.Event = Class.create(); -Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), { - initialize: function() { - var options = Object.extend({ - duration: 0 - }, arguments[0] || {}); - this.start(options); - }, - update: Prototype.emptyFunction -}); - -Effect.Opacity = Class.create(); -Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - // make this work on IE on elements without 'layout' - if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout)) - this.element.setStyle({zoom: 1}); - var options = Object.extend({ - from: this.element.getOpacity() || 0.0, - to: 1.0 - }, arguments[1] || {}); - this.start(options); - }, - update: function(position) { - this.element.setOpacity(position); - } -}); - -Effect.Move = Class.create(); -Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - x: 0, - y: 0, - mode: 'relative' - }, arguments[1] || {}); - this.start(options); - }, - setup: function() { - // Bug in Opera: Opera returns the "real" position of a static element or - // relative element that does not have top/left explicitly set. - // ==> Always set top and left for position relative elements in your stylesheets - // (to 0 if you do not need them) - this.element.makePositioned(); - this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); - this.originalTop = parseFloat(this.element.getStyle('top') || '0'); - if(this.options.mode == 'absolute') { - // absolute movement, so we need to calc deltaX and deltaY - this.options.x = this.options.x - this.originalLeft; - this.options.y = this.options.y - this.originalTop; - } - }, - update: function(position) { - this.element.setStyle({ - left: Math.round(this.options.x * position + this.originalLeft) + 'px', - top: Math.round(this.options.y * position + this.originalTop) + 'px' - }); - } -}); - -// for backwards compatibility -Effect.MoveBy = function(element, toTop, toLeft) { - return new Effect.Move(element, - Object.extend({ x: toLeft, y: toTop }, arguments[3] || {})); -}; - -Effect.Scale = Class.create(); -Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), { - initialize: function(element, percent) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - scaleX: true, - scaleY: true, - scaleContent: true, - scaleFromCenter: false, - scaleMode: 'box', // 'box' or 'contents' or {} with provided values - scaleFrom: 100.0, - scaleTo: percent - }, arguments[2] || {}); - this.start(options); - }, - setup: function() { - this.restoreAfterFinish = this.options.restoreAfterFinish || false; - this.elementPositioning = this.element.getStyle('position'); - - this.originalStyle = {}; - ['top','left','width','height','fontSize'].each( function(k) { - this.originalStyle[k] = this.element.style[k]; - }.bind(this)); - - this.originalTop = this.element.offsetTop; - this.originalLeft = this.element.offsetLeft; - - var fontSize = this.element.getStyle('font-size') || '100%'; - ['em','px','%','pt'].each( function(fontSizeType) { - if(fontSize.indexOf(fontSizeType)>0) { - this.fontSize = parseFloat(fontSize); - this.fontSizeType = fontSizeType; - } - }.bind(this)); - - this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; - - this.dims = null; - if(this.options.scaleMode=='box') - this.dims = [this.element.offsetHeight, this.element.offsetWidth]; - if(/^content/.test(this.options.scaleMode)) - this.dims = [this.element.scrollHeight, this.element.scrollWidth]; - if(!this.dims) - this.dims = [this.options.scaleMode.originalHeight, - this.options.scaleMode.originalWidth]; - }, - update: function(position) { - var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); - if(this.options.scaleContent && this.fontSize) - this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); - this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); - }, - finish: function(position) { - if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle); - }, - setDimensions: function(height, width) { - var d = {}; - if(this.options.scaleX) d.width = Math.round(width) + 'px'; - if(this.options.scaleY) d.height = Math.round(height) + 'px'; - if(this.options.scaleFromCenter) { - var topd = (height - this.dims[0])/2; - var leftd = (width - this.dims[1])/2; - if(this.elementPositioning == 'absolute') { - if(this.options.scaleY) d.top = this.originalTop-topd + 'px'; - if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; - } else { - if(this.options.scaleY) d.top = -topd + 'px'; - if(this.options.scaleX) d.left = -leftd + 'px'; - } - } - this.element.setStyle(d); - } -}); - -Effect.Highlight = Class.create(); -Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {}); - this.start(options); - }, - setup: function() { - // Prevent executing on elements not in the layout flow - if(this.element.getStyle('display')=='none') { this.cancel(); return; } - // Disable background image during the effect - this.oldStyle = { - backgroundImage: this.element.getStyle('background-image') }; - this.element.setStyle({backgroundImage: 'none'}); - if(!this.options.endcolor) - this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); - if(!this.options.restorecolor) - this.options.restorecolor = this.element.getStyle('background-color'); - // init color calculations - this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); - this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); - }, - update: function(position) { - this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ - return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) }); - }, - finish: function() { - this.element.setStyle(Object.extend(this.oldStyle, { - backgroundColor: this.options.restorecolor - })); - } -}); - -Effect.ScrollTo = Class.create(); -Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - this.start(arguments[1] || {}); - }, - setup: function() { - Position.prepare(); - var offsets = Position.cumulativeOffset(this.element); - if(this.options.offset) offsets[1] += this.options.offset; - var max = window.innerHeight ? - window.height - window.innerHeight : - document.body.scrollHeight - - (document.documentElement.clientHeight ? - document.documentElement.clientHeight : document.body.clientHeight); - this.scrollStart = Position.deltaY; - this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart; - }, - update: function(position) { - Position.prepare(); - window.scrollTo(Position.deltaX, - this.scrollStart + (position*this.delta)); - } -}); - -/* ------------- combination effects ------------- */ - -Effect.Fade = function(element) { - element = $(element); - var oldOpacity = element.getInlineOpacity(); - var options = Object.extend({ - from: element.getOpacity() || 1.0, - to: 0.0, - afterFinishInternal: function(effect) { - if(effect.options.to!=0) return; - effect.element.hide().setStyle({opacity: oldOpacity}); - }}, arguments[1] || {}); - return new Effect.Opacity(element,options); -} - -Effect.Appear = function(element) { - element = $(element); - var options = Object.extend({ - from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), - to: 1.0, - // force Safari to render floated elements properly - afterFinishInternal: function(effect) { - effect.element.forceRerendering(); - }, - beforeSetup: function(effect) { - effect.element.setOpacity(effect.options.from).show(); - }}, arguments[1] || {}); - return new Effect.Opacity(element,options); -} - -Effect.Puff = function(element) { - element = $(element); - var oldStyle = { - opacity: element.getInlineOpacity(), - position: element.getStyle('position'), - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height - }; - return new Effect.Parallel( - [ new Effect.Scale(element, 200, - { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], - Object.extend({ duration: 1.0, - beforeSetupInternal: function(effect) { - Position.absolutize(effect.effects[0].element) - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().setStyle(oldStyle); } - }, arguments[1] || {}) - ); -} - -Effect.BlindUp = function(element) { - element = $(element); - element.makeClipping(); - return new Effect.Scale(element, 0, - Object.extend({ scaleContent: false, - scaleX: false, - restoreAfterFinish: true, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping(); - } - }, arguments[1] || {}) - ); -} - -Effect.BlindDown = function(element) { - element = $(element); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: 0, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makeClipping().setStyle({height: '0px'}).show(); - }, - afterFinishInternal: function(effect) { - effect.element.undoClipping(); - } - }, arguments[1] || {})); -} - -Effect.SwitchOff = function(element) { - element = $(element); - var oldOpacity = element.getInlineOpacity(); - return new Effect.Appear(element, Object.extend({ - duration: 0.4, - from: 0, - transition: Effect.Transitions.flicker, - afterFinishInternal: function(effect) { - new Effect.Scale(effect.element, 1, { - duration: 0.3, scaleFromCenter: true, - scaleX: false, scaleContent: false, restoreAfterFinish: true, - beforeSetup: function(effect) { - effect.element.makePositioned().makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); - } - }) - } - }, arguments[1] || {})); -} - -Effect.DropOut = function(element) { - element = $(element); - var oldStyle = { - top: element.getStyle('top'), - left: element.getStyle('left'), - opacity: element.getInlineOpacity() }; - return new Effect.Parallel( - [ new Effect.Move(element, {x: 0, y: 100, sync: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 }) ], - Object.extend( - { duration: 0.5, - beforeSetup: function(effect) { - effect.effects[0].element.makePositioned(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); - } - }, arguments[1] || {})); -} - -Effect.Shake = function(element) { - element = $(element); - var oldStyle = { - top: element.getStyle('top'), - left: element.getStyle('left') }; - return new Effect.Move(element, - { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { - effect.element.undoPositioned().setStyle(oldStyle); - }}) }}) }}) }}) }}) }}); -} - -Effect.SlideDown = function(element) { - element = $(element).cleanWhitespace(); - // SlideDown need to have the content of the element wrapped in a container element with fixed height! - var oldInnerBottom = element.down().getStyle('bottom'); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: window.opera ? 0 : 1, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makePositioned(); - effect.element.down().makePositioned(); - if(window.opera) effect.element.setStyle({top: ''}); - effect.element.makeClipping().setStyle({height: '0px'}).show(); - }, - afterUpdateInternal: function(effect) { - effect.element.down().setStyle({bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); - }, - afterFinishInternal: function(effect) { - effect.element.undoClipping().undoPositioned(); - effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } - }, arguments[1] || {}) - ); -} - -Effect.SlideUp = function(element) { - element = $(element).cleanWhitespace(); - var oldInnerBottom = element.down().getStyle('bottom'); - return new Effect.Scale(element, window.opera ? 0 : 1, - Object.extend({ scaleContent: false, - scaleX: false, - scaleMode: 'box', - scaleFrom: 100, - restoreAfterFinish: true, - beforeStartInternal: function(effect) { - effect.element.makePositioned(); - effect.element.down().makePositioned(); - if(window.opera) effect.element.setStyle({top: ''}); - effect.element.makeClipping().show(); - }, - afterUpdateInternal: function(effect) { - effect.element.down().setStyle({bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom}); - effect.element.down().undoPositioned(); - } - }, arguments[1] || {}) - ); -} - -// Bug in opera makes the TD containing this element expand for a instance after finish -Effect.Squish = function(element) { - return new Effect.Scale(element, window.opera ? 1 : 0, { - restoreAfterFinish: true, - beforeSetup: function(effect) { - effect.element.makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping(); - } - }); -} - -Effect.Grow = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransition: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.full - }, arguments[1] || {}); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: element.getInlineOpacity() }; - - var dims = element.getDimensions(); - var initialMoveX, initialMoveY; - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - initialMoveX = initialMoveY = moveX = moveY = 0; - break; - case 'top-right': - initialMoveX = dims.width; - initialMoveY = moveY = 0; - moveX = -dims.width; - break; - case 'bottom-left': - initialMoveX = moveX = 0; - initialMoveY = dims.height; - moveY = -dims.height; - break; - case 'bottom-right': - initialMoveX = dims.width; - initialMoveY = dims.height; - moveX = -dims.width; - moveY = -dims.height; - break; - case 'center': - initialMoveX = dims.width / 2; - initialMoveY = dims.height / 2; - moveX = -dims.width / 2; - moveY = -dims.height / 2; - break; - } - - return new Effect.Move(element, { - x: initialMoveX, - y: initialMoveY, - duration: 0.01, - beforeSetup: function(effect) { - effect.element.hide().makeClipping().makePositioned(); - }, - afterFinishInternal: function(effect) { - new Effect.Parallel( - [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), - new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), - new Effect.Scale(effect.element, 100, { - scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, - sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) - ], Object.extend({ - beforeSetup: function(effect) { - effect.effects[0].element.setStyle({height: '0px'}).show(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); - } - }, options) - ) - } - }); -} - -Effect.Shrink = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransition: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.none - }, arguments[1] || {}); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: element.getInlineOpacity() }; - - var dims = element.getDimensions(); - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - moveX = moveY = 0; - break; - case 'top-right': - moveX = dims.width; - moveY = 0; - break; - case 'bottom-left': - moveX = 0; - moveY = dims.height; - break; - case 'bottom-right': - moveX = dims.width; - moveY = dims.height; - break; - case 'center': - moveX = dims.width / 2; - moveY = dims.height / 2; - break; - } - - return new Effect.Parallel( - [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), - new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), - new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) - ], Object.extend({ - beforeStartInternal: function(effect) { - effect.effects[0].element.makePositioned().makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } - }, options) - ); -} - -Effect.Pulsate = function(element) { - element = $(element); - var options = arguments[1] || {}; - var oldOpacity = element.getInlineOpacity(); - var transition = options.transition || Effect.Transitions.sinoidal; - var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) }; - reverser.bind(transition); - return new Effect.Opacity(element, - Object.extend(Object.extend({ duration: 2.0, from: 0, - afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } - }, options), {transition: reverser})); -} - -Effect.Fold = function(element) { - element = $(element); - var oldStyle = { - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height }; - element.makeClipping(); - return new Effect.Scale(element, 5, Object.extend({ - scaleContent: false, - scaleX: false, - afterFinishInternal: function(effect) { - new Effect.Scale(element, 1, { - scaleContent: false, - scaleY: false, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().setStyle(oldStyle); - } }); - }}, arguments[1] || {})); -}; - -Effect.Morph = Class.create(); -Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - style: '' - }, arguments[1] || {}); - this.start(options); - }, - setup: function(){ - function parseColor(color){ - if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; - color = color.parseColor(); - return $R(0,2).map(function(i){ - return parseInt( color.slice(i*2+1,i*2+3), 16 ) - }); - } - this.transforms = this.options.style.parseStyle().map(function(property){ - var originalValue = this.element.getStyle(property[0]); - return $H({ - style: property[0], - originalValue: property[1].unit=='color' ? - parseColor(originalValue) : parseFloat(originalValue || 0), - targetValue: property[1].unit=='color' ? - parseColor(property[1].value) : property[1].value, - unit: property[1].unit - }); - }.bind(this)).reject(function(transform){ - return ( - (transform.originalValue == transform.targetValue) || - ( - transform.unit != 'color' && - (isNaN(transform.originalValue) || isNaN(transform.targetValue)) - ) - ) - }); - }, - update: function(position) { - var style = $H(), value = null; - this.transforms.each(function(transform){ - value = transform.unit=='color' ? - $R(0,2).inject('#',function(m,v,i){ - return m+(Math.round(transform.originalValue[i]+ - (transform.targetValue[i] - transform.originalValue[i])*position)).toColorPart() }) : - transform.originalValue + Math.round( - ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit; - style[transform.style] = value; - }); - this.element.setStyle(style); - } -}); - -Effect.Transform = Class.create(); -Object.extend(Effect.Transform.prototype, { - initialize: function(tracks){ - this.tracks = []; - this.options = arguments[1] || {}; - this.addTracks(tracks); - }, - addTracks: function(tracks){ - tracks.each(function(track){ - var data = $H(track).values().first(); - this.tracks.push($H({ - ids: $H(track).keys().first(), - effect: Effect.Morph, - options: { style: data } - })); - }.bind(this)); - return this; - }, - play: function(){ - return new Effect.Parallel( - this.tracks.map(function(track){ - var elements = [$(track.ids) || $$(track.ids)].flatten(); - return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) }); - }).flatten(), - this.options - ); - } -}); - -Element.CSS_PROPERTIES = ['azimuth', 'backgroundAttachment', 'backgroundColor', 'backgroundImage', - 'backgroundPosition', 'backgroundRepeat', 'borderBottomColor', 'borderBottomStyle', - 'borderBottomWidth', 'borderCollapse', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', - 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderSpacing', 'borderTopColor', - 'borderTopStyle', 'borderTopWidth', 'bottom', 'captionSide', 'clear', 'clip', 'color', 'content', - 'counterIncrement', 'counterReset', 'cssFloat', 'cueAfter', 'cueBefore', 'cursor', 'direction', - 'display', 'elevation', 'emptyCells', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', - 'fontStyle', 'fontVariant', 'fontWeight', 'height', 'left', 'letterSpacing', 'lineHeight', - 'listStyleImage', 'listStylePosition', 'listStyleType', 'marginBottom', 'marginLeft', 'marginRight', - 'marginTop', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'opacity', - 'orphans', 'outlineColor', 'outlineOffset', 'outlineStyle', 'outlineWidth', 'overflowX', 'overflowY', - 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'page', 'pageBreakAfter', 'pageBreakBefore', - 'pageBreakInside', 'pauseAfter', 'pauseBefore', 'pitch', 'pitchRange', 'position', 'quotes', - 'richness', 'right', 'size', 'speakHeader', 'speakNumeral', 'speakPunctuation', 'speechRate', 'stress', - 'tableLayout', 'textAlign', 'textDecoration', 'textIndent', 'textShadow', 'textTransform', 'top', - 'unicodeBidi', 'verticalAlign', 'visibility', 'voiceFamily', 'volume', 'whiteSpace', 'widows', - 'width', 'wordSpacing', 'zIndex']; - -Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; - -String.prototype.parseStyle = function(){ - var element = Element.extend(document.createElement('div')); - element.innerHTML = '

    '; - var style = element.down().style, styleRules = $H(); - - Element.CSS_PROPERTIES.each(function(property){ - if(style[property]) styleRules[property] = style[property]; - }); - - var result = $H(); - - styleRules.each(function(pair){ - var property = pair[0], value = pair[1], unit = null; - - if(value.parseColor('#zzzzzz') != '#zzzzzz') { - value = value.parseColor(); - unit = 'color'; - } else if(Element.CSS_LENGTH.test(value)) - var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), - value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; - - result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); - }.bind(this)); - - return result; -}; - -Element.morph = function(element, style) { - new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {})); - return element; -}; - -['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom', - 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each( - function(f) { Element.Methods[f] = Element[f]; } -); - -Element.Methods.visualEffect = function(element, effect, options) { - s = effect.gsub(/_/, '-').camelize(); - effect_class = s.charAt(0).toUpperCase() + s.substring(1); - new Effect[effect_class](element, options); - return $(element); -}; - -Element.addMethods(); \ No newline at end of file diff --git a/appserver/tests/community/web/jruby/helloapp/public/javascripts/prototype.js b/appserver/tests/community/web/jruby/helloapp/public/javascripts/prototype.js deleted file mode 100644 index 505822177b8..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/javascripts/prototype.js +++ /dev/null @@ -1,2515 +0,0 @@ -/* Prototype JavaScript framework, version 1.5.0 - * (c) 2005-2007 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.5.0', - BrowserFeatures: { - XPath: !!document.evaluate - }, - - ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', - emptyFunction: function() {}, - K: function(x) { return x } -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (var property in source) { - destination[property] = source[property]; - } - return destination; -} - -Object.extend(Object, { - inspect: function(object) { - try { - if (object === undefined) return 'undefined'; - if (object === null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } - }, - - keys: function(object) { - var keys = []; - for (var property in object) - keys.push(property); - return keys; - }, - - values: function(object) { - var values = []; - for (var property in object) - values.push(object[property]); - return values; - }, - - clone: function(object) { - return Object.extend({}, object); - } -}); - -Function.prototype.bind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this, args = $A(arguments), object = args.shift(); - return function(event) { - return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments))); - } -} - -Object.extend(Number.prototype, { - toColorPart: function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - } -}); - -var Try = { - these: function() { - var returnValue; - - for (var i = 0, length = arguments.length; i < length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - stop: function() { - if (!this.timer) return; - clearInterval(this.timer); - this.timer = null; - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(this); - } finally { - this.currentlyExecuting = false; - } - } - } -} -String.interpret = function(value){ - return value == null ? '' : String(value); -} - -Object.extend(String.prototype, { - gsub: function(pattern, replacement) { - var result = '', source = this, match; - replacement = arguments.callee.prepareReplacement(replacement); - - while (source.length > 0) { - if (match = source.match(pattern)) { - result += source.slice(0, match.index); - result += String.interpret(replacement(match)); - source = source.slice(match.index + match[0].length); - } else { - result += source, source = ''; - } - } - return result; - }, - - sub: function(pattern, replacement, count) { - replacement = this.gsub.prepareReplacement(replacement); - count = count === undefined ? 1 : count; - - return this.gsub(pattern, function(match) { - if (--count < 0) return match[0]; - return replacement(match); - }); - }, - - scan: function(pattern, iterator) { - this.gsub(pattern, iterator); - return this; - }, - - truncate: function(length, truncation) { - length = length || 30; - truncation = truncation === undefined ? '...' : truncation; - return this.length > length ? - this.slice(0, length - truncation.length) + truncation : this; - }, - - strip: function() { - return this.replace(/^\s+/, '').replace(/\s+$/, ''); - }, - - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(function(script) { return eval(script) }); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? (div.childNodes.length > 1 ? - $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) : - div.childNodes[0].nodeValue) : ''; - }, - - toQueryParams: function(separator) { - var match = this.strip().match(/([^?#]*)(#.*)?$/); - if (!match) return {}; - - return match[1].split(separator || '&').inject({}, function(hash, pair) { - if ((pair = pair.split('='))[0]) { - var name = decodeURIComponent(pair[0]); - var value = pair[1] ? decodeURIComponent(pair[1]) : undefined; - - if (hash[name] !== undefined) { - if (hash[name].constructor != Array) - hash[name] = [hash[name]]; - if (value) hash[name].push(value); - } - else hash[name] = value; - } - return hash; - }); - }, - - toArray: function() { - return this.split(''); - }, - - succ: function() { - return this.slice(0, this.length - 1) + - String.fromCharCode(this.charCodeAt(this.length - 1) + 1); - }, - - camelize: function() { - var parts = this.split('-'), len = parts.length; - if (len == 1) return parts[0]; - - var camelized = this.charAt(0) == '-' - ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) - : parts[0]; - - for (var i = 1; i < len; i++) - camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); - - return camelized; - }, - - capitalize: function(){ - return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); - }, - - underscore: function() { - return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); - }, - - dasherize: function() { - return this.gsub(/_/,'-'); - }, - - inspect: function(useDoubleQuotes) { - var escapedString = this.replace(/\\/g, '\\\\'); - if (useDoubleQuotes) - return '"' + escapedString.replace(/"/g, '\\"') + '"'; - else - return "'" + escapedString.replace(/'/g, '\\\'') + "'"; - } -}); - -String.prototype.gsub.prepareReplacement = function(replacement) { - if (typeof replacement == 'function') return replacement; - var template = new Template(replacement); - return function(match) { return template.evaluate(match) }; -} - -String.prototype.parseQuery = String.prototype.toQueryParams; - -var Template = Class.create(); -Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; -Template.prototype = { - initialize: function(template, pattern) { - this.template = template.toString(); - this.pattern = pattern || Template.Pattern; - }, - - evaluate: function(object) { - return this.template.gsub(this.pattern, function(match) { - var before = match[1]; - if (before == '\\') return match[2]; - return before + String.interpret(object[match[3]]); - }); - } -} - -var $break = new Object(); -var $continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != $continue) throw e; - } - }); - } catch (e) { - if (e != $break) throw e; - } - return this; - }, - - eachSlice: function(number, iterator) { - var index = -number, slices = [], array = this.toArray(); - while ((index += number) < array.length) - slices.push(array.slice(index, index+number)); - return slices.map(iterator); - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - result = result && !!(iterator || Prototype.K)(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator) { - var result = false; - this.each(function(value, index) { - if (result = !!(iterator || Prototype.K)(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push((iterator || Prototype.K)(value, index)); - }); - return results; - }, - - detect: function(iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inGroupsOf: function(number, fillWith) { - fillWith = fillWith === undefined ? null : fillWith; - return this.eachSlice(number, function(slice) { - while(slice.length < number) slice.push(fillWith); - return slice; - }); - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.map(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (result == undefined || value >= result) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (result == undefined || value < result) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.map(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.map(); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - return iterator(collections.pluck(index)); - }); - }, - - size: function() { - return this.toArray().length; - }, - - inspect: function() { - return '#'; - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); -var $A = Array.from = function(iterable) { - if (!iterable) return []; - if (iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0, length = iterable.length; i < length; i++) - results.push(iterable[i]); - return results; - } -} - -Object.extend(Array.prototype, Enumerable); - -if (!Array.prototype._reverse) - Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0, length = this.length; i < length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(value && value.constructor == Array ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - indexOf: function(object) { - for (var i = 0, length = this.length; i < length; i++) - if (this[i] == object) return i; - return -1; - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - reduce: function() { - return this.length > 1 ? this : this[0]; - }, - - uniq: function() { - return this.inject([], function(array, value) { - return array.include(value) ? array : array.concat([value]); - }); - }, - - clone: function() { - return [].concat(this); - }, - - size: function() { - return this.length; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - } -}); - -Array.prototype.toArray = Array.prototype.clone; - -function $w(string){ - string = string.strip(); - return string ? string.split(/\s+/) : []; -} - -if(window.opera){ - Array.prototype.concat = function(){ - var array = []; - for(var i = 0, length = this.length; i < length; i++) array.push(this[i]); - for(var i = 0, length = arguments.length; i < length; i++) { - if(arguments[i].constructor == Array) { - for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) - array.push(arguments[i][j]); - } else { - array.push(arguments[i]); - } - } - return array; - } -} -var Hash = function(obj) { - Object.extend(this, obj || {}); -}; - -Object.extend(Hash, { - toQueryString: function(obj) { - var parts = []; - - this.prototype._each.call(obj, function(pair) { - if (!pair.key) return; - - if (pair.value && pair.value.constructor == Array) { - var values = pair.value.compact(); - if (values.length < 2) pair.value = values.reduce(); - else { - key = encodeURIComponent(pair.key); - values.each(function(value) { - value = value != undefined ? encodeURIComponent(value) : ''; - parts.push(key + '=' + encodeURIComponent(value)); - }); - return; - } - } - if (pair.value == undefined) pair[1] = ''; - parts.push(pair.map(encodeURIComponent).join('=')); - }); - - return parts.join('&'); - } -}); - -Object.extend(Hash.prototype, Enumerable); -Object.extend(Hash.prototype, { - _each: function(iterator) { - for (var key in this) { - var value = this[key]; - if (value && value == Hash.prototype[key]) continue; - - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - merge: function(hash) { - return $H(hash).inject(this, function(mergedHash, pair) { - mergedHash[pair.key] = pair.value; - return mergedHash; - }); - }, - - remove: function() { - var result; - for(var i = 0, length = arguments.length; i < length; i++) { - var value = this[arguments[i]]; - if (value !== undefined){ - if (result === undefined) result = value; - else { - if (result.constructor != Array) result = [result]; - result.push(value) - } - } - delete this[arguments[i]]; - } - return result; - }, - - toQueryString: function() { - return Hash.toQueryString(this); - }, - - inspect: function() { - return '#'; - } -}); - -function $H(object) { - if (object && object.constructor == Hash) return object; - return new Hash(object); -}; -ObjectRange = Class.create(); -Object.extend(ObjectRange.prototype, Enumerable); -Object.extend(ObjectRange.prototype, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - while (this.include(value)) { - iterator(value); - value = value.succ(); - } - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -} - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new XMLHttpRequest()}, - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')} - ) || false; - }, - - activeRequestCount: 0 -} - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responder) { - if (!this.include(responder)) - this.responders.push(responder); - }, - - unregister: function(responder) { - this.responders = this.responders.without(responder); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (typeof responder[callback] == 'function') { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) {} - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { - Ajax.activeRequestCount++; - }, - onComplete: function() { - Ajax.activeRequestCount--; - } -}); - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - contentType: 'application/x-www-form-urlencoded', - encoding: 'UTF-8', - parameters: '' - } - Object.extend(this.options, options || {}); - - this.options.method = this.options.method.toLowerCase(); - if (typeof this.options.parameters == 'string') - this.options.parameters = this.options.parameters.toQueryParams(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - _complete: false, - - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - this.url = url; - this.method = this.options.method; - var params = this.options.parameters; - - if (!['get', 'post'].include(this.method)) { - // simulate other verbs over post - params['_method'] = this.method; - this.method = 'post'; - } - - params = Hash.toQueryString(params); - if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_=' - - // when GET, append parameters to URL - if (this.method == 'get' && params) - this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params; - - try { - Ajax.Responders.dispatch('onCreate', this, this.transport); - - this.transport.open(this.method.toUpperCase(), this.url, - this.options.asynchronous); - - if (this.options.asynchronous) - setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10); - - this.transport.onreadystatechange = this.onStateChange.bind(this); - this.setRequestHeaders(); - - var body = this.method == 'post' ? (this.options.postBody || params) : null; - - this.transport.send(body); - - /* Force Firefox to handle ready state 4 for synchronous requests */ - if (!this.options.asynchronous && this.transport.overrideMimeType) - this.onStateChange(); - - } - catch (e) { - this.dispatchException(e); - } - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState > 1 && !((readyState == 4) && this._complete)) - this.respondToReadyState(this.transport.readyState); - }, - - setRequestHeaders: function() { - var headers = { - 'X-Requested-With': 'XMLHttpRequest', - 'X-Prototype-Version': Prototype.Version, - 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' - }; - - if (this.method == 'post') { - headers['Content-type'] = this.options.contentType + - (this.options.encoding ? '; charset=' + this.options.encoding : ''); - - /* Force "Connection: close" for older Mozilla browsers to work - * around a bug where XMLHttpRequest sends an incorrect - * Content-length header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType && - (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) - headers['Connection'] = 'close'; - } - - // user-defined headers - if (typeof this.options.requestHeaders == 'object') { - var extras = this.options.requestHeaders; - - if (typeof extras.push == 'function') - for (var i = 0, length = extras.length; i < length; i += 2) - headers[extras[i]] = extras[i+1]; - else - $H(extras).each(function(pair) { headers[pair.key] = pair.value }); - } - - for (var name in headers) - this.transport.setRequestHeader(name, headers[name]); - }, - - success: function() { - return !this.transport.status - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - respondToReadyState: function(readyState) { - var state = Ajax.Request.Events[readyState]; - var transport = this.transport, json = this.evalJSON(); - - if (state == 'Complete') { - try { - this._complete = true; - (this.options['on' + this.transport.status] - || this.options['on' + (this.success() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(transport, json); - } catch (e) { - this.dispatchException(e); - } - - if ((this.getHeader('Content-type') || 'text/javascript').strip(). - match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) - this.evalResponse(); - } - - try { - (this.options['on' + state] || Prototype.emptyFunction)(transport, json); - Ajax.Responders.dispatch('on' + state, this, transport, json); - } catch (e) { - this.dispatchException(e); - } - - if (state == 'Complete') { - // avoid memory leak in MSIE: clean up - this.transport.onreadystatechange = Prototype.emptyFunction; - } - }, - - getHeader: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) { return null } - }, - - evalJSON: function() { - try { - var json = this.getHeader('X-JSON'); - return json ? eval('(' + json + ')') : null; - } catch (e) { return null } - }, - - evalResponse: function() { - try { - return eval(this.transport.responseText); - } catch (e) { - this.dispatchException(e); - } - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Updater = Class.create(); - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.container = { - success: (container.success || container), - failure: (container.failure || (container.success ? null : container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function(transport, param) { - this.updateContent(); - onComplete(transport, param); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.container[this.success() ? 'success' : 'failure']; - var response = this.transport.responseText; - - if (!this.options.evalScripts) response = response.stripScripts(); - - if (receiver = $(receiver)) { - if (this.options.insertion) - new this.options.insertion(receiver, response); - else - receiver.update(response); - } - - if (this.success()) { - if (this.onComplete) - setTimeout(this.onComplete.bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.options.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -function $(element) { - if (arguments.length > 1) { - for (var i = 0, elements = [], length = arguments.length; i < length; i++) - elements.push($(arguments[i])); - return elements; - } - if (typeof element == 'string') - element = document.getElementById(element); - return Element.extend(element); -} - -if (Prototype.BrowserFeatures.XPath) { - document._getElementsByXPath = function(expression, parentElement) { - var results = []; - var query = document.evaluate(expression, $(parentElement) || document, - null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - for (var i = 0, length = query.snapshotLength; i < length; i++) - results.push(query.snapshotItem(i)); - return results; - }; -} - -document.getElementsByClassName = function(className, parentElement) { - if (Prototype.BrowserFeatures.XPath) { - var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]"; - return document._getElementsByXPath(q, parentElement); - } else { - var children = ($(parentElement) || document.body).getElementsByTagName('*'); - var elements = [], child; - for (var i = 0, length = children.length; i < length; i++) { - child = children[i]; - if (Element.hasClassName(child, className)) - elements.push(Element.extend(child)); - } - return elements; - } -}; - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) - var Element = new Object(); - -Element.extend = function(element) { - if (!element || _nativeExtensions || element.nodeType == 3) return element; - - if (!element._extended && element.tagName && element != window) { - var methods = Object.clone(Element.Methods), cache = Element.extend.cache; - - if (element.tagName == 'FORM') - Object.extend(methods, Form.Methods); - if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName)) - Object.extend(methods, Form.Element.Methods); - - Object.extend(methods, Element.Methods.Simulated); - - for (var property in methods) { - var value = methods[property]; - if (typeof value == 'function' && !(property in element)) - element[property] = cache.findOrStore(value); - } - } - - element._extended = true; - return element; -}; - -Element.extend.cache = { - findOrStore: function(value) { - return this[value] = this[value] || function() { - return value.apply(null, [this].concat($A(arguments))); - } - } -}; - -Element.Methods = { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function(element) { - element = $(element); - Element[Element.visible(element) ? 'hide' : 'show'](element); - return element; - }, - - hide: function(element) { - $(element).style.display = 'none'; - return element; - }, - - show: function(element) { - $(element).style.display = ''; - return element; - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - return element; - }, - - update: function(element, html) { - html = typeof html == 'undefined' ? '' : html.toString(); - $(element).innerHTML = html.stripScripts(); - setTimeout(function() {html.evalScripts()}, 10); - return element; - }, - - replace: function(element, html) { - element = $(element); - html = typeof html == 'undefined' ? '' : html.toString(); - if (element.outerHTML) { - element.outerHTML = html.stripScripts(); - } else { - var range = element.ownerDocument.createRange(); - range.selectNodeContents(element); - element.parentNode.replaceChild( - range.createContextualFragment(html.stripScripts()), element); - } - setTimeout(function() {html.evalScripts()}, 10); - return element; - }, - - inspect: function(element) { - element = $(element); - var result = '<' + element.tagName.toLowerCase(); - $H({'id': 'id', 'className': 'class'}).each(function(pair) { - var property = pair.first(), attribute = pair.last(); - var value = (element[property] || '').toString(); - if (value) result += ' ' + attribute + '=' + value.inspect(true); - }); - return result + '>'; - }, - - recursivelyCollect: function(element, property) { - element = $(element); - var elements = []; - while (element = element[property]) - if (element.nodeType == 1) - elements.push(Element.extend(element)); - return elements; - }, - - ancestors: function(element) { - return $(element).recursivelyCollect('parentNode'); - }, - - descendants: function(element) { - return $A($(element).getElementsByTagName('*')); - }, - - immediateDescendants: function(element) { - if (!(element = $(element).firstChild)) return []; - while (element && element.nodeType != 1) element = element.nextSibling; - if (element) return [element].concat($(element).nextSiblings()); - return []; - }, - - previousSiblings: function(element) { - return $(element).recursivelyCollect('previousSibling'); - }, - - nextSiblings: function(element) { - return $(element).recursivelyCollect('nextSibling'); - }, - - siblings: function(element) { - element = $(element); - return element.previousSiblings().reverse().concat(element.nextSiblings()); - }, - - match: function(element, selector) { - if (typeof selector == 'string') - selector = new Selector(selector); - return selector.match($(element)); - }, - - up: function(element, expression, index) { - return Selector.findElement($(element).ancestors(), expression, index); - }, - - down: function(element, expression, index) { - return Selector.findElement($(element).descendants(), expression, index); - }, - - previous: function(element, expression, index) { - return Selector.findElement($(element).previousSiblings(), expression, index); - }, - - next: function(element, expression, index) { - return Selector.findElement($(element).nextSiblings(), expression, index); - }, - - getElementsBySelector: function() { - var args = $A(arguments), element = $(args.shift()); - return Selector.findChildElements(element, args); - }, - - getElementsByClassName: function(element, className) { - return document.getElementsByClassName(className, element); - }, - - readAttribute: function(element, name) { - element = $(element); - if (document.all && !window.opera) { - var t = Element._attributeTranslations; - if (t.values[name]) return t.values[name](element, name); - if (t.names[name]) name = t.names[name]; - var attribute = element.attributes[name]; - if(attribute) return attribute.nodeValue; - } - return element.getAttribute(name); - }, - - getHeight: function(element) { - return $(element).getDimensions().height; - }, - - getWidth: function(element) { - return $(element).getDimensions().width; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - var elementClassName = element.className; - if (elementClassName.length == 0) return false; - if (elementClassName == className || - elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) - return true; - return false; - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - Element.classNames(element).add(className); - return element; - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - Element.classNames(element).remove(className); - return element; - }, - - toggleClassName: function(element, className) { - if (!(element = $(element))) return; - Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className); - return element; - }, - - observe: function() { - Event.observe.apply(Event, arguments); - return $A(arguments).first(); - }, - - stopObserving: function() { - Event.stopObserving.apply(Event, arguments); - return $A(arguments).first(); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - var node = element.firstChild; - while (node) { - var nextNode = node.nextSibling; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - element.removeChild(node); - node = nextNode; - } - return element; - }, - - empty: function(element) { - return $(element).innerHTML.match(/^\s*$/); - }, - - descendantOf: function(element, ancestor) { - element = $(element), ancestor = $(ancestor); - while (element = element.parentNode) - if (element == ancestor) return true; - return false; - }, - - scrollTo: function(element) { - element = $(element); - var pos = Position.cumulativeOffset(element); - window.scrollTo(pos[0], pos[1]); - return element; - }, - - getStyle: function(element, style) { - element = $(element); - if (['float','cssFloat'].include(style)) - style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat'); - style = style.camelize(); - var value = element.style[style]; - if (!value) { - if (document.defaultView && document.defaultView.getComputedStyle) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css[style] : null; - } else if (element.currentStyle) { - value = element.currentStyle[style]; - } - } - - if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none')) - value = element['offset'+style.capitalize()] + 'px'; - - if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) - if (Element.getStyle(element, 'position') == 'static') value = 'auto'; - if(style == 'opacity') { - if(value) return parseFloat(value); - if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) - if(value[1]) return parseFloat(value[1]) / 100; - return 1.0; - } - return value == 'auto' ? null : value; - }, - - setStyle: function(element, style) { - element = $(element); - for (var name in style) { - var value = style[name]; - if(name == 'opacity') { - if (value == 1) { - value = (/Gecko/.test(navigator.userAgent) && - !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0; - if(/MSIE/.test(navigator.userAgent) && !window.opera) - element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); - } else if(value == '') { - if(/MSIE/.test(navigator.userAgent) && !window.opera) - element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); - } else { - if(value < 0.00001) value = 0; - if(/MSIE/.test(navigator.userAgent) && !window.opera) - element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + - 'alpha(opacity='+value*100+')'; - } - } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat'; - element.style[name.camelize()] = value; - } - return element; - }, - - getDimensions: function(element) { - element = $(element); - var display = $(element).getStyle('display'); - if (display != 'none' && display != null) // Safari bug - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - var originalDisplay = els.display; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = 'block'; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = originalDisplay; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - return element; - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - return element; - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return element; - element._overflow = element.style.overflow || 'auto'; - if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') - element.style.overflow = 'hidden'; - return element; - }, - - undoClipping: function(element) { - element = $(element); - if (!element._overflow) return element; - element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; - element._overflow = null; - return element; - } -}; - -Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf}); - -Element._attributeTranslations = {}; - -Element._attributeTranslations.names = { - colspan: "colSpan", - rowspan: "rowSpan", - valign: "vAlign", - datetime: "dateTime", - accesskey: "accessKey", - tabindex: "tabIndex", - enctype: "encType", - maxlength: "maxLength", - readonly: "readOnly", - longdesc: "longDesc" -}; - -Element._attributeTranslations.values = { - _getAttr: function(element, attribute) { - return element.getAttribute(attribute, 2); - }, - - _flag: function(element, attribute) { - return $(element).hasAttribute(attribute) ? attribute : null; - }, - - style: function(element) { - return element.style.cssText.toLowerCase(); - }, - - title: function(element) { - var node = element.getAttributeNode('title'); - return node.specified ? node.nodeValue : null; - } -}; - -Object.extend(Element._attributeTranslations.values, { - href: Element._attributeTranslations.values._getAttr, - src: Element._attributeTranslations.values._getAttr, - disabled: Element._attributeTranslations.values._flag, - checked: Element._attributeTranslations.values._flag, - readonly: Element._attributeTranslations.values._flag, - multiple: Element._attributeTranslations.values._flag -}); - -Element.Methods.Simulated = { - hasAttribute: function(element, attribute) { - var t = Element._attributeTranslations; - attribute = t.names[attribute] || attribute; - return $(element).getAttributeNode(attribute).specified; - } -}; - -// IE is missing .innerHTML support for TABLE-related elements -if (document.all && !window.opera){ - Element.Methods.update = function(element, html) { - element = $(element); - html = typeof html == 'undefined' ? '' : html.toString(); - var tagName = element.tagName.toUpperCase(); - if (['THEAD','TBODY','TR','TD'].include(tagName)) { - var div = document.createElement('div'); - switch (tagName) { - case 'THEAD': - case 'TBODY': - div.innerHTML = '' + html.stripScripts() + '
    '; - depth = 2; - break; - case 'TR': - div.innerHTML = '' + html.stripScripts() + '
    '; - depth = 3; - break; - case 'TD': - div.innerHTML = '
    ' + html.stripScripts() + '
    '; - depth = 4; - } - $A(element.childNodes).each(function(node){ - element.removeChild(node) - }); - depth.times(function(){ div = div.firstChild }); - - $A(div.childNodes).each( - function(node){ element.appendChild(node) }); - } else { - element.innerHTML = html.stripScripts(); - } - setTimeout(function() {html.evalScripts()}, 10); - return element; - } -}; - -Object.extend(Element, Element.Methods); - -var _nativeExtensions = false; - -if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { - var className = 'HTML' + tag + 'Element'; - if(window[className]) return; - var klass = window[className] = {}; - klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; - }); - -Element.addMethods = function(methods) { - Object.extend(Element.Methods, methods || {}); - - function copy(methods, destination, onlyIfAbsent) { - onlyIfAbsent = onlyIfAbsent || false; - var cache = Element.extend.cache; - for (var property in methods) { - var value = methods[property]; - if (!onlyIfAbsent || !(property in destination)) - destination[property] = cache.findOrStore(value); - } - } - - if (typeof HTMLElement != 'undefined') { - copy(Element.Methods, HTMLElement.prototype); - copy(Element.Methods.Simulated, HTMLElement.prototype, true); - copy(Form.Methods, HTMLFormElement.prototype); - [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) { - copy(Form.Element.Methods, klass.prototype); - }); - _nativeExtensions = true; - } -} - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content.stripScripts(); - - if (this.adjacency && this.element.insertAdjacentHTML) { - try { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } catch (e) { - var tagName = this.element.tagName.toUpperCase(); - if (['TBODY', 'TR'].include(tagName)) { - this.insertContent(this.contentFromAnonymousTable()); - } else { - throw e; - } - } - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.insertContent([this.range.createContextualFragment(this.content)]); - } - - setTimeout(function() {content.evalScripts()}, 10); - }, - - contentFromAnonymousTable: function() { - var div = document.createElement('div'); - div.innerHTML = '' + this.content + '
    '; - return $A(div.childNodes[0].childNodes[0].childNodes); - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, this.element); - }).bind(this)); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function(fragments) { - fragments.reverse(false).each((function(fragment) { - this.element.insertBefore(fragment, this.element.firstChild); - }).bind(this)); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.appendChild(fragment); - }).bind(this)); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, - this.element.nextSibling); - }).bind(this)); - } -}); - -/*--------------------------------------------------------------------------*/ - -Element.ClassNames = Class.create(); -Element.ClassNames.prototype = { - initialize: function(element) { - this.element = $(element); - }, - - _each: function(iterator) { - this.element.className.split(/\s+/).select(function(name) { - return name.length > 0; - })._each(iterator); - }, - - set: function(className) { - this.element.className = className; - }, - - add: function(classNameToAdd) { - if (this.include(classNameToAdd)) return; - this.set($A(this).concat(classNameToAdd).join(' ')); - }, - - remove: function(classNameToRemove) { - if (!this.include(classNameToRemove)) return; - this.set($A(this).without(classNameToRemove).join(' ')); - }, - - toString: function() { - return $A(this).join(' '); - } -}; - -Object.extend(Element.ClassNames.prototype, Enumerable); -var Selector = Class.create(); -Selector.prototype = { - initialize: function(expression) { - this.params = {classNames: []}; - this.expression = expression.toString().strip(); - this.parseExpression(); - this.compileMatcher(); - }, - - parseExpression: function() { - function abort(message) { throw 'Parse error in selector: ' + message; } - - if (this.expression == '') abort('empty expression'); - - var params = this.params, expr = this.expression, match, modifier, clause, rest; - while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) { - params.attributes = params.attributes || []; - params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''}); - expr = match[1]; - } - - if (expr == '*') return this.params.wildcard = true; - - while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { - modifier = match[1], clause = match[2], rest = match[3]; - switch (modifier) { - case '#': params.id = clause; break; - case '.': params.classNames.push(clause); break; - case '': - case undefined: params.tagName = clause.toUpperCase(); break; - default: abort(expr.inspect()); - } - expr = rest; - } - - if (expr.length > 0) abort(expr.inspect()); - }, - - buildMatchExpression: function() { - var params = this.params, conditions = [], clause; - - if (params.wildcard) - conditions.push('true'); - if (clause = params.id) - conditions.push('element.readAttribute("id") == ' + clause.inspect()); - if (clause = params.tagName) - conditions.push('element.tagName.toUpperCase() == ' + clause.inspect()); - if ((clause = params.classNames).length > 0) - for (var i = 0, length = clause.length; i < length; i++) - conditions.push('element.hasClassName(' + clause[i].inspect() + ')'); - if (clause = params.attributes) { - clause.each(function(attribute) { - var value = 'element.readAttribute(' + attribute.name.inspect() + ')'; - var splitValueBy = function(delimiter) { - return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; - } - - switch (attribute.operator) { - case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; - case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; - case '|=': conditions.push( - splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() - ); break; - case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; - case '': - case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break; - default: throw 'Unknown operator ' + attribute.operator + ' in selector'; - } - }); - } - - return conditions.join(' && '); - }, - - compileMatcher: function() { - this.match = new Function('element', 'if (!element.tagName) return false; \ - element = $(element); \ - return ' + this.buildMatchExpression()); - }, - - findElements: function(scope) { - var element; - - if (element = $(this.params.id)) - if (this.match(element)) - if (!scope || Element.childOf(element, scope)) - return [element]; - - scope = (scope || document).getElementsByTagName(this.params.tagName || '*'); - - var results = []; - for (var i = 0, length = scope.length; i < length; i++) - if (this.match(element = scope[i])) - results.push(Element.extend(element)); - - return results; - }, - - toString: function() { - return this.expression; - } -} - -Object.extend(Selector, { - matchElements: function(elements, expression) { - var selector = new Selector(expression); - return elements.select(selector.match.bind(selector)).map(Element.extend); - }, - - findElement: function(elements, expression, index) { - if (typeof expression == 'number') index = expression, expression = false; - return Selector.matchElements(elements, expression || '*')[index || 0]; - }, - - findChildElements: function(element, expressions) { - return expressions.map(function(expression) { - return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) { - var selector = new Selector(expr); - return results.inject([], function(elements, result) { - return elements.concat(selector.findElements(result || element)); - }); - }); - }).flatten(); - } -}); - -function $$() { - return Selector.findChildElements(document, $A(arguments)); -} -var Form = { - reset: function(form) { - $(form).reset(); - return form; - }, - - serializeElements: function(elements, getHash) { - var data = elements.inject({}, function(result, element) { - if (!element.disabled && element.name) { - var key = element.name, value = $(element).getValue(); - if (value != undefined) { - if (result[key]) { - if (result[key].constructor != Array) result[key] = [result[key]]; - result[key].push(value); - } - else result[key] = value; - } - } - return result; - }); - - return getHash ? data : Hash.toQueryString(data); - } -}; - -Form.Methods = { - serialize: function(form, getHash) { - return Form.serializeElements(Form.getElements(form), getHash); - }, - - getElements: function(form) { - return $A($(form).getElementsByTagName('*')).inject([], - function(elements, child) { - if (Form.Element.Serializers[child.tagName.toLowerCase()]) - elements.push(Element.extend(child)); - return elements; - } - ); - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) return $A(inputs).map(Element.extend); - - for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || (name && input.name != name)) - continue; - matchingInputs.push(Element.extend(input)); - } - - return matchingInputs; - }, - - disable: function(form) { - form = $(form); - form.getElements().each(function(element) { - element.blur(); - element.disabled = 'true'; - }); - return form; - }, - - enable: function(form) { - form = $(form); - form.getElements().each(function(element) { - element.disabled = ''; - }); - return form; - }, - - findFirstElement: function(form) { - return $(form).getElements().find(function(element) { - return element.type != 'hidden' && !element.disabled && - ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - form = $(form); - form.findFirstElement().activate(); - return form; - } -} - -Object.extend(Form, Form.Methods); - -/*--------------------------------------------------------------------------*/ - -Form.Element = { - focus: function(element) { - $(element).focus(); - return element; - }, - - select: function(element) { - $(element).select(); - return element; - } -} - -Form.Element.Methods = { - serialize: function(element) { - element = $(element); - if (!element.disabled && element.name) { - var value = element.getValue(); - if (value != undefined) { - var pair = {}; - pair[element.name] = value; - return Hash.toQueryString(pair); - } - } - return ''; - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - return Form.Element.Serializers[method](element); - }, - - clear: function(element) { - $(element).value = ''; - return element; - }, - - present: function(element) { - return $(element).value != ''; - }, - - activate: function(element) { - element = $(element); - element.focus(); - if (element.select && ( element.tagName.toLowerCase() != 'input' || - !['button', 'reset', 'submit'].include(element.type) ) ) - element.select(); - return element; - }, - - disable: function(element) { - element = $(element); - element.disabled = true; - return element; - }, - - enable: function(element) { - element = $(element); - element.blur(); - element.disabled = false; - return element; - } -} - -Object.extend(Form.Element, Form.Element.Methods); -var Field = Form.Element; -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - default: - return Form.Element.Serializers.textarea(element); - } - }, - - inputSelector: function(element) { - return element.checked ? element.value : null; - }, - - textarea: function(element) { - return element.value; - }, - - select: function(element) { - return this[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - }, - - selectOne: function(element) { - var index = element.selectedIndex; - return index >= 0 ? this.optionValue(element.options[index]) : null; - }, - - selectMany: function(element) { - var values, length = element.length; - if (!length) return null; - - for (var i = 0, values = []; i < length; i++) { - var opt = element.options[i]; - if (opt.selected) values.push(this.optionValue(opt)); - } - return values; - }, - - optionValue: function(opt) { - // extend element because hasAttribute may not be native - return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; - } -} - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - var changed = ('string' == typeof this.lastValue && 'string' == typeof value - ? this.lastValue != value : String(this.lastValue) != String(value)); - if (changed) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - Form.getElements(this.element).each(this.registerCallback.bind(this)); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - default: - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - KEY_HOME: 36, - KEY_END: 35, - KEY_PAGEUP: 33, - KEY_PAGEDOWN: 34, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - event.cancelBubble = true; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0, length = Event.observers.length; i < length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.attachEvent)) - name = 'keydown'; - - Event._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - try { - element.detachEvent('on' + name, observer); - } catch (e) {} - } - } -}); - -/* prevent memory leaks in IE */ -if (navigator.appVersion.match(/\bMSIE\b/)) - Event.observe(window, 'unload', Event.unloadCache, false); -var Position = { - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - if(element.tagName=='BODY') break; - var p = Element.getStyle(element, 'position'); - if (p == 'relative' || p == 'absolute') break; - } - } while (element); - return [valueL, valueT]; - }, - - offsetParent: function(element) { - if (element.offsetParent) return element.offsetParent; - if (element == document.body) return element; - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return element; - - return document.body; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - page: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent==document.body) - if (Element.getStyle(element,'position')=='absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - if (!window.opera || element.tagName=='BODY') { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } - } while (element = element.parentNode); - - return [valueL, valueT]; - }, - - clone: function(source, target) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || {}) - - // find page position of source - source = $(source); - var p = Position.page(source); - - // find coordinate system to use - target = $(target); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(target,'position') == 'absolute') { - parent = Position.offsetParent(target); - delta = Position.page(parent); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if(options.setWidth) target.style.width = source.offsetWidth + 'px'; - if(options.setHeight) target.style.height = source.offsetHeight + 'px'; - }, - - absolutize: function(element) { - element = $(element); - if (element.style.position == 'absolute') return; - Position.prepare(); - - var offsets = Position.positionedOffset(element); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.width = width + 'px'; - element.style.height = height + 'px'; - }, - - relativize: function(element) { - element = $(element); - if (element.style.position == 'relative') return; - Position.prepare(); - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - } -} - -// Safari returns margins on body which is incorrect if the child is absolutely -// positioned. For performance reasons, redefine Position.cumulativeOffset for -// KHTML/WebKit only. -if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { - Position.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return [valueL, valueT]; - } -} - -Element.addMethods(); \ No newline at end of file diff --git a/appserver/tests/community/web/jruby/helloapp/public/robots.txt b/appserver/tests/community/web/jruby/helloapp/public/robots.txt deleted file mode 100644 index 40dea8b2b98..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/public/robots.txt +++ /dev/null @@ -1,41 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file diff --git a/appserver/tests/community/web/jruby/helloapp/test/JRubyTestNG.java b/appserver/tests/community/web/jruby/helloapp/test/JRubyTestNG.java deleted file mode 100644 index 853e864be6e..00000000000 --- a/appserver/tests/community/web/jruby/helloapp/test/JRubyTestNG.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2008-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test.web.jruby.helloapp; -import org.testng.annotations.Configuration; -import org.testng.annotations.ExpectedExceptions; -import org.testng.annotations.Test; -import org.testng.annotations.Parameters; -import org.testng.Assert; - -import java.io.*; -import java.net.*; -import java.util.*; - -public class JRubyTestNG { - - private static final String TEST_NAME = - "jruby-say-hello"; - - private static final String EXPECTED_RESPONSE = - "Welcome aboard"; - - static String result = ""; - /* - *If two asserts are mentioned in one method, then last assert is taken in - *to account. - *Each method can act as one test within one test suite - */ - - - //@Parameters({ "host", "port", "contextroot" }) - @Test(groups ={ "pulse"} ) // test method - //public void webtest(String host, String port, String contextroot) throws Exception{ - public void webtest() throws Exception{ - - try{ - String host=System.getProperty("host"); - String port=System.getProperty("port"); - String contextRoot=System.getProperty("contextroot"); - - String testurl = "http://" + host + ":" + port + "/"+ contextRoot+"/"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - System.out.println("Reading HTML output.."); - while ((line = input.readLine()) != null) { - //System.out.println(line); - if(line.indexOf(EXPECTED_RESPONSE)!=-1){ - result=true; - testLine = line; - System.out.println(testLine); - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - @Test(groups ={ "functional"} ) // test method - public void controllerTest() throws Exception{ - try{ - String host=System.getProperty("host"); - String port=System.getProperty("port"); - String contextRoot=System.getProperty("contextroot"); - - String testurl = "http://" + host + ":" + port + "/"+ contextRoot - +"/say/hello"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - System.out.println("Reading HTML output.."); - while ((line = input.readLine()) != null) { - //System.out.println(line); - if(line.indexOf("Say#hello")!=-1){ - result=true; - testLine = line; - System.out.println(testLine); - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - public static void echo(String msg) { - System.out.println(msg); - } - -} diff --git a/appserver/tests/community/web/jsfastrologer/build.properties b/appserver/tests/community/web/jsfastrologer/build.properties deleted file mode 100644 index df7ff5b0487..00000000000 --- a/appserver/tests/community/web/jsfastrologer/build.properties +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -war.file=jsfastrologer -testsuite.name=jsftest -testng.test.name=web_jsf_form -contextroot=jsfastrologer -archive.type=war -ws.root=../../ -deploy.platform=v3 diff --git a/appserver/tests/community/web/jsfastrologer/build.xml b/appserver/tests/community/web/jsfastrologer/build.xml deleted file mode 100644 index e97012b78c9..00000000000 --- a/appserver/tests/community/web/jsfastrologer/build.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - Builds, tests, and runs the project Hello JSP Application - - - - Builds, tests, and runs the project Hello JSP Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/jsfastrologer/metadata/faces-config.xml b/appserver/tests/community/web/jsfastrologer/metadata/faces-config.xml deleted file mode 100644 index 470892956ff..00000000000 --- a/appserver/tests/community/web/jsfastrologer/metadata/faces-config.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - handle user input - - /greetings.jsp - - submit - /success.jsp - - - - - Managed User Bean - - UserBean - web.jsf.bean.UserBean - request - - - diff --git a/appserver/tests/community/web/jsfastrologer/metadata/sun-web.xml b/appserver/tests/community/web/jsfastrologer/metadata/sun-web.xml deleted file mode 100644 index 5e7522e4486..00000000000 --- a/appserver/tests/community/web/jsfastrologer/metadata/sun-web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/jsfastrologer/metadata/web.xml b/appserver/tests/community/web/jsfastrologer/metadata/web.xml deleted file mode 100644 index d53c73ff209..00000000000 --- a/appserver/tests/community/web/jsfastrologer/metadata/web.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - com.sun.faces.verifyObjects - false - - - com.sun.faces.validateXml - false - - - javax.faces.STATE_SAVING_METHOD - client - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - Faces Servlet - /faces/* - - - - 30 - - - - - index.jsp - - - index.jsp - - - diff --git a/appserver/tests/community/web/jsfastrologer/src/java/web/jsf/bean/UserBean.java b/appserver/tests/community/web/jsfastrologer/src/java/web/jsf/bean/UserBean.java deleted file mode 100644 index e8f2467618c..00000000000 --- a/appserver/tests/community/web/jsfastrologer/src/java/web/jsf/bean/UserBean.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * UserBean.java - * - * Created on December 4, 2007, 1:32 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package web.jsf.bean; - -public class UserBean { - - private String name; - private String birthday; - - /** Creates a new instance of UserBean */ - public UserBean() { - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getBirthday() { - return birthday; - } - - public void setBirthday(String birthday) { - this.birthday = birthday; - } - -} diff --git a/appserver/tests/community/web/jsfastrologer/src/test/JSFWebTestNG.java b/appserver/tests/community/web/jsfastrologer/src/test/JSFWebTestNG.java deleted file mode 100644 index 79b69433897..00000000000 --- a/appserver/tests/community/web/jsfastrologer/src/test/JSFWebTestNG.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test.jsf.astrologer; - -import org.testng.annotations.Configuration; -import org.testng.annotations.ExpectedExceptions; -import org.testng.annotations.Test; -import org.testng.annotations.*; -import org.testng.Assert; - -// import org.apache.commons.httpclient.*; -// import org.apache.commons.httpclient.methods.*; -// import org.apache.commons.httpclient.params.*; -// import org.apache.commons.httpclient.cookie.*; - -import java.io.*; -import java.net.*; -import java.util.*; - - -public class JSFWebTestNG { - - private static final String TEST_NAME = - "jsf-webapp"; - - private static final String EXPECTED_RESPONSE = - "JSP Page Test"; - - private String strContextRoot="jsfastrologer"; - - static String result = ""; - String m_host=""; - String m_port=""; - //HttpClient httpclient = new HttpClient(); - - //@Parameters({"host","port"}) - @BeforeMethod - public void beforeTest(){ - m_host=System.getProperty("http.host"); - m_port=System.getProperty("http.port"); - } - - /* - *If tw - o asserts are mentioned in one method, then last assert is taken in - *to account. - *Each method can act as one test within one test suite - */ - - - @Test(groups ={ "pulse"} ) // test method - //public void webtest(String host, String port, String contextroot) throws Exception{ - public void jsfAppDeployedFirstPagetest() throws Exception{ - - try{ - System.out.println("Running TestMethod webtest"); - - String testurl = "http://" + m_host + ":" + m_port + "/"+ strContextRoot + "/faces/greetings.jsp"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - while ((line = input.readLine()) != null) { - if(line.indexOf("Welcome to jAstrologer")!=-1){ - result=true; - testLine = line; - - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - - @Test(groups ={ "pulse"} ) // test method - public void jsfIndexPageBasicTest() throws Exception{ - try{ - - System.out.println("Running TestMethod SimpleHTMLTest"); - - - String testurl = "http://" + m_host + ":" + m_port + "/"+ strContextRoot + "/index.jsp"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - while ((line = input.readLine()) != null) { - if(line.indexOf("JavaServer Faces Greetings Page")!=-1){ - result=true; - testLine = line; - System.out.println(testLine); - } - - } - - Assert.assertEquals(result, true); - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - public static void echo(String msg) { - System.out.println(msg); - } - - -/* - @Test(groups={"pulse"}) - public void testRequestResponse() throws Exception{ - try{ - System.out.println("Running method testRequestResponse"); - String testurl = "http://" + m_host + ":" + m_port + - "/"+ strContextRoot + "/index.jsp"; - String name="testuser"; - String birthday="121212"; - System.out.println("URL is: "+testurl); - GetMethod httpget=null; - PostMethod post=null; - httpget = new GetMethod(testurl); - post=new PostMethod("http://localhost:8080/jsfastrologer/faces/greetings.jsp"); - - - NameValuePair[] mydata = { - // new NameValuePair("loginID", itUser), - // new NameValuePair("password", itPwd), Not working for editing of bug - - new NameValuePair("name",name), - new NameValuePair("birthday",birthday) - }; - - post.setRequestBody(mydata); - int statusCode = httpclient.executeMethod(post); - System.out.println("print status ok "+statusCode); - Assert.assertEquals(statusCode, 200); - - if (statusCode != HttpStatus.SC_OK) { - System.err.println("Method failed: " + post.getStatusLine()); - } - post.getStatusLine(); - - String response=post.getResponseBodyAsString(); - System.out.println(response); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } -*/ - -} diff --git a/appserver/tests/community/web/jsfastrologer/web/html/first.html b/appserver/tests/community/web/jsfastrologer/web/html/first.html deleted file mode 100644 index 5ed01b59202..00000000000 --- a/appserver/tests/community/web/jsfastrologer/web/html/first.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - Welcome to HTML Test Program. This tests following thing -
      -
    1. TestNG
    2. -
    3. build.xml
    4. -
    5. V2 & V3
    6. -
    7. New Framework
    8. -
    - - - diff --git a/appserver/tests/community/web/jsfastrologer/web/jsp/greetings.jsp b/appserver/tests/community/web/jsfastrologer/web/jsp/greetings.jsp deleted file mode 100644 index 98e6ae32baa..00000000000 --- a/appserver/tests/community/web/jsfastrologer/web/jsp/greetings.jsp +++ /dev/null @@ -1,79 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<%-- -The taglib directive below imports the JSTL library. If you uncomment it, -you must also add the JSTL library to the project. The Add Library... action -on Libraries node in Projects view can be used to add the JSTL 1.1 library. ---%> - -<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> -<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> -<%-- -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> - ---%> - - - - Greetings-JSF Test - - - -

    Welcome to jAstrologer

    - - - - -

    Enter your name:

    -

    Enter your birthday:

    - -
    -
    - - - - - - diff --git a/appserver/tests/community/web/jsfastrologer/web/jsp/index.jsp b/appserver/tests/community/web/jsfastrologer/web/jsp/index.jsp deleted file mode 100644 index be344f6e23e..00000000000 --- a/appserver/tests/community/web/jsfastrologer/web/jsp/index.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<%-- -The taglib directive below imports the JSTL library. If you uncomment it, -you must also add the JSTL library to the project. The Add Library... action -on Libraries node in Projects view can be used to add the JSTL 1.1 library. ---%> -<%-- -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ---%> - - - - - - - JSP Page - - - -

    JSP Page

    -
    - JavaServer Faces Greetings Page -
    -

    There should be a form after clicking on above link

    - - - <%-- - This example uses JSTL, uncomment the taglib directive above. - To test, display the page like this: index.jsp?sayHello=true&name=Murphy - --%> - <%-- - - - Hello ${param.name}! - - --%> - - - diff --git a/appserver/tests/community/web/jsfastrologer/web/jsp/success.jsp b/appserver/tests/community/web/jsfastrologer/web/jsp/success.jsp deleted file mode 100644 index 0830dbb7921..00000000000 --- a/appserver/tests/community/web/jsfastrologer/web/jsp/success.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<%-- -The taglib directive below imports the JSTL library. If you uncomment it, -you must also add the JSTL library to the project. The Add Library... action -on Libraries node in Projects view can be used to add the JSTL 1.1 library. ---%> -<%-- -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ---%> - -<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> -<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> - - - - - - - Congratulations-JSF Test - - - -

    Congratulations-Success

    - - -

    You've successfully registered with jAstrologer

    -

    Your name is ;should display here through JSF Tag--

    -

    Your birthday is;should display here through JSF Tag--

    -
    -
    - -

    You've successfully registered with jAstrologer.

    - - - - diff --git a/appserver/tests/community/web/jsfastrologer/web/jsp/welcomeJSF.jsp b/appserver/tests/community/web/jsfastrologer/web/jsp/welcomeJSF.jsp deleted file mode 100644 index d2194c71673..00000000000 --- a/appserver/tests/community/web/jsfastrologer/web/jsp/welcomeJSF.jsp +++ /dev/null @@ -1,62 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> - -<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%> -<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%> - - - - - - - JSP Page - - - -

    -
    - - diff --git a/appserver/tests/community/web/jsfastrologer/web/jsp/welcomeStruts.jsp b/appserver/tests/community/web/jsfastrologer/web/jsp/welcomeStruts.jsp deleted file mode 100644 index fa5d42fc9b7..00000000000 --- a/appserver/tests/community/web/jsfastrologer/web/jsp/welcomeStruts.jsp +++ /dev/null @@ -1,65 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> -<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> -<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> - - - -<bean:message key="welcome.title"/> - - - - - - - ERROR: Application resources not loaded -- check servlet container - logs for error messages. - - - -

    -

    - - -
    diff --git a/appserver/tests/community/web/jsfinjection/build.properties b/appserver/tests/community/web/jsfinjection/build.properties deleted file mode 100644 index 1aa9dd75eac..00000000000 --- a/appserver/tests/community/web/jsfinjection/build.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -war.file=jsfinjection -testsuite.name=basicweb -testng.test.name=web_jsf_injection -#possible choices war|ear|jar -contextroot=jsfinjection -archive.type=war -ws.root=../../ - -#Definitely need to set this at local level -deploy.platform=v3 -#deploy.url=http://${deploy.server}:${deploy.port}/ -#http://${admin.host}:${admin.port}/__asadmin/deploy?path=;name= diff --git a/appserver/tests/community/web/jsfinjection/build.xml b/appserver/tests/community/web/jsfinjection/build.xml deleted file mode 100644 index 579081660d2..00000000000 --- a/appserver/tests/community/web/jsfinjection/build.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - Builds, tests, and runs the project Hello JSP Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/jsfinjection/metadata/faces-config.xml b/appserver/tests/community/web/jsfinjection/metadata/faces-config.xml deleted file mode 100644 index 934560cb602..00000000000 --- a/appserver/tests/community/web/jsfinjection/metadata/faces-config.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - bean - jsfinjection.TestBean - request - - - diff --git a/appserver/tests/community/web/jsfinjection/metadata/web.xml b/appserver/tests/community/web/jsfinjection/metadata/web.xml deleted file mode 100644 index 4b47ac11666..00000000000 --- a/appserver/tests/community/web/jsfinjection/metadata/web.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - FilterTest - jsfinjection.FilterTest - - - - FilterTest - /jsfHello.jsf - REQUEST - INCLUDE - FORWARD - ERROR - - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - Faces Servlet - *.jsf - - - - entry - java.lang.String - Injected entry - - - - - /jetty.jsp - UTF-8 - /jinclude.jsp - - - - - diff --git a/appserver/tests/community/web/jsfinjection/src/java/FilterTest.java b/appserver/tests/community/web/jsfinjection/src/java/FilterTest.java deleted file mode 100644 index 3f03b5a5ccc..00000000000 --- a/appserver/tests/community/web/jsfinjection/src/java/FilterTest.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package jsfinjection; - -import javax.annotation.Resource; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.sql.DataSource; -import javax.naming.*; - -public class FilterTest implements Filter{ - - private ServletContext context; - private @Resource(name="jdbc/__default") DataSource ds; -// private DataSource ds; - - public void destroy() { - System.out.println("[Filter.destroy]"); - } - - public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException { - System.out.println("[Filter.doFilter]"); - - String msg = "PASS"; -/* - try { - InitialContext ic = new InitialContext(); - ic.lookup("jdbc/__default"); - msg += "=:iclookup"; - System.out.println("XXX ic lookup DONE"); - } catch(Exception ex) { - } -*/ - if (ds != null) { - try { - msg = "PASS-:" + ds.getLoginTimeout(); - } catch(Throwable ex) { - msg = "FAIL-:" + ex.toString(); - } - } else { - msg = "FAIL-: ds is null"; - } - System.out.println("[Filter.doFilter.msg = " + msg + "]"); - - ((HttpServletRequest)request).getSession().setAttribute("FILTER", msg); - filterChain.doFilter(request, response); - - } - - - public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException { - System.out.println("[Filter.init]"); - context = filterConfig.getServletContext(); - } - -} diff --git a/appserver/tests/community/web/jsfinjection/src/java/TestBean.java b/appserver/tests/community/web/jsfinjection/src/java/TestBean.java deleted file mode 100644 index 62212916c67..00000000000 --- a/appserver/tests/community/web/jsfinjection/src/java/TestBean.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package jsfinjection; -import javax.annotation.*; -import javax.sql.DataSource; - -public class TestBean { - - @Resource(name="entry") - private String entry; - - @Resource(name="jdbc/__default") - private DataSource ds; - - public String getEntry() { - return entry; - } - - public int getNumber() { - int tout = -3000; - if (ds != null) { - try { - tout = ds.getLoginTimeout(); - } catch(Exception ex) { - ex.printStackTrace(); - tout = -1000; - } - } - return tout; - } - -} diff --git a/appserver/tests/community/web/jsfinjection/src/test/JSFInjectionTestNG.java b/appserver/tests/community/web/jsfinjection/src/test/JSFInjectionTestNG.java deleted file mode 100644 index 76a78fef437..00000000000 --- a/appserver/tests/community/web/jsfinjection/src/test/JSFInjectionTestNG.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test.web.jsfinjection; -import org.testng.annotations.Configuration; -import org.testng.annotations.ExpectedExceptions; -import org.testng.annotations.Test; -import org.testng.annotations.*; -import org.testng.Assert; - -import java.io.*; -import java.net.*; -import java.util.*; - -/** - * Simple TestNG client for basic WAR containing JSF page with injectited values. - * Client checks for two values: injected string and injected number. - * If both values are as expected test passes. - */ -public class JSFInjectionTestNG { - - private static final String TEST_NAME = - "simple-webapp-jsf-injection"; - - private String strContextRoot="jsfinjection"; - - static String result = ""; - String host=System.getProperty("http.host"); - String port=System.getProperty("http.port"); - - /* - *If two asserts are mentioned in one method, then last assert is taken in - *to account. - *Each method can act as one test within one test suite - */ - - - //@Parameters({ "host", "port", "contextroot" }) - @Test(groups ={ "pulse"} ) // test method - public void injectedValuesTestPage() throws Exception { - - try { - - String errorText = ""; - boolean testPass = false; - - String testUrl = "http://" + host + ":" + port + "/"+ strContextRoot + "/jsfHello.jsf"; - echo("URL is: " + testUrl); - URL url = new URL(testUrl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - if ( responseCode != 200 ) { - echo("ERROR: http response code is " + responseCode); - errorText = errorText + "ERROR: http response code is " + responseCode + ".\n"; - } else { - echo("Connected: " + responseCode); - } - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - String line2 = null; - boolean result=false; - String EXPECTED_RESPONSE = "Injected entry"; - String DIVIDER = "==="; - while ((line = input.readLine()) != null) { - //echo (line); - if (line.indexOf(EXPECTED_RESPONSE)!= -1) { - testPass = true; - echo("Received: " + line); - } - if (line.indexOf(DIVIDER)!= -1) { - line2 = line; - echo("Received: " + line2); - } - } - - if (! testPass) { - echo("ERROR: injection 1 not found"); - errorText = errorText + "ERROR: injection 1 not found\n"; - } - - if (line2 != null) { - String [] injection2Array = line2.split(DIVIDER); - String injectedNumber = injection2Array[1].trim(); - echo("injectedNumber = " + injectedNumber); - int num = Integer.parseInt(injectedNumber); - - if ( num < 0 ) { - echo("ERROR: injection 2 is less than zero."); - errorText = errorText + "ERROR: injection 2 is less than zero"; - testPass = false; - } else { - echo("Injection2 matched."); - } - } else { - echo("ERROR: line with " + DIVIDER + " not found."); - errorText = errorText + "ERROR: line with " + DIVIDER + " not found"; - testPass = false; - } - - Assert.assertEquals(testPass, true, errorText); - - }catch(Exception e){ - echo("ERROR: caught exception!"); - e.printStackTrace(); - throw new Exception(e); - } - } - - public static void echo(String msg) { - System.out.println(msg); - } -} diff --git a/appserver/tests/community/web/jsfinjection/web/jsp/jsfHello.jsp b/appserver/tests/community/web/jsfinjection/web/jsp/jsfHello.jsp deleted file mode 100644 index e182668d157..00000000000 --- a/appserver/tests/community/web/jsfinjection/web/jsp/jsfHello.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%> -<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%> - - - - - JSF Hello - - - -

    - Hello, and welcome
    -
    - - -

    -
    - - -
    - diff --git a/appserver/tests/community/web/strutsbasic/build.properties b/appserver/tests/community/web/strutsbasic/build.properties deleted file mode 100644 index 26214398221..00000000000 --- a/appserver/tests/community/web/strutsbasic/build.properties +++ /dev/null @@ -1,49 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -war.file=strutsbasic -testsuite.name=strutsbasicapp -testng.test.name=web_struts_tags -contextroot=strutsbasic -archive.type=war -ws.root=../../ -deploy.platform=v3 - - diff --git a/appserver/tests/community/web/strutsbasic/build.xml b/appserver/tests/community/web/strutsbasic/build.xml deleted file mode 100644 index 79dc7b5953c..00000000000 --- a/appserver/tests/community/web/strutsbasic/build.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - Builds, tests, and runs the project Hello JSP Application - - - - Builds, tests, and runs the project Hello JSP Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/strutsbasic/metadata/context.xml b/appserver/tests/community/web/strutsbasic/metadata/context.xml deleted file mode 100644 index 679454c70c0..00000000000 --- a/appserver/tests/community/web/strutsbasic/metadata/context.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - diff --git a/appserver/tests/community/web/strutsbasic/metadata/struts-config.xml b/appserver/tests/community/web/strutsbasic/metadata/struts-config.xml deleted file mode 100644 index 8626a408dfc..00000000000 --- a/appserver/tests/community/web/strutsbasic/metadata/struts-config.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/strutsbasic/metadata/sun-web.xml b/appserver/tests/community/web/strutsbasic/metadata/sun-web.xml deleted file mode 100644 index 5e7522e4486..00000000000 --- a/appserver/tests/community/web/strutsbasic/metadata/sun-web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/strutsbasic/metadata/tiles-defs.xml b/appserver/tests/community/web/strutsbasic/metadata/tiles-defs.xml deleted file mode 100644 index 8189ae8bd17..00000000000 --- a/appserver/tests/community/web/strutsbasic/metadata/tiles-defs.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/strutsbasic/metadata/validation.xml b/appserver/tests/community/web/strutsbasic/metadata/validation.xml deleted file mode 100644 index 26aa82d63c7..00000000000 --- a/appserver/tests/community/web/strutsbasic/metadata/validation.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - -
    - - - - - - - mask - ^[0-9a-zA-Z]*$ - - -
    - -
    - - - - - - postalCode - ^[0-9a-zA-Z]*$ - - - -
    - - - - - - - mask - ^[0-9a-zA-Z]*$ - - -
    - -
    - -
    diff --git a/appserver/tests/community/web/strutsbasic/metadata/validator-rules.xml b/appserver/tests/community/web/strutsbasic/metadata/validator-rules.xml deleted file mode 100644 index 97ed62ff501..00000000000 --- a/appserver/tests/community/web/strutsbasic/metadata/validator-rules.xml +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/community/web/strutsbasic/metadata/web.xml b/appserver/tests/community/web/strutsbasic/metadata/web.xml deleted file mode 100644 index eb0f98047a9..00000000000 --- a/appserver/tests/community/web/strutsbasic/metadata/web.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - action - org.apache.struts.action.ActionServlet - - config - /WEB-INF/struts-config.xml - - - debug - 2 - - - detail - 2 - - 2 - - - action - *.do - - - - 30 - - - - - index.jsp - - - - - /WEB-INF/struts-bean.tld - /WEB-INF/struts-bean.tld - - - /WEB-INF/struts-html.tld - /WEB-INF/struts-html.tld - - - /WEB-INF/struts-logic.tld - /WEB-INF/struts-logic.tld - - - /WEB-INF/struts-nested.tld - /WEB-INF/struts-nested.tld - - - /WEB-INF/struts-tiles.tld - /WEB-INF/struts-tiles.tld - - - diff --git a/appserver/tests/community/web/strutsbasic/src/java/ApplicationResource.properties b/appserver/tests/community/web/strutsbasic/src/java/ApplicationResource.properties deleted file mode 100644 index 5957b766520..00000000000 --- a/appserver/tests/community/web/strutsbasic/src/java/ApplicationResource.properties +++ /dev/null @@ -1,65 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -errors.header=
      -errors.prefix=
    • -errors.suffix=
    • -errors.footer=
    -errors.invalid={0} is invalid. -errors.maxlength={0} can not be greater than {1} characters. -errors.minlength={0} can not be less than {1} characters. -errors.range={0} is not in the range {1} through {2}. -errors.required={0} is required. -errors.byte={0} must be an byte. -errors.date={0} is not a date. -errors.double={0} must be an double. -errors.float={0} must be an float. -errors.integer={0} must be an integer. -errors.long={0} must be an long. -errors.short={0} must be an short. -errors.creditcard={0} is not a valid credit card number. -errors.email={0} is an invalid e-mail address. -errors.cancel=Operation cancelled. -errors.detail={0} -errors.general=The process did not complete. Details should follow. -errors.token=Request could not be completed. Operation is not in sequence. -welcome.title=Struts Application -welcome.heading=Struts Applications in Netbeans! -welcome.message=It's easy to create Struts applications with NetBeans. diff --git a/appserver/tests/community/web/strutsbasic/src/test/StrutsWebTestNG.java b/appserver/tests/community/web/strutsbasic/src/test/StrutsWebTestNG.java deleted file mode 100644 index 26c894fb383..00000000000 --- a/appserver/tests/community/web/strutsbasic/src/test/StrutsWebTestNG.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test.web.strutsbasic; - -import org.testng.annotations.Configuration; -import org.testng.annotations.ExpectedExceptions; -import org.testng.annotations.Test; -import org.testng.annotations.*; -import org.testng.Assert; - -import java.io.*; -import java.net.*; -import java.util.*; - - -public class StrutsWebTestNG { - - private static final String TEST_NAME = - "struts-webapp"; - - private static final String EXPECTED_RESPONSE = - "JSP Page Test"; - - private String strContextRoot="strutsbasic"; - - static String result = ""; - String m_host=""; - String m_port=""; - String host=System.getProperty("http.host"); - String port=System.getProperty("http.port"); - - //@Parameters({"host","port"}) - @BeforeMethod - //public void beforeTest(String httpHost,String httpPort){ - public void beforeTest(){ - m_host=System.getProperty("http.host"); - m_port=System.getProperty("http.port"); - System.out.println("Host is-->"+m_host); - System.out.println("Port is-->"+m_port); - } - - /* - *If two asserts are mentioned in one method, then last assert is taken in - *to account. - *Each method can act as one test within one test suite - */ - - - @Test(groups ={ "pulse"} ) // test method - //public void webtest(String host, String port, String contextroot) throws Exception{ - public void strutsAppDeployedtest() throws Exception{ - - try{ - - - String testurl = "http://" + m_host + ":" + m_port + "/"+ strContextRoot + "/index.jsp"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - while ((line = input.readLine()) != null) { - if(line.indexOf("Struts Welcome Page")!=-1){ - result=true; - testLine = line; - System.out.println(testLine); - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - - @Test(groups ={ "pulse"} ) // test method - public void strutsBasicHTMLTest() throws Exception{ - try{ - - - String testurl = "http://" + m_host + ":" + m_port + "/"+ strContextRoot + "/Welcome.do"; - System.out.println("URL is: "+testurl); - URL url = new URL(testurl); - echo("Connecting to: " + url.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.connect(); - int responseCode = conn.getResponseCode(); - - InputStream is = conn.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - - String line = null; - boolean result=false; - String testLine = null; - while ((line = input.readLine()) != null) { - if(line.indexOf("Struts Applications in Netbeans!")!=-1){ - result=true; - testLine = line; - System.out.println(testLine); - } - - } - - Assert.assertEquals(result, true,"Unexpected HTML"); - - - }catch(Exception e){ - e.printStackTrace(); - throw new Exception(e); - } - - } - - public static void echo(String msg) { - System.out.println(msg); - } - -} diff --git a/appserver/tests/community/web/strutsbasic/web/html/first.html b/appserver/tests/community/web/strutsbasic/web/html/first.html deleted file mode 100644 index 5ed01b59202..00000000000 --- a/appserver/tests/community/web/strutsbasic/web/html/first.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - Welcome to HTML Test Program. This tests following thing -
      -
    1. TestNG
    2. -
    3. build.xml
    4. -
    5. V2 & V3
    6. -
    7. New Framework
    8. -
    - - - diff --git a/appserver/tests/community/web/strutsbasic/web/jsp/hello.jsp b/appserver/tests/community/web/strutsbasic/web/jsp/hello.jsp deleted file mode 100644 index e69346736bb..00000000000 --- a/appserver/tests/community/web/strutsbasic/web/jsp/hello.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<%-- -The taglib directive below imports the JSTL library. If you uncomment it, -you must also add the JSTL library to the project. The Add Library... action -on Libraries node in Projects view can be used to add the JSTL 1.1 library. ---%> -<%-- -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ---%> - - - - - - - JSP Page - - - -

    JSP Test Page

    - <% out.println(" Hello World"); %> - - - - diff --git a/appserver/tests/community/web/strutsbasic/web/jsp/index.jsp b/appserver/tests/community/web/strutsbasic/web/jsp/index.jsp deleted file mode 100644 index 8a89cbe059d..00000000000 --- a/appserver/tests/community/web/strutsbasic/web/jsp/index.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html"%> -<%@page pageEncoding="UTF-8"%> -<%-- -The taglib directive below imports the JSTL library. If you uncomment it, -you must also add the JSTL library to the project. The Add Library... action -on Libraries node in Projects view can be used to add the JSTL 1.1 library. ---%> -<%-- -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ---%> - - - - - - - Basic Struts JSP Page - - - -

    JSP Page Test

    -
    - Struts Welcome Page - - <%-- - This example uses JSTL, uncomment the taglib directive above. - To test, display the page like this: index.jsp?sayHello=true&name=Murphy - --%> - <%-- - - - Hello ${param.name}! - - --%> - - - diff --git a/appserver/tests/community/web/strutsbasic/web/jsp/welcomeStruts.jsp b/appserver/tests/community/web/strutsbasic/web/jsp/welcomeStruts.jsp deleted file mode 100644 index fa5d42fc9b7..00000000000 --- a/appserver/tests/community/web/strutsbasic/web/jsp/welcomeStruts.jsp +++ /dev/null @@ -1,65 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> -<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> -<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> - - - -<bean:message key="welcome.title"/> - - - - - - - ERROR: Application resources not loaded -- check servlet container - logs for error messages. - - - -

    -

    - - -
    diff --git a/appserver/tests/embedded/README b/appserver/tests/embedded/README deleted file mode 100644 index ee2a26fcb7d..00000000000 --- a/appserver/tests/embedded/README +++ /dev/null @@ -1,6 +0,0 @@ -Set the following before running 'mvn clean verify': - -MAVEN_OPTS="-Xmx1024m" - -(See http://jira.codehaus.org/browse/MCOMPILER-64) - diff --git a/appserver/tests/embedded/basic/README b/appserver/tests/embedded/basic/README deleted file mode 100644 index 9df06a6acbe..00000000000 --- a/appserver/tests/embedded/basic/README +++ /dev/null @@ -1,15 +0,0 @@ -These are the unit tests for testing the APIs provided in org.glassfish.embeddable package. - -Mainly these tests require the following artifacts : - -1. ~/.m2/repository/org/glassfish/extras/glassfish-embedded-all/3.1-SNAPSHOT/glassfish-embedded-all-3.1-SNAPSHOT.jar - -2. ~/.m2/repository/junit/junit/4.3.1/junit-4.3.1.jar - -3. ~/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar - -4. ~/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4.2/maven-surefire-plugin-2.4.2.jar - - - - diff --git a/appserver/tests/embedded/basic/lifecycle/README b/appserver/tests/embedded/basic/lifecycle/README deleted file mode 100644 index 9b0dc614994..00000000000 --- a/appserver/tests/embedded/basic/lifecycle/README +++ /dev/null @@ -1,11 +0,0 @@ -Tests newGlassFish(), start(), stop(), dispose() lifecyle operations. - -1. Two instances of GlassFish are created. - -2. On each instance, start(), stop() is called multiple times. - -3. Both the instances are disposed. - -4. Checks whether the temp dirs are cleaned up or not. - -Check the and sections to check the artifacts used. diff --git a/appserver/tests/embedded/basic/lifecycle/pom.xml b/appserver/tests/embedded/basic/lifecycle/pom.xml deleted file mode 100644 index 720139c05cb..00000000000 --- a/appserver/tests/embedded/basic/lifecycle/pom.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded.basic - lifecycle - 4.1-SNAPSHOT - Test newGlassFish(), start(), stop(), dispose() lifecyle operations - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - ${project.version} - - - junit - junit - - - - - run-with-shell-jar - - - build - static-shell - - - - - junit - junit - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - diff --git a/appserver/tests/embedded/basic/lifecycle/src/test/java/org/glassfish/tests/embedded/basic/lifecycle/LifeCycleTest.java b/appserver/tests/embedded/basic/lifecycle/src/test/java/org/glassfish/tests/embedded/basic/lifecycle/LifeCycleTest.java deleted file mode 100644 index e851178a011..00000000000 --- a/appserver/tests/embedded/basic/lifecycle/src/test/java/org/glassfish/tests/embedded/basic/lifecycle/LifeCycleTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.basic.lifecycle; - -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishException; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import java.io.File; -import java.util.logging.Logger; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class LifeCycleTest { - - Logger logger = Logger.getAnonymousLogger(); - - GlassFishRuntime runtime; - - @Test - public void test() throws GlassFishException { - runtime = GlassFishRuntime.bootstrap(); - - GlassFish instance1 = runtime.newGlassFish(); - logger.info("Instance1 created" + instance1); - instance1.start(); - logger.info("Instance1 started #1"); - sleep(); - instance1.stop(); - logger.info("Instance1 stopped #1"); - instance1.start(); - logger.info("Instance1 started #2"); - sleep(); - instance1.stop(); - logger.info("Instance1 stopped #2"); - instance1.dispose(); - logger.info("Instance1 disposed"); - checkDisposed(); - - - GlassFishProperties props = new GlassFishProperties(); - props.setProperty("glassfish.embedded.tmpdir", System.getProperty("user.dir")); - GlassFish instance2 = runtime.newGlassFish(props); - logger.info("instance2 created" + instance2); - instance2.start(); - logger.info("Instance2 started #1"); - sleep(); - instance2.stop(); - logger.info("Instance2 stopped #1"); - instance2.start(); - logger.info("Instance2 started #2"); - sleep(); - instance2.stop(); - logger.info("Instance2 stopped #2"); - instance2.dispose(); - logger.info("Instance2 disposed"); - checkDisposed(); - } - - private void sleep() { - try { - Thread.sleep(1000); - } catch(Exception ex) { - } - } - // throws exception if the temp dir is not cleaned out. - - private void checkDisposed() { - String instanceRoot = System.getProperty("com.sun.aas.instanceRoot"); - logger.info("Checking whether " + instanceRoot + " is disposed or not"); - if (new File(instanceRoot).exists()) { - throw new RuntimeException("Directory " + instanceRoot + - " is not cleaned up after glassfish.dispose()"); - } - } -} diff --git a/appserver/tests/embedded/basic/pom.xml b/appserver/tests/embedded/basic/pom.xml deleted file mode 100755 index 3ebe4863a17..00000000000 --- a/appserver/tests/embedded/basic/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests.embedded - basic - 4.1-SNAPSHOT - pom - Basic tests for testing org.glassfish.embeddable APIs - - lifecycle - - diff --git a/appserver/tests/embedded/cdi_basic/pom.xml b/appserver/tests/embedded/cdi_basic/pom.xml deleted file mode 100644 index 298777a7958..00000000000 --- a/appserver/tests/embedded/cdi_basic/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded.basic - cdi_basic - 4.1-SNAPSHOT - Basic CDI Test - - cdi_basic - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - false - false - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - 4.1-SNAPSHOT - - - junit - junit - - - - - run-with-shell-jar - - - build - static-shell - - - - - junit - junit - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - diff --git a/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/BasicCDITestServlet.java b/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/BasicCDITestServlet.java deleted file mode 100644 index 4026700af2b..00000000000 --- a/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/BasicCDITestServlet.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_basic; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author bhavanishankar@dev.java.net - */ -@WebServlet(name = "BasicCDITestServlet", - urlPatterns = "/BasicCDITestServlet") -public class BasicCDITestServlet extends HttpServlet { - - @javax.inject.Inject TestBean tb; - @javax.inject.Inject TestRequestScopedBean trsb; - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter out = httpServletResponse.getWriter(); - out.println("Hi from BasicCDITestServlet"); - if(tb == null) { - out.println("TestBean not injected."); - } else if(trsb == null) { - out.println("TestRequestScopeBean not injected."); - } else { - out.println("TestBean injected. [" + tb + "]"); - out.println("TestRequestScopeBean injected. [ " + trsb + "]"); - out.println("All CDI beans have been injected."); - } - out.flush(); - out.close(); - } -} - diff --git a/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/TestBean.java b/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/TestBean.java deleted file mode 100644 index b57bd05b590..00000000000 --- a/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/TestBean.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_basic; - -//Simple TestBean to test CDI. -//This bean implements Serializable as it needs to be placed into a Stateful Bean -public class TestBean -{} diff --git a/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/TestRequestScopedBean.java b/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/TestRequestScopedBean.java deleted file mode 100644 index f41ffaced81..00000000000 --- a/appserver/tests/embedded/cdi_basic/src/main/java/org/glassfish/tests/embedded/cdi_basic/TestRequestScopedBean.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_basic; - -//Simple RequestScoped TestBean to test CDI. -//This bean implements Serializable as it needs to be placed into a Stateful Bean -@javax.enterprise.context.RequestScoped -public class TestRequestScopedBean -{} diff --git a/appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/beans.xml b/appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 9e221d0cc8c..00000000000 --- a/appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - /cdi_basic - diff --git a/appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 89c69fd2c43..00000000000 --- a/appserver/tests/embedded/cdi_basic/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - cdi_basic - - diff --git a/appserver/tests/embedded/cdi_basic/src/test/java/org/glassfish/tests/embedded/cdi_basic/BasicCDITest.java b/appserver/tests/embedded/cdi_basic/src/test/java/org/glassfish/tests/embedded/cdi_basic/BasicCDITest.java deleted file mode 100644 index dda78c136ed..00000000000 --- a/appserver/tests/embedded/cdi_basic/src/test/java/org/glassfish/tests/embedded/cdi_basic/BasicCDITest.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_basic; - -import junit.framework.Assert; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.archive.ScatteredArchive; -import org.glassfish.embeddable.archive.ScatteredEnterpriseArchive; -import org.glassfish.embeddable.web.HttpListener; -import org.glassfish.embeddable.web.WebContainer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class BasicCDITest{ - - @Test - public void test() throws Exception { - - GlassFishProperties props = new GlassFishProperties(); - props.setPort("http-listener", 8080); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(props); - glassfish.start(); - - // Test Scattered Web Archive - ScatteredArchive sa = new ScatteredArchive("cdi_basic", - ScatteredArchive.Type.WAR, new File("src/main/webapp")); - sa.addClassPath(new File("target/classes")); - sa.addClassPath(new File("src/main/resources")); - URI warURI = sa.toURI(); - printContents(warURI); - - // Deploy archive - Deployer deployer = glassfish.getDeployer(); - String appname = deployer.deploy(warURI); - System.out.println("Deployed [" + appname + "]"); - Assert.assertEquals(appname, "cdi_basic"); - - // Now create a http listener and access the app. - WebContainer webcontainer = glassfish.getService(WebContainer.class); - HttpListener listener = new HttpListener(); - listener.setId("my-listener"); - listener.setPort(9090); - webcontainer.addWebListener(listener); - - get("http://localhost:8080/cdi_basic/BasicCDITestServlet", - "All CDI beans have been injected."); - - deployer.undeploy(appname); - - glassfish.dispose(); - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); - } - - void printContents(URI jarURI) throws IOException { - JarFile jarfile = new JarFile(new File(jarURI)); - System.out.println("\n\n[" + jarURI + "] contents : \n"); - Enumeration entries = jarfile.entries(); - while (entries.hasMoreElements()) { - JarEntry entry = entries.nextElement(); - System.out.println(entry.getSize() + "\t" + new Date(entry.getTime()) + - "\t" + entry.getName()); - } - System.out.println(); - } -} diff --git a/appserver/tests/embedded/cdi_ejb_jpa/README b/appserver/tests/embedded/cdi_ejb_jpa/README deleted file mode 100644 index 3061290e164..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/README +++ /dev/null @@ -1,3 +0,0 @@ -This test case tests CDI, EJB3, JPA2 components with embedded glassfish. -In this test case, EJB TestBean is injected to BasicCDITestServlet via CDI, and the TestBean is adding/retrieving entries to the Entity Bean Person via JPA. -The datasource is created via @DataSourceDefinition. diff --git a/appserver/tests/embedded/cdi_ejb_jpa/pom.xml b/appserver/tests/embedded/cdi_ejb_jpa/pom.xml deleted file mode 100644 index ee8d0aef74b..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded.basic - cdi_ejb_jpa - 4.1-SNAPSHOT - CDI, EJB, JPA integration test - - cdi_ejb_jpa - - - org.apache.maven.plugins - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - false - false - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - ${project.version} - - - junit - junit - - - - - run-with-shell-jar - - - build - static-shell - - - - - junit - junit - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITestServlet.java b/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITestServlet.java deleted file mode 100644 index 6ea6f4b1d27..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITestServlet.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; -import javax.annotation.sql.DataSourceDefinition; - -@WebServlet(name = "BasicCDITestServlet", -urlPatterns = "/BasicCDITestServlet") - -@DataSourceDefinition( - name="java:app/jdbc/DB1", - className="org.apache.derby.jdbc.EmbeddedDataSource", - portNumber=1527, - serverName="localhost", - databaseName="sun-appserv-samples", - user="APP", - password="APP", - properties={"connectionAttributes=;create=true"} -) -public class BasicCDITestServlet extends HttpServlet { - - @javax.inject.Inject - TestBean testBean; - - @javax.inject.Inject - TestRequestScopedBean trsb; - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter out = httpServletResponse.getWriter(); - out.println("Hi from BasicCDITestServlet"); - if (testBean == null) { - out.println("TestBean not injected."); - } else if (trsb == null) { - out.println("TestRequestScopeBean not injected."); - } else { - out.println("TestBean injected. [" + testBean + "]"); - out.println("TestRequestScopeBean injected. [ " + trsb + "]"); - out.println("All CDI beans have been injected."); - } - invokeTestBean(out); - out.flush(); - out.close(); - } - - private void invokeTestBean(PrintWriter out) { - testBean.addPerson("Ada"); - testBean.addPerson("Bob"); - testBean.addPerson("Cub"); - out.println("Added persons."); - - Person p1 = testBean.getPerson(1L); - Person p2 = testBean.getPerson(2L); - Person p3 = testBean.getPerson(3L); - out.println("Retrieved persons: " + p1 + ", " + p2 + ", " + p3); - } -} diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/Person.java b/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/Person.java deleted file mode 100644 index 6398b5bd563..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/Person.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -import java.io.Serializable; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; - -@Entity -public class Person implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - @Basic - private String name; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof Person)) { - return false; - } - Person other = (Person) object; - if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { - return false; - } - return true; - } - - @Override - public String toString() { - return "org.glassfish.tests.embedded.cdi_ejb_jpa.Person[id=" + id + "], [name=" + - getName() + "]"; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - -} diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestBean.java b/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestBean.java deleted file mode 100644 index 6acb3f4b810..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestBean.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -//Simple TestBean to test CDI. -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -//This bean implements Serializable as it needs to be placed into a Stateful Bean -@Stateless -public class TestBean { - @PersistenceContext() - private EntityManager em; - - public void addPerson(String name) { - Person p = new Person(); - p.setName(name); - em.persist(p); - } - - public Person getPerson(Long pid) { - return em.find(Person.class, pid); - } - - public void removePerson(Long pid) { - Person p = getPerson(pid); - if(p != null) { - em.remove(p); - } - } - - public void removePerson(Person p) { - em.remove(p); - } -} diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestRequestScopedBean.java b/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestRequestScopedBean.java deleted file mode 100644 index 3b0c0d81d12..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestRequestScopedBean.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -//Simple RequestScoped TestBean to test CDI. -//This bean implements Serializable as it needs to be placed into a Stateful Bean -@javax.enterprise.context.RequestScoped -public class TestRequestScopedBean -{} diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/main/resources/META-INF/persistence.xml b/appserver/tests/embedded/cdi_ejb_jpa/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 77a3823b611..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - java:app/jdbc/DB1 - - - - - - diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/beans.xml b/appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 9d1c7da7ef0..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - /cdi_ejb_jpa - diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 24688d8be14..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - cdi_ejb_jpa - - diff --git a/appserver/tests/embedded/cdi_ejb_jpa/src/test/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITest.java b/appserver/tests/embedded/cdi_ejb_jpa/src/test/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITest.java deleted file mode 100644 index bbda8f095cf..00000000000 --- a/appserver/tests/embedded/cdi_ejb_jpa/src/test/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITest.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -import junit.framework.Assert; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.archive.ScatteredArchive; -import org.glassfish.embeddable.archive.ScatteredEnterpriseArchive; -import org.glassfish.embeddable.web.HttpListener; -import org.glassfish.embeddable.web.WebContainer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class BasicCDITest{ - - @Test - public void test() throws Exception { - - GlassFishProperties props = new GlassFishProperties(); - props.setPort("http-listener", 8080); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(props); - glassfish.start(); - - // Test Scattered Web Archive - ScatteredArchive sa = new ScatteredArchive("cdi_ejb_jpa", - ScatteredArchive.Type.WAR, new File("src/main/webapp")); - sa.addClassPath(new File("target/classes")); - sa.addClassPath(new File("src/main/resources")); - URI warURI = sa.toURI(); - printContents(warURI); - - // Deploy archive - Deployer deployer = glassfish.getDeployer(); - String appname = deployer.deploy(warURI); - System.out.println("Deployed [" + appname + "]"); - Assert.assertEquals(appname, "cdi_ejb_jpa"); - - // Now create a http listener and access the app. - WebContainer webcontainer = glassfish.getService(WebContainer.class); - HttpListener listener = new HttpListener(); - listener.setId("my-listener"); - listener.setPort(9090); - webcontainer.addWebListener(listener); - - get("http://localhost:8080/cdi_ejb_jpa/BasicCDITestServlet", - "All CDI beans have been injected."); - - deployer.undeploy(appname); - - glassfish.dispose(); - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); - } - - void printContents(URI jarURI) throws IOException { - JarFile jarfile = new JarFile(new File(jarURI)); - System.out.println("\n\n[" + jarURI + "] contents : \n"); - Enumeration entries = jarfile.entries(); - while (entries.hasMoreElements()) { - JarEntry entry = entries.nextElement(); - System.out.println(entry.getSize() + "\t" + new Date(entry.getTime()) + - "\t" + entry.getName()); - } - System.out.println(); - } -} diff --git a/appserver/tests/embedded/ejb/basic/pom.xml b/appserver/tests/embedded/ejb/basic/pom.xml deleted file mode 100644 index 1d3781e6806..00000000000 --- a/appserver/tests/embedded/ejb/basic/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded.ejb - basic - 4.1-SNAPSHOT - Test HelloWorld and Timer EJB deployed with org.glassfish.embeddable APIs - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - 4.1-SNAPSHOT - - - - - run-with-shell-jar - - - build - static-shell - - - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - - - junit - junit - - - - diff --git a/appserver/tests/embedded/ejb/basic/src/main/java/org/glassfish/tests/embedded/ejb/basic/SampleEjb.java b/appserver/tests/embedded/ejb/basic/src/main/java/org/glassfish/tests/embedded/ejb/basic/SampleEjb.java deleted file mode 100644 index 9691a07c9bb..00000000000 --- a/appserver/tests/embedded/ejb/basic/src/main/java/org/glassfish/tests/embedded/ejb/basic/SampleEjb.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.basic; - -import javax.ejb.Stateless; - -/** - * @author Jerome Dochez - */ -@Stateless -public class SampleEjb { - - public String saySomething() { - String hello = "Hello World"; - System.out.println(hello); - return hello; - } -} diff --git a/appserver/tests/embedded/ejb/basic/src/main/java/org/glassfish/tests/embedded/ejb/basic/TimerEjb.java b/appserver/tests/embedded/ejb/basic/src/main/java/org/glassfish/tests/embedded/ejb/basic/TimerEjb.java deleted file mode 100644 index 6b7ec889e42..00000000000 --- a/appserver/tests/embedded/ejb/basic/src/main/java/org/glassfish/tests/embedded/ejb/basic/TimerEjb.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.basic; - -import javax.ejb.Stateless; -import javax.ejb.Timeout; -import javax.ejb.Timer; -import javax.ejb.TimerService; -import javax.ejb.Schedule; -import javax.naming.InitialContext; - -@Stateless -public class TimerEjb { - - private static volatile boolean timeoutWasCalled = false; - private static volatile boolean autotimeoutWasCalled = false; - - public void createTimer() throws Exception { - System.err.println("In SimpleEjb:createTimer()"); - TimerService timerSvc = (TimerService) new InitialContext().lookup( - "java:comp/TimerService"); - Timer t = timerSvc.createTimer(2, "timer01"); - } - - public boolean verifyTimer() { - return timeoutWasCalled && autotimeoutWasCalled; - } - - @Timeout - private void timeout(Timer t) { - - System.err.println("in SimpleEjb: timeout " + t.getInfo()); - timeoutWasCalled = true; - } - - @Schedule(second = "*", minute = "*", hour = "*") - public void autotest() { - System.err.println("IN AUTO-TIMEOUT!!!"); - autotimeoutWasCalled = true; - } -} \ No newline at end of file diff --git a/appserver/tests/embedded/ejb/basic/src/test/java/org/glassfish/tests/embedded/ejb/basic/test/EmbeddedTest.java b/appserver/tests/embedded/ejb/basic/src/test/java/org/glassfish/tests/embedded/ejb/basic/test/EmbeddedTest.java deleted file mode 100644 index 74109476feb..00000000000 --- a/appserver/tests/embedded/ejb/basic/src/test/java/org/glassfish/tests/embedded/ejb/basic/test/EmbeddedTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.basic.test; - -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.tests.embedded.ejb.basic.SampleEjb; -import org.glassfish.tests.embedded.ejb.basic.TimerEjb; -import org.junit.Assert; -import org.junit.Test; - -import javax.naming.InitialContext; -import java.io.File; -import java.net.URI; - -/** - * this test will use the ejb API testing. - * - * @author Jerome Dochez - * @author bhavanishankar@dev.java.net - */ -public class EmbeddedTest { - -/* - public static void main(String[] args) { - EmbeddedTest test = new EmbeddedTest(); - System.setProperty("basedir", System.getProperty()); - test.test(); - } -*/ - - @Test - public void test() throws Exception { - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - - - Deployer deployer = glassfish.getDeployer(); - URI uri = new File(System.getProperty("user.dir"), "target/classes").toURI(); - System.out.println("Deploying [" + uri + "]"); - deployer.deploy(uri); - - InitialContext ic = new InitialContext(); - - System.out.println("Looking up SampleEJB."); - SampleEjb sampleEjb = (SampleEjb) ic.lookup("java:global/classes/SampleEjb"); - System.out.println("Invoking SampleEjb [" + sampleEjb + "]"); - Assert.assertEquals(sampleEjb.saySomething(), "Hello World"); - System.out.println("SampleEjb tested successfully"); - - System.out.println("Looking up TimerEjb."); - TimerEjb timerEjb = (TimerEjb) ic.lookup("java:global/classes/TimerEjb"); - System.out.println("Invoking TimerEjb [" + timerEjb + "]"); - timerEjb.createTimer(); - System.out.println("Verifying TimerEjb [" + timerEjb + "]"); - Thread.sleep(4000); - boolean result = timerEjb.verifyTimer(); - Assert.assertTrue(result); - System.out.println("TimerEJB tested successfully."); - - glassfish.stop(); - glassfish.dispose(); - - System.out.println("EmbeddedTest completed."); - - } -} diff --git a/appserver/tests/embedded/ejb/ejb-api/pom.xml b/appserver/tests/embedded/ejb/ejb-api/pom.xml deleted file mode 100644 index 0a8781f3b98..00000000000 --- a/appserver/tests/embedded/ejb/ejb-api/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded.ejb - ejb-api-test - 4.1-SNAPSHOT - EJB Embedded API test - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - 4.1-SNAPSHOT - - - - - run-with-shell-jar - - - build - static-shell - - - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - - - junit - junit - - - - diff --git a/appserver/tests/embedded/ejb/ejb-api/src/main/java/org/glassfish/tests/embedded/ejb/SampleEjb.java b/appserver/tests/embedded/ejb/ejb-api/src/main/java/org/glassfish/tests/embedded/ejb/SampleEjb.java deleted file mode 100644 index 0808c94fe50..00000000000 --- a/appserver/tests/embedded/ejb/ejb-api/src/main/java/org/glassfish/tests/embedded/ejb/SampleEjb.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb; - -import javax.ejb.Stateless; - -/** - * @author Jerome Dochez - */ -@Stateless -public class SampleEjb { - - public String saySomething() { - return "Hello World"; - } -} diff --git a/appserver/tests/embedded/ejb/ejb-api/src/test/java/org/glassfish/tests/embedded/ejb/test/EmbeddedTest.java b/appserver/tests/embedded/ejb/ejb-api/src/test/java/org/glassfish/tests/embedded/ejb/test/EmbeddedTest.java deleted file mode 100644 index 0a0a9e51b98..00000000000 --- a/appserver/tests/embedded/ejb/ejb-api/src/test/java/org/glassfish/tests/embedded/ejb/test/EmbeddedTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.test; - -import org.junit.Test; -import org.junit.Assert; -import org.glassfish.tests.embedded.ejb.SampleEjb; - -import javax.ejb.embeddable.EJBContainer; -import javax.naming.Context; -import java.util.Map; -import java.util.HashMap; -import java.io.*; - -/** - * this test will use the ejb API testing. - * - * @author Jerome Dochez - */ -public class EmbeddedTest { - - public static void main(String[] args) { - EmbeddedTest test = new EmbeddedTest(); - System.setProperty("basedir", System.getProperty("user.dir")); - test.test(); - } - - public File getDeployableArtifact() { - File f = new File(System.getProperty("basedir"), "target"); - f = new File(f, "classes"); - return f; - } - - @Test - public void test() { - Map p = new HashMap(); - p.put(EJBContainer.MODULES, getDeployableArtifact()); - - try { - EJBContainer c = EJBContainer.createEJBContainer(p); - try { - Context ic = c.getContext(); - try { - System.out.println("Looking up EJB..."); - SampleEjb ejb = (SampleEjb) ic.lookup("java:global/classes/SampleEjb"); - if (ejb!=null) { - System.out.println("Invoking EJB..."); - System.out.println(ejb.saySomething()); - Assert.assertEquals(ejb.saySomething(), "Hello World"); - } - } catch (Exception e) { - System.out.println("ERROR calling EJB:"); - e.printStackTrace(); - throw new RuntimeException(e); - } - System.out.println("Done calling EJB"); - } finally { - c.close(); - } - } catch(Exception e) { - System.out.println("Error setting up EJB container"); - e.printStackTrace(); - throw new RuntimeException(e); - } - } -} diff --git a/appserver/tests/embedded/ejb/ejb-main/pom.xml b/appserver/tests/embedded/ejb/ejb-main/pom.xml deleted file mode 100644 index 11e9b02b365..00000000000 --- a/appserver/tests/embedded/ejb/ejb-main/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - org.glassfish.tests.embedded - ejb - 4.1-SNAPSHOT - - 4.0.0 - org.glassfish.tests.embedded.ejb - ejb-main-test - EJB Embedded API In a standalone program - - - - org.codehaus.mojo - exec-maven-plugin - 1.1.1 - - - test - - exec - - - - - java - - -classpath - - org.glassfish.tests.embedded.ejb.main.EmbeddedMainTest - - test - true - - - - - - - org.glassfish.tests.embedded.ejb - ejb-api-test - ${project.version} - test - - - org.glassfish.tests.embedded.ejb - ejb-api-test - ${project.version} - tests - test - - - junit - junit - test - - - org.glassfish.main.extras - glassfish-embedded-web - ${project.version} - test - - - diff --git a/appserver/tests/embedded/ejb/ejb-main/src/test/java/org/glassfish/tests/embedded/ejb/main/EmbeddedMainTest.java b/appserver/tests/embedded/ejb/ejb-main/src/test/java/org/glassfish/tests/embedded/ejb/main/EmbeddedMainTest.java deleted file mode 100644 index 56d4a389ca0..00000000000 --- a/appserver/tests/embedded/ejb/ejb-main/src/test/java/org/glassfish/tests/embedded/ejb/main/EmbeddedMainTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.main; - -import org.glassfish.tests.embedded.ejb.test.*; - -import java.io.*; - -/** - * Created by IntelliJ IDEA. - * User: dochez - * Date: Nov 2, 2009 - * Time: 10:20:01 AM - * To change this template use File | Settings | File Templates. - */ -public class EmbeddedMainTest extends EmbeddedTest { - - public static void main(String[] args) { - EmbeddedMainTest test = new EmbeddedMainTest(); - System.setProperty("basedir", System.getProperty("user.dir")); - test.test(); - } - - @Override - public File getDeployableArtifact() { - File f = new File(System.getProperty("basedir")); - f = f.getParentFile(); - f = new File(f, "ejb-api"); - f = new File(f, "target"); - f = new File(f, "classes"); - System.out.println("Using file " + f.getAbsolutePath()); - return f; - } -} diff --git a/appserver/tests/embedded/ejb/pom.xml b/appserver/tests/embedded/ejb/pom.xml deleted file mode 100755 index e683a43c6c5..00000000000 --- a/appserver/tests/embedded/ejb/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests.embedded - ejb - 4.1-SNAPSHOT - pom - EJB related Embedded Tests - - basic - ejb-api - remoteejb - - diff --git a/appserver/tests/embedded/ejb/remoteejb/pom.xml b/appserver/tests/embedded/ejb/remoteejb/pom.xml deleted file mode 100644 index 96a3d40695a..00000000000 --- a/appserver/tests/embedded/ejb/remoteejb/pom.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded.ejb - remoteejb - 4.1-SNAPSHOT - Test remote EJB deployment with org.glassfish.embeddable APIs - - remoteejb - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - -method -1 - true - - - - integration-test - - test - - -method -1 - false - - - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - 4.1-SNAPSHOT - - - - - run-with-shell-jar - - - build - static-shell - - - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - - - junit - junit - - - - diff --git a/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/RemoteEJB.java b/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/RemoteEJB.java deleted file mode 100644 index 4b619f52177..00000000000 --- a/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/RemoteEJB.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.embedded.ejb.remoteejb; - -import javax.ejb.Remote; -import javax.ejb.Stateless; - -/** - * @author bhavanishankar@java.net - */ -@Stateless -@Remote(RemoteEJBInf.class) -public class RemoteEJB { - - public String sayHi() { - return "Hi Bhavani"; - } - -} - diff --git a/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/RemoteEJBInf.java b/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/RemoteEJBInf.java deleted file mode 100644 index a74242361f3..00000000000 --- a/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/RemoteEJBInf.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.remoteejb; - -public interface RemoteEJBInf { - - public String sayHi(); - -} - diff --git a/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/SampleEjb.java b/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/SampleEjb.java deleted file mode 100644 index 37d11aca926..00000000000 --- a/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/SampleEjb.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.remoteejb; - -import javax.ejb.Stateless; - -/** - * @author Jerome Dochez - */ -@Stateless -public class SampleEjb { - - public String saySomething() { - String hello = "Hello World"; - System.out.println(hello); - return hello; - } -} diff --git a/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/TimerEjb.java b/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/TimerEjb.java deleted file mode 100644 index 828d1f1ff94..00000000000 --- a/appserver/tests/embedded/ejb/remoteejb/src/main/java/org/glassfish/tests/embedded/ejb/remoteejb/TimerEjb.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.remoteejb; - -import javax.ejb.Stateless; -import javax.ejb.Timeout; -import javax.ejb.Timer; -import javax.ejb.TimerService; -import javax.ejb.Schedule; -import javax.naming.InitialContext; - -@Stateless -public class TimerEjb { - - private static volatile boolean timeoutWasCalled = false; - private static volatile boolean autotimeoutWasCalled = false; - - public void createTimer() throws Exception { - System.err.println("In SimpleEjb:createTimer()"); - TimerService timerSvc = (TimerService) new InitialContext().lookup( - "java:comp/TimerService"); - Timer t = timerSvc.createTimer(2, "timer01"); - } - - public boolean verifyTimer() { - return timeoutWasCalled && autotimeoutWasCalled; - } - - @Timeout - private void timeout(Timer t) { - - System.err.println("in SimpleEjb: timeout " + t.getInfo()); - timeoutWasCalled = true; - } - - @Schedule(second = "*", minute = "*", hour = "*") - public void autotest() { - System.err.println("IN AUTO-TIMEOUT!!!"); - autotimeoutWasCalled = true; - } -} \ No newline at end of file diff --git a/appserver/tests/embedded/ejb/remoteejb/src/test/java/org/glassfish/tests/embedded/ejb/remoteejb/test/EJBTest.java b/appserver/tests/embedded/ejb/remoteejb/src/test/java/org/glassfish/tests/embedded/ejb/remoteejb/test/EJBTest.java deleted file mode 100644 index a6ef43ccbc8..00000000000 --- a/appserver/tests/embedded/ejb/remoteejb/src/test/java/org/glassfish/tests/embedded/ejb/remoteejb/test/EJBTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.remoteejb.test; - -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.tests.embedded.ejb.remoteejb.RemoteEJBInf; -import org.glassfish.tests.embedded.ejb.remoteejb.SampleEjb; -import org.glassfish.tests.embedded.ejb.remoteejb.TimerEjb; -import org.junit.Assert; -import org.junit.Test; - -import javax.naming.InitialContext; -import java.io.File; -import java.net.URI; - -/** - * @author bhavanishankar@java.net - */ -public class EJBTest { - - /* - public static void main(String[] args) { - EmbeddedTest test = new EmbeddedTest(); - System.setProperty("basedir", System.getProperty()); - test.test(); - } - */ - GlassFish glassfish; - - @Test - public void test() throws Exception { - - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - - - Deployer deployer = glassfish.getDeployer(); - URI uri = new File(System.getProperty("user.dir"), "target/remoteejb.jar").toURI(); - System.out.println("Deploying [" + uri + "]"); - deployer.deploy(uri); - - InitialContext ic = new InitialContext(); - - System.out.println("Looking up SampleEJB."); - SampleEjb sampleEjb = (SampleEjb) ic.lookup("java:global/remoteejb/SampleEjb"); - System.out.println("Invoking SampleEjb [" + sampleEjb + "]"); - Assert.assertEquals(sampleEjb.saySomething(), "Hello World"); - System.out.println("SampleEjb tested successfully"); - - System.out.println("Looking up TimerEjb."); - TimerEjb timerEjb = (TimerEjb) ic.lookup("java:global/remoteejb/TimerEjb"); - System.out.println("Invoking TimerEjb [" + timerEjb + "]"); - timerEjb.createTimer(); - System.out.println("Verifying TimerEjb [" + timerEjb + "]"); - Thread.sleep(4000); - boolean result = timerEjb.verifyTimer(); - Assert.assertTrue(result); - System.out.println("TimerEJB tested successfully."); - - -// ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); -// try { - System.out.println("Looking up RemoteEJB."); -// Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); - RemoteEJBInf remoteEjb = (RemoteEJBInf) ic.lookup("java:global/remoteejb/RemoteEJB"); - System.out.println("Invoking RemoteEJB [" + remoteEjb + "]"); - Assert.assertEquals(remoteEjb.sayHi(), "Hi Bhavani"); - System.out.println("RemoteEjb tested successfully"); -// } finally { -// Thread.currentThread().setContextClassLoader(oldCL); -// } - - glassfish.stop(); - glassfish.dispose(); - - System.out.println("EmbeddedTest completed."); - - } - - @Test - public void test2() throws Exception { - - } - -} diff --git a/appserver/tests/embedded/glassfish_resources_xml/README b/appserver/tests/embedded/glassfish_resources_xml/README deleted file mode 100644 index 7c2cafed42a..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/README +++ /dev/null @@ -1 +0,0 @@ -This test case is a variant of cdi_ejb_jpa test. It tests the same test scenariobut the datasource is created via glassfish-resources.xml. diff --git a/appserver/tests/embedded/glassfish_resources_xml/pom.xml b/appserver/tests/embedded/glassfish_resources_xml/pom.xml deleted file mode 100644 index 567374f65e1..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded.basic - glassfish_resources_xml - 4.1-SNAPSHOT - CDI, EJB, JPA integration test which has glassfish-resources.xml - - glassfish_resources_xml - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - false - false - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - ${project.version} - - - junit - junit - - - - - run-with-shell-jar - - - build - static-shell - - - - - junit - junit - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITestServlet.java b/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITestServlet.java deleted file mode 100644 index 438fa0d2b36..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITestServlet.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -@WebServlet(name = "BasicCDITestServlet", -urlPatterns = "/BasicCDITestServlet") - -public class BasicCDITestServlet extends HttpServlet { - - @javax.inject.Inject - TestBean testBean; - - @javax.inject.Inject - TestRequestScopedBean trsb; - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter out = httpServletResponse.getWriter(); - out.println("Hi from BasicCDITestServlet"); - if (testBean == null) { - out.println("TestBean not injected."); - } else if (trsb == null) { - out.println("TestRequestScopeBean not injected."); - } else { - out.println("TestBean injected. [" + testBean + "]"); - out.println("TestRequestScopeBean injected. [ " + trsb + "]"); - out.println("All CDI beans have been injected."); - } - invokeTestBean(out); - out.flush(); - out.close(); - } - - private void invokeTestBean(PrintWriter out) { - testBean.addPerson("Ada"); - testBean.addPerson("Bob"); - testBean.addPerson("Cub"); - out.println("Added persons."); - - Person p1 = testBean.getPerson(1L); - Person p2 = testBean.getPerson(2L); - Person p3 = testBean.getPerson(3L); - out.println("Retrieved persons: " + p1 + ", " + p2 + ", " + p3); - } -} diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/Person.java b/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/Person.java deleted file mode 100644 index 6398b5bd563..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/Person.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -import java.io.Serializable; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; - -@Entity -public class Person implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - @Basic - private String name; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof Person)) { - return false; - } - Person other = (Person) object; - if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { - return false; - } - return true; - } - - @Override - public String toString() { - return "org.glassfish.tests.embedded.cdi_ejb_jpa.Person[id=" + id + "], [name=" + - getName() + "]"; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - -} diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestBean.java b/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestBean.java deleted file mode 100644 index 6acb3f4b810..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestBean.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -//Simple TestBean to test CDI. -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -//This bean implements Serializable as it needs to be placed into a Stateful Bean -@Stateless -public class TestBean { - @PersistenceContext() - private EntityManager em; - - public void addPerson(String name) { - Person p = new Person(); - p.setName(name); - em.persist(p); - } - - public Person getPerson(Long pid) { - return em.find(Person.class, pid); - } - - public void removePerson(Long pid) { - Person p = getPerson(pid); - if(p != null) { - em.remove(p); - } - } - - public void removePerson(Person p) { - em.remove(p); - } -} diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestRequestScopedBean.java b/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestRequestScopedBean.java deleted file mode 100644 index 3b0c0d81d12..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/main/java/org/glassfish/tests/embedded/cdi_ejb_jpa/TestRequestScopedBean.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -//Simple RequestScoped TestBean to test CDI. -//This bean implements Serializable as it needs to be placed into a Stateful Bean -@javax.enterprise.context.RequestScoped -public class TestRequestScopedBean -{} diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/resources/META-INF/persistence.xml b/appserver/tests/embedded/glassfish_resources_xml/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 77a3823b611..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - java:app/jdbc/DB1 - - - - - - diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/beans.xml b/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index d0494bd3ee0..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 9d1c7da7ef0..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - /cdi_ejb_jpa - diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 24688d8be14..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - cdi_ejb_jpa - - diff --git a/appserver/tests/embedded/glassfish_resources_xml/src/test/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITest.java b/appserver/tests/embedded/glassfish_resources_xml/src/test/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITest.java deleted file mode 100644 index 2db5d05b298..00000000000 --- a/appserver/tests/embedded/glassfish_resources_xml/src/test/java/org/glassfish/tests/embedded/cdi_ejb_jpa/BasicCDITest.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cdi_ejb_jpa; - -import junit.framework.Assert; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.BootstrapProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.archive.ScatteredArchive; -import org.glassfish.embeddable.archive.ScatteredEnterpriseArchive; -import org.glassfish.embeddable.web.HttpListener; -import org.glassfish.embeddable.web.WebContainer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class BasicCDITest{ - - @Test - public void test() throws Exception { - - GlassFishProperties props = new GlassFishProperties(); - BootstrapProperties bootstrapProperties = new BootstrapProperties(); - props.setPort("http-listener", 8080); - GlassFish glassfish = GlassFishRuntime.bootstrap(bootstrapProperties).newGlassFish(props); - glassfish.start(); - - // Test Scattered Web Archive - ScatteredArchive sa = new ScatteredArchive("cdi_ejb_jpa", - ScatteredArchive.Type.WAR, new File("src/main/webapp")); - sa.addClassPath(new File("target/classes")); - sa.addClassPath(new File("src/main/resources")); - URI warURI = sa.toURI(); - printContents(warURI); - - // Deploy archive - Deployer deployer = glassfish.getDeployer(); - String appname = deployer.deploy(warURI); - System.out.println("Deployed [" + appname + "]"); - Assert.assertEquals(appname, "cdi_ejb_jpa"); - - // Now create a http listener and access the app. - WebContainer webcontainer = glassfish.getService(WebContainer.class); - HttpListener listener = new HttpListener(); - listener.setId("my-listener"); - listener.setPort(9090); - webcontainer.addWebListener(listener); - - get("http://localhost:8080/cdi_ejb_jpa/BasicCDITestServlet", - "All CDI beans have been injected."); - - deployer.undeploy(appname); - - glassfish.dispose(); - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); - } - - void printContents(URI jarURI) throws IOException { - JarFile jarfile = new JarFile(new File(jarURI)); - System.out.println("\n\n[" + jarURI + "] contents : \n"); - Enumeration entries = jarfile.entries(); - while (entries.hasMoreElements()) { - JarEntry entry = entries.nextElement(); - System.out.println(entry.getSize() + "\t" + new Date(entry.getTime()) + - "\t" + entry.getName()); - } - System.out.println(); - } -} diff --git a/appserver/tests/embedded/inplanted/pom.xml b/appserver/tests/embedded/inplanted/pom.xml deleted file mode 100755 index 614c7a322dc..00000000000 --- a/appserver/tests/embedded/inplanted/pom.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - fish.payara - payara-parent - 5.194-SNAPSHOT - - - 4.0.0 - org.glassfish.main - inplanted - 4.1-SNAPSHOT - Inplanted mode embedded testing - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - process-resources - - unpack - - - - - org.glassfish.main.distributions - web - ${project.version} - zip - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - 4.1-SNAPSHOT - - - - - run-with-shell-jar - - - build - static-shell - - - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - - - junit - junit - - - org.glassfish.main.web - web-embed-api - ${project.version} - test - - - jakarta.servlet - jakarta.servlet-api - provided - - - net.sourceforge.htmlunit - htmlunit - 1.14 - - - org.glassfish.main.tests.embedded - utils - ${project.version} - test - - - diff --git a/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/ExistingConfigurationTest.java b/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/ExistingConfigurationTest.java deleted file mode 100644 index a81a21ba886..00000000000 --- a/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/ExistingConfigurationTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.inplanted; - -import org.glassfish.hk2.api.ServiceHandle; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.internal.embedded.*; -import org.glassfish.tests.embedded.utils.EmbeddedServerUtils; -import org.junit.BeforeClass; -import org.junit.Assert; -import org.junit.Test; - -import java.io.File; -import java.util.Collection; -import java.lang.reflect.Method; - -/** - * @author Jerome Dochez - */ -public class ExistingConfigurationTest { - - @Test - public void setupServer() throws Exception { - - Server server=null; - Port port = null; - - File f = EmbeddedServerUtils.getServerLocation(); - try { - EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder(); - efsb.installRoot(f); - // find the domain root. - f = EmbeddedServerUtils.getDomainLocation(f); - f = new File(f, "config"); - f = new File(f, "domain.xml"); - Assert.assertTrue(f.exists()); - efsb.configurationFile(f, true); - server = EmbeddedServerUtils.createServer(efsb.build()); - - ServiceLocator habitat = server.getHabitat(); - Collection> vss = habitat.getAllServiceHandles(com.sun.enterprise.config.serverbeans.VirtualServer.class); - Assert.assertTrue(vss.size()>0); - for (ServiceHandle vs : vss ) { - Object virtualServer = vs.getService(); - Method m = virtualServer.getClass().getMethod("getId"); - Assert.assertNotNull("Object returned does not implement getId, is it a virtual server ?", m); - String id = (String) m.invoke(virtualServer); - System.out.println("Virtual Server " + id); - Assert.assertNotNull("Got a null virtual server ID", id); - } - Collection> nls = habitat.getAllServiceHandles(org.glassfish.grizzly.config.dom.NetworkListener.class); - Assert.assertTrue(nls.size()>1); - for (ServiceHandle nl : nls) { - Object networkListener = nl.getService(); - Method m = networkListener.getClass().getMethod("getPort"); - Assert.assertNotNull("Object returned does not implement getPort, is it a networkListener ?", m); - String p = (String) m.invoke(networkListener); - System.out.println("Network Listener " + p); - Assert.assertNotNull("Got a null networkListener port", p); - } - server.start(); - port = server.createPort(8758); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } finally { - if (port!=null) { - port.close(); - } - EmbeddedServerUtils.shutdownServer(server); - } - } -} diff --git a/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/ExistingDomainTest.java b/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/ExistingDomainTest.java deleted file mode 100644 index 10f212b692b..00000000000 --- a/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/ExistingDomainTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.inplanted; - -import org.glassfish.hk2.api.ServiceHandle; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.internal.embedded.*; -import org.glassfish.api.deployment.DeployCommandParameters; -import org.glassfish.api.admin.*; -import org.glassfish.api.container.Sniffer; -import org.glassfish.tests.embedded.utils.EmbeddedServerUtils; -import org.junit.BeforeClass; -import org.junit.Assert; -import org.junit.Test; -import org.junit.AfterClass; - -import java.io.File; -import java.util.Enumeration; -import java.util.Collection; -import java.lang.reflect.Method; - -/** - * Test embedded API with an existing domain.xml - * - * @author Jerome Dochez - */ -public class ExistingDomainTest { - static Server server; - - @BeforeClass - public static void setupServer() throws Exception { - File serverLocation = EmbeddedServerUtils.getServerLocation(); - EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder(); - efsb.installRoot(serverLocation).instanceRoot(EmbeddedServerUtils.getDomainLocation(serverLocation)); - server = EmbeddedServerUtils.createServer(efsb.build()); - } - - @Test - public void Test() throws Exception { - - ServiceLocator habitat = server.getHabitat(); - System.out.println("Process type is " + habitat.getService(ProcessEnvironment.class).getProcessType()); - Collection> listeners = habitat.getAllServiceHandles(org.glassfish.grizzly.config.dom.NetworkListener.class); - Assert.assertTrue(listeners.size()>1); - for (ServiceHandle s : listeners) { - Object networkListener = s.getService(); - Method m = networkListener.getClass().getMethod("getPort"); - Assert.assertNotNull("Object returned does not implement getPort, is it a networkListener ?", m); - String port = (String) m.invoke(networkListener); - System.out.println("Network Listener " + port); - Assert.assertNotNull("Got a null networkListener port", port); - } - } - - @AfterClass - public static void shutdownServer() throws Exception { - EmbeddedServerUtils.shutdownServer(server); - } - -} diff --git a/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/InplantedTest.java b/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/InplantedTest.java deleted file mode 100644 index 5e77ebc66fc..00000000000 --- a/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/inplanted/InplantedTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.inplanted; - -import org.junit.Test; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.AfterClass; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.internal.embedded.*; -import org.glassfish.api.container.Sniffer; -import org.glassfish.api.admin.*; -import org.glassfish.api.deployment.DeployCommandParameters; -import org.glassfish.api.embedded.web.EmbeddedWebContainer; -import org.glassfish.tests.embedded.utils.EmbeddedServerUtils; - -import java.io.File; -import java.util.Enumeration; - -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.Page; -import com.gargoylesoftware.htmlunit.html.HtmlPage; - -/** - * @author Jerome Dochez - */ -public class InplantedTest { - - static Server server; - - @BeforeClass - public static void setupServer() throws Exception { - EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder(); - efsb.installRoot(EmbeddedServerUtils.getServerLocation()); - server = EmbeddedServerUtils.createServer(efsb.build()); - } - - @Test - public void testWeb() throws Exception { - System.out.println("test web"); - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "test-classes"); - ScatteredArchive.Builder builder = new ScatteredArchive.Builder("hello", f); - builder.addClassPath(f.toURI().toURL()); - builder.resources(f); - ScatteredArchive war = builder.buildWar(); - System.out.println("War content"); - Enumeration contents = war.entries(); - while(contents.hasMoreElements()) { - System.out.println(contents.nextElement()); - } - Port http = server.createPort(8080); - ContainerBuilder b = server.createConfig(ContainerBuilder.Type.web); - server.addContainer(b); - EmbeddedWebContainer embedded = (EmbeddedWebContainer) b.create(server); - embedded.bind(http, "http"); - - DeployCommandParameters dp = new DeployCommandParameters(f); - String appName = server.getDeployer().deploy(war, dp); - WebClient webClient = new WebClient(); - Page page = webClient.getPage("http://localhost:8080/test-classes/hello"); - System.out.println("Got response " + page.getWebResponse().getContentAsString()); - Assert.assertTrue("Servlet returned wrong content", page.getWebResponse().getContentAsString().startsWith("Hello World")); - server.getDeployer().undeploy(appName, null); - } - - @Test - public void Test() { - - ServiceLocator habitat = server.getHabitat(); - System.out.println("Process type is " + habitat.getService(ProcessEnvironment.class).getProcessType()); - for (Sniffer s : habitat.getAllServices(Sniffer.class)) { - System.out.println("Got sniffer " + s.getModuleType()); - } - } - - @AfterClass - public static void shutdownServer() throws Exception { - EmbeddedServerUtils.shutdownServer(server); - } -} diff --git a/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/web/HelloWeb.java b/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/web/HelloWeb.java deleted file mode 100644 index 0e7025c52ac..00000000000 --- a/appserver/tests/embedded/inplanted/src/test/java/org/glassfish/tests/embedded/web/HelloWeb.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.annotation.WebServlet; -import javax.servlet.*; -import javax.servlet.http.*; - - -@WebServlet(urlPatterns={"/hello"}) -public class HelloWeb extends HttpServlet { - - public HelloWeb() { - System.out.println("Servlet WEB-HELLO initialized"); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World !"); - } catch(Exception e) { - e.printStackTrace(); - } - } -} diff --git a/appserver/tests/embedded/maven-plugin/applicationDispatcher/pom.xml b/appserver/tests/embedded/maven-plugin/applicationDispatcher/pom.xml deleted file mode 100644 index c787ab12bb1..00000000000 --- a/appserver/tests/embedded/maven-plugin/applicationDispatcher/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - applicationDispatcher - war - Application Dispatcher Test (maven-plugin/applicationDispatcher) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/java/test/ServletTest.java deleted file mode 100644 index 9796922f141..00000000000 --- a/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest extends HttpServlet{ - - private ServletContext context; - private static String status = "ApplicationDispatcher::PASS"; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - - try{ - RequestDispatcher requestD = - getServletContext().getRequestDispatcher("/test.jsp"); - - if ( requestD == null){ - status = "ApplicationDispatcher::FAIL"; - } - System.out.println("[Servlet.RequestDispatcher: " + requestD + "]"); - } catch (Throwable t){ - status = "ApplicationDispatcher::FAIL"; - } - System.out.println("status: " + status); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - - PrintWriter out = response.getWriter(); - response.setContentType("text/html"); - out.println(status); - } - -} diff --git a/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index cef20b82173..00000000000 --- a/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - ServletTest - ServletTest - test.ServletTest - 1000 - - - - ServletTest - /* - - - - diff --git a/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/webapp/test.jsp b/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/webapp/test.jsp deleted file mode 100644 index 11481643648..00000000000 --- a/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/main/webapp/test.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -

    Test

    diff --git a/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/test/java/org/glassfish/tests/applicationDispatcher/WebTest.java b/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/test/java/org/glassfish/tests/applicationDispatcher/WebTest.java deleted file mode 100644 index f5bd0fab69c..00000000000 --- a/appserver/tests/embedded/maven-plugin/applicationDispatcher/src/test/java/org/glassfish/tests/applicationDispatcher/WebTest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.applicationDispatcher; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; - -public class WebTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 1; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "ApplicationDispatcher", contextPath+"/ServletTest"); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - try { - URL servlet = new URL("http://localhost:8080/test"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - int index, lineNum=0; - while ((line = in.readLine()) != null) { - index = line.indexOf("::"); - System.out.println(lineNum+": "+line); - if (index != -1) { - String status = line.substring(index+2); - if (status.equalsIgnoreCase("PASS")){ - count++; - } - } - lineNum++; - } - Assert.assertTrue(count==EXPECTED_COUNT); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/dirListing/pom.xml b/appserver/tests/embedded/maven-plugin/dirListing/pom.xml deleted file mode 100644 index 78acaa6ebc2..00000000000 --- a/appserver/tests/embedded/maven-plugin/dirListing/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - dirListing - war - Directory Listing Test (maven-plugin/dirListing) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - glassfish - target/dirListing.war - 8080 - test - test - embedded - - - - start - integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/dirListing/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/dirListing/src/main/java/test/ServletTest.java deleted file mode 100644 index c43a9629379..00000000000 --- a/appserver/tests/embedded/maven-plugin/dirListing/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest extends HttpServlet implements HttpSessionListener { - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - } - - - public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionCreated]"); - } - - public void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionDestroyed]"); - } -} - - - diff --git a/appserver/tests/embedded/maven-plugin/dirListing/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/dirListing/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index 6cfdced5954..00000000000 --- a/appserver/tests/embedded/maven-plugin/dirListing/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - test.ServletTest - - - - ServletTest - ServletTest - test.ServletTest - - - - default - org.apache.catalina.servlets.DefaultServlet - - debug - 0 - - - listings - true - - 1 - - - - default - / - - - - ServletTest - /ServletTest - - - diff --git a/appserver/tests/embedded/maven-plugin/dirListing/src/test/java/org/glassfish/tests/dirListing/WebTest.java b/appserver/tests/embedded/maven-plugin/dirListing/src/test/java/org/glassfish/tests/dirListing/WebTest.java deleted file mode 100644 index 61f645f69ef..00000000000 --- a/appserver/tests/embedded/maven-plugin/dirListing/src/test/java/org/glassfish/tests/dirListing/WebTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.dirListing; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; - -public class WebTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 1; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "", contextPath+"/"); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - try { - URL servlet = new URL("http://localhost:8080/test"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - int index=0, lineNum=0; - String cookies = ""; - while ((line = in.readLine()) != null) { - System.out.println(lineNum + ": " + line); - if (line.indexOf("Directory Listing") != -1){ - System.out.println("Getting a \"Directory Listing\""); - count++; - break; - } - lineNum++; - } - Assert.assertTrue(count==EXPECTED_COUNT); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/filterURIMapping/pom.xml b/appserver/tests/embedded/maven-plugin/filterURIMapping/pom.xml deleted file mode 100644 index 4e40ee27e89..00000000000 --- a/appserver/tests/embedded/maven-plugin/filterURIMapping/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - filterURIMapping - war - Filter URI Mapping Test (maven-plugin/filterURIMapping) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/java/test/FilterTest.java b/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/java/test/FilterTest.java deleted file mode 100644 index 6a46ecbd91a..00000000000 --- a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/java/test/FilterTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import javax.servlet.*; -import javax.servlet.http.*; -public class FilterTest implements Filter{ - - private ServletContext context; - - public void destroy() { - System.out.println("[Filter.destroy]"); - } - - public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException { - System.out.println("[Filter.doFilter]"); - - ((HttpServletRequest)request).getSession().setAttribute("FILTER", "PASS"); - filterChain.doFilter(request, response); - - } - - - public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException { - System.out.println("[Filter.init]"); - context = filterConfig.getServletContext(); - } - -} diff --git a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/java/test/ServletTest.java deleted file mode 100644 index fd3835f5601..00000000000 --- a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -public class ServletTest extends HttpServlet { - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - context = config.getServletContext(); - System.out.println("[Servlet.init] " + context.getMajorVersion()); - - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - Object obj = request.getSession().getAttribute("FILTER"); - System.out.println(obj); - if ((obj != null) && (obj.equals("PASS"))) { - out.println("Filter invoked"); - } - - } - -} - - - diff --git a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100755 index 26c161e5ffd..00000000000 --- a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - nonuser - nonuser - - - - diff --git a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index cedb21a99fd..00000000000 --- a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - FilterTest - test.FilterTest - - - - FilterTest - /ServletTest - REQUEST - INCLUDE - FORWARD - ERROR - - - - ServletTest - ServletTest - test.ServletTest - - - - ServletTest - /ServletTest - - - - diff --git a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/test/java/org/glassfish/tests/filterURIMapping/WebTest.java b/appserver/tests/embedded/maven-plugin/filterURIMapping/src/test/java/org/glassfish/tests/filterURIMapping/WebTest.java deleted file mode 100644 index 0097744cb15..00000000000 --- a/appserver/tests/embedded/maven-plugin/filterURIMapping/src/test/java/org/glassfish/tests/filterURIMapping/WebTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.sessionDestroyed; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; - -public class WebTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 1; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "DESTROYED", contextPath+"/ServletTest;test=aaa"); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - BufferedReader in = null; - boolean pass = false; - try { - URL servlet = new URL("http://localhost:8080/"+contextPath); - URLConnection yc = servlet.openConnection(); - in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - int index; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.startsWith("Filter invoked")) { - pass = true; - break; - } - } - } catch(Exception e) { - e.printStackTrace(); - throw e; - } finally { - try { - if (in != null) { - in.close(); - } - } catch (IOException ioe) { - // ignore - } - } - Assert.assertTrue(pass); - } - -} diff --git a/appserver/tests/embedded/maven-plugin/getRequestURI/pom.xml b/appserver/tests/embedded/maven-plugin/getRequestURI/pom.xml deleted file mode 100644 index 4893b4711fd..00000000000 --- a/appserver/tests/embedded/maven-plugin/getRequestURI/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - getRequestURI - war - Get Request URI Test (maven-plugin/getRequestURI) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100755 index 4c414236867..00000000000 --- a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index c2b92c660ed..00000000000 --- a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - ServletTest - ServletTest - test.ServletTest - - - - ServletTest - /ServletTest - - - - diff --git a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/first.jsp b/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/first.jsp deleted file mode 100644 index 1a188fb8e9c..00000000000 --- a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/first.jsp +++ /dev/null @@ -1,68 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@ page import="java.util.*" %> -<%@ page import="java.net.*" %> - - - - First Page - - <% - String uri = request.getRequestURI(); - - // - // cant print it here bcos of the forward - do it in second.jsp - // - request.setAttribute ("uri_in_first_jsp", uri); - - String url = "/jsp/second.jsp"; - String value = URLEncoder.encode ("e;fgh@y"); // same as in main.jsp - - url = url + ";iPlanetDirectoryPro=" + value; - %> - - - - - - diff --git a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/main.jsp b/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/main.jsp deleted file mode 100644 index 6c666e7d552..00000000000 --- a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/main.jsp +++ /dev/null @@ -1,62 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@ page import="java.util.*" %> -<%@ page import="java.net.*" %> - - - - Redirecting ... - - <% - String url = "/web-getRequestURI/jsp/first.jsp"; - - String value = URLEncoder.encode ("e;fgh@y"); - url = url + ";iPlanetDirectoryPro=" + value; - - response.sendRedirect (url); - - %> - - - - diff --git a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/second.jsp b/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/second.jsp deleted file mode 100644 index 8c5db54212e..00000000000 --- a/appserver/tests/embedded/maven-plugin/getRequestURI/src/main/webapp/second.jsp +++ /dev/null @@ -1,68 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@ page import="java.util.*" %> -<%@ page import="java.net.*" %> - - - - Second Page - - <% - String thisURI = request.getRequestURI(); - - // - // retrieve the one set in first. - // - String firstURI = (String)request.getAttribute ("uri_in_first_jsp"); - - request.setAttribute("uri_in_first_jsp", firstURI); - request.setAttribute("uri_in_second_jsp", thisURI); - - out.println ("
    request.getRequestURI() of first.jsp: " + firstURI); - out.println ("
    request.getRequestURI() in second.jsp: " + thisURI); - %> - - - - - diff --git a/appserver/tests/embedded/maven-plugin/index/pom.xml b/appserver/tests/embedded/maven-plugin/index/pom.xml deleted file mode 100644 index 191b1bc7993..00000000000 --- a/appserver/tests/embedded/maven-plugin/index/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - index - pom - Index Page Test (maven-plugin/index) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - pre-integration-test - - start - - - - stop - post-integration-test - - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/index/src/test/java/org/glassfish/tests/index/WebTest.java b/appserver/tests/embedded/maven-plugin/index/src/test/java/org/glassfish/tests/index/WebTest.java deleted file mode 100644 index a43fc58cdc7..00000000000 --- a/appserver/tests/embedded/maven-plugin/index/src/test/java/org/glassfish/tests/index/WebTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.index; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; - -public class WebTest { - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - try { - URL servlet = new URL("http://localhost:8080"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - - String originalLoc = servlet.toString(); - System.out.println("\n Invoking url: " + servlet.toString()); - if (yc instanceof HttpURLConnection) { - HttpURLConnection urlConnection = (HttpURLConnection)yc; - urlConnection.setDoOutput(true); - - DataOutputStream out = - new DataOutputStream(urlConnection.getOutputStream()); - out.writeByte(1); - - int responseCode= urlConnection.getResponseCode(); - System.out.println("Response code: " + responseCode + " Expected code: 200"); - Assert.assertTrue(urlConnection.getResponseCode()==200); - } - - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/init/pom.xml b/appserver/tests/embedded/maven-plugin/init/pom.xml deleted file mode 100644 index dd8bb368ad4..00000000000 --- a/appserver/tests/embedded/maven-plugin/init/pom.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - init - pom - Bootstrap all tests to use 4.1-SNAPSHOT of glassfish-embedded-all - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - - start - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/pom.xml b/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/pom.xml deleted file mode 100644 index b17e860c349..00000000000 --- a/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - jmxUndeployEvent - war - JMX Undeployment Event Test (maven-plugin/jmsUndeploymentTest) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - integration-test - - start - deploy - undeploy - - - - stop - post-integration-test - - stop - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/main/java/test/ServletTest.java deleted file mode 100644 index 8a79b680288..00000000000 --- a/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest extends HttpServlet{ - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - - PrintWriter out = response.getWriter(); - out.println("jmxUndeployEvent::FAIL"); - } - -} diff --git a/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index 146bf3105cf..00000000000 --- a/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - ServletTest - ServletTest - test.ServletTest - - - - ServletTest - /ServletTest - - - - - - diff --git a/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/test/java/org/glassfish/tests/jmxUndeployEvent/WebTest.java b/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/test/java/org/glassfish/tests/jmxUndeployEvent/WebTest.java deleted file mode 100644 index fbc5d85c9d2..00000000000 --- a/appserver/tests/embedded/maven-plugin/jmxUndeployEvent/src/test/java/org/glassfish/tests/jmxUndeployEvent/WebTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.jmxUndeployEvent; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.DataOutputStream; -import java.io.IOException; -import java.net.URL; -import java.net.URLConnection; -import java.net.HttpURLConnection; - -public class WebTest { - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - URL url = new URL("http://localhost:8080/"+contextPath+"/ServletTest"); - URLConnection conn = url.openConnection(); - if (conn instanceof HttpURLConnection) { - HttpURLConnection urlConnection = (HttpURLConnection)conn; - urlConnection.setDoOutput(true); - DataOutputStream out = - new DataOutputStream(urlConnection.getOutputStream()); - out.writeByte(1); - int responseCode= urlConnection.getResponseCode(); - System.out.println("responseCode: " + responseCode); - Assert.assertTrue(urlConnection.getResponseCode()==404); - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/jsftest/pom.xml b/appserver/tests/embedded/maven-plugin/jsftest/pom.xml deleted file mode 100644 index a57691691c8..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsftest/pom.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - jsftest - war - Test JSF (maven-plugin/jsftest) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - 8181 - - - - - - start - deploy - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - jakarta.faces - jakarta.faces-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/jsftest/src/main/java/org/glassfish/tests/embedded/jsftest/JSFTestBean.java b/appserver/tests/embedded/maven-plugin/jsftest/src/main/java/org/glassfish/tests/embedded/jsftest/JSFTestBean.java deleted file mode 100644 index 6bcc2553f95..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsftest/src/main/java/org/glassfish/tests/embedded/jsftest/JSFTestBean.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.jsftest; - -import javax.faces.bean.ManagedBean; - -/** - * @author bhavanishankar@java.net - */ - -@ManagedBean(name = "testbean") -public class JSFTestBean { - - public TestTable[] getTestTable() { - return testTable; - } - - private TestTable[] testTable = new TestTable[]{ - new TestTable("BHAVANI", "+91999000000", "INDIA"), - new TestTable("SHANKAR", "+199999999999", "USA"), - new TestTable("Mr. X", "+122222222", "SFO"), - }; - - - public class TestTable { - String name; - String number; - String country; - - public TestTable(String name, String phone, String country) { - this.name = name; - this.number = phone; - this.country = country; - } - - public String getName() { - return name; - } - - public String getNumber() { - return number; - } - - public String getCountry() { - return country; - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/jsftest/src/main/java/org/glassfish/tests/embedded/jsftest/JSFTestServlet.java b/appserver/tests/embedded/maven-plugin/jsftest/src/main/java/org/glassfish/tests/embedded/jsftest/JSFTestServlet.java deleted file mode 100644 index da20e4da469..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsftest/src/main/java/org/glassfish/tests/embedded/jsftest/JSFTestServlet.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.jsftest; - -import javax.faces.FactoryFinder; -import javax.faces.application.Application; -import javax.faces.application.ViewHandler; -import javax.faces.component.UIViewRoot; -import javax.faces.context.FacesContext; -import javax.faces.context.FacesContextFactory; -import javax.faces.lifecycle.LifecycleFactory; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author bhavanishankar@java.net - */ - -public class JSFTestServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest request, - HttpServletResponse response) throws ServletException, IOException { - FacesContextFactory facesContextFactory = - (FacesContextFactory) FactoryFinder.getFactory( - FactoryFinder.FACES_CONTEXT_FACTORY); - - LifecycleFactory lifecycleFactory = - (LifecycleFactory) FactoryFinder.getFactory( - FactoryFinder.LIFECYCLE_FACTORY); - - ServletContext context = getServletContext(); - FacesContext facesContext = - facesContextFactory.getFacesContext(context, - request, - response, - lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE)); - - Application application = facesContext.getApplication(); - ViewHandler viewHandler = application.getViewHandler(); - UIViewRoot viewRoot = viewHandler.createView(facesContext, null); - facesContext.setViewRoot(viewRoot); - - PrintWriter pw = response.getWriter(); - pw.println("Created viewRoot " + viewRoot); - pw.flush(); - pw.close(); - } -} diff --git a/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index bd15155257f..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - /hellojsf - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index c11eb1562d6..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - javax.faces.PROJECT_STAGE - Development - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - JSFTestServlet - org.glassfish.tests.embedded.jsftest.JSFTestServlet - - - Faces Servlet - /faces/* - - - JSFTestServlet - /JSFTestServlet - - - - 30 - - - - faces/index.xhtml - - diff --git a/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/index.xhtml b/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/index.xhtml deleted file mode 100644 index c42df7abc37..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsftest/src/main/webapp/index.xhtml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - JSF Test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/embedded/maven-plugin/jsftest/src/test/java/org/glassfish/tests/embedded/jsftest/JSFTest.java b/appserver/tests/embedded/maven-plugin/jsftest/src/test/java/org/glassfish/tests/embedded/jsftest/JSFTest.java deleted file mode 100644 index f160c5c432f..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsftest/src/test/java/org/glassfish/tests/embedded/jsftest/JSFTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.jsftest; - -import org.junit.Assert; -import org.junit.Test; - -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.SecureRandom; -import java.security.cert.X509Certificate; - -public class JSFTest { - - @Test - public void testWeb() throws Exception { - - disableCertValidation(); - - goGet("http://localhost:8080/test/JSFTestServlet", "Created viewRoot"); - - // test non secure access. - goGet("http://localhost:8080/test", "BHAVANI", "SHANKAR", "Mr. X"); - - // test secure access. - goGet("https://localhost:8181/test", "BHAVANI", "SHANKAR", "Mr. X"); - } - - private static void goGet(String url, String... match) throws Exception { - try { - - URL servlet = new URL(url); - HttpURLConnection uc = (HttpURLConnection) servlet.openConnection(); - System.out.println("\nURLConnection = " + uc + " : "); - if (uc.getResponseCode() != 200) { - throw new Exception("Servlet did not return 200 OK response code"); - } - - BufferedReader in = new BufferedReader(new InputStreamReader( - uc.getInputStream())); - String line = null; - boolean[] found = new boolean[match.length]; - - int count = 0; - while ((line = in.readLine()) != null) { - System.out.println(line); - for (String m : match) { - int index = line.indexOf(m); - if (index != -1 && count < match.length) { - found[count++] = true; - System.out.println("Found [" + m + "] in the response, index = " + count); - break; - } - } - } - - for (boolean f : found) { - Assert.assertTrue(f); - } - System.out.println("\n***** SUCCESS **** Found all matches in the response.*****\n"); - in.close(); - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - - public static void disableCertValidation() { - // Create a trust manager that does not validate certificate chains - TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) { - return; - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) { - return; - } - }}; - - try { - SSLContext sc = SSLContext.getInstance("TLS"); - sc.init(null, trustAllCerts, new SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); - } catch (Exception e) { - return; - } - } - - -} diff --git a/appserver/tests/embedded/maven-plugin/jsptest/pom.xml b/appserver/tests/embedded/maven-plugin/jsptest/pom.xml deleted file mode 100644 index 4c54890b3e6..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsptest/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - jsptest - war - Test web app containing JSPs/JSTLs (maven-plugin/jsptest) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - - start - deploy - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/jsptest/src/main/java/org/glassfish/tests/embedded/jsptest/JspTestServlet.java b/appserver/tests/embedded/maven-plugin/jsptest/src/main/java/org/glassfish/tests/embedded/jsptest/JspTestServlet.java deleted file mode 100644 index 3e45f5263d0..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsptest/src/main/java/org/glassfish/tests/embedded/jsptest/JspTestServlet.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.jsptest; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author bhavanishankar@java.net - */ - -@WebServlet(name="JspTestServlet", urlPatterns = "/JspTestServlet") -public class JspTestServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter out = httpServletResponse.getWriter(); - - print("\n[OUTPUT from JspTestServlet]", out); - print("[Hi from JspTestServlet]", out); - print("[End of OUTPUT from SecureWebAppTestServlet]", out); - - out.flush(); - out.close(); - } - - private void print(String msg, PrintWriter out) { - out.println(msg); - System.out.println(msg); - } -} diff --git a/appserver/tests/embedded/maven-plugin/jsptest/src/main/resources/LocalStrings.properties b/appserver/tests/embedded/maven-plugin/jsptest/src/main/resources/LocalStrings.properties deleted file mode 100644 index 9c36532b997..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsptest/src/main/resources/LocalStrings.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -greeting_message=Hi, my name is Bhavani. What's yours? -greeting_response=Hello diff --git a/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 566cc2c28c6..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - /hellojsp - diff --git a/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d0042b99d7b..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - jsptest - - diff --git a/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/images/duke.waving.gif b/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/images/duke.waving.gif deleted file mode 100644 index 4336a2d05b9a165fa79f239cbfd347a792352c6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1305 zcmbV{>pRm60Dynn>|#TkI7a1cb277wOU`3moU;i@a@LYGDTGP4Nx56wG$Uj*H6m>; ztq^q*$z_vQad~M` zsZ4fx;CPlSvnVI$%t#bBH?<-+H8(YtpLyayT}W(dMFh8_QdaSEz4mwu zQjCc-5?n^k&*LMaykR&R6}K+sWaj1EOE@36g_w*J6Uidjb-sjV-sDZDQpprGH=~)a zAY;6fy85Z4w(djlDjFGCV%(A4?>KY<{)z2C*1I*q_CAuVr^S_hp%exLj9sL=4jY*r$>Z?qDcq>-1WY zH>@DocVai!m}!I}#6XAOL&)XceAqsLwMcJ-5_qJy*T`d(_7&Jd$KiN;Xg2z{%qr|T zhIbBvyZo z-n9h-GbIG7Sxk{(;@SF{ODsi4`s7Y5nh67&%!7~)@_7){NJRudx0>CJcxLkwjo5Om zn;~9U4xPbgVz#Kq69WX!R{#KaH39^2d!+=3NjOEU*%sZTc&#q+VA{Ir9!>tnk9#K} zwWRk@6ta~rFQl;rf#z&b9tWSk>_)BeUp?kn**=BnqTs*@70a!Mbk%B zWl0>(KI?U3UkD%)ORa|7nEFIkB(PuLGq=)gCJ<;GAiV7)k_u&Y0Xg`@<>${g5)y*x zBxo}&$XQfBln{F@ZTUOg(MPU%qlDPWLYx#!+Zn>s55Ej_RxFnocdBpN$NpOSwS7PY zH??x`grSdcCexegda%%Xw@#?;Nb!5`g1)C`Xu)23(4#W`ljDw;?l?zl(Q-OZ`Jypn zn;$j0RQ+TLTsH5rgkal)EFz_v$NuK}_%1)_ zSprZQmV_tyf!WM1ORol3f6+Z(bt`s}qcO^}e;onBjd^gDsSEE6trjyxC1i~BkpQ-J zIIrpp&(`e+*;0nq@NQ6fFFOX?XQOrDc`O0=ub?!6rxEULsj&WVO*#fL#V(nK - -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - - -Hello - - - - - - - -

    -
    - -

    - - -
    - - - <%@include file="response.jsp" %> - - - - diff --git a/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/response.jsp b/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/response.jsp deleted file mode 100644 index 1e35770dc87..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsptest/src/main/webapp/response.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%-- - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. ---%> - -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - -<%@ page import="javax.servlet.http.*" %> - -<% - String user = (String)request.getParameter("username"); - HttpSession httpSession = request.getSession(); - String users = (String)httpSession.getAttribute("users"); - if ( users == null ) { - users = user; - } - else { - users = users + ", " + user; - } - httpSession.setAttribute("users", users); -%> - - -

    , <%= users %>!

    - - - - - - - - - - - - - diff --git a/appserver/tests/embedded/maven-plugin/jsptest/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java b/appserver/tests/embedded/maven-plugin/jsptest/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java deleted file mode 100644 index 6f5c5eba265..00000000000 --- a/appserver/tests/embedded/maven-plugin/jsptest/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.jsptest; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; -import java.security.SecureRandom; -import java.security.cert.X509Certificate; - -public class JspTest { - -// private static int count = 0; - private static int EXPECTED_COUNT = 3; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - // test non secure access. - goGet("http://localhost:8080/test", "Hi, my name is Bhavani. What's yours?"); - goGet("http://localhost:8080/test/JspTestServlet", "Hi from JspTestServlet"); - - // test secure access - goGet("https://localhost:8181/test", "Hi, my name is Bhavani. What's yours?"); - goGet("https://localhost:8181/test/JspTestServlet", "Hi from JspTestServlet"); - } - - private static void goGet(String url, String result) throws Exception { - try { - disableCertValidation(); - URL servlet = new URL(url); - HttpURLConnection uc = (HttpURLConnection)servlet.openConnection(); - System.out.println("\nURLConnection = " + uc + " : "); - if (uc.getResponseCode() != 200) { - throw new Exception("Servlet did not return 200 OK response code"); - } - BufferedReader in = new BufferedReader(new InputStreamReader( - uc.getInputStream())); - String line = null; - boolean found = false; - int index; - while ((line = in.readLine()) != null) { - System.out.println(line); - index = line.indexOf(result); - if (index != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); - in.close(); - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - - public static void disableCertValidation() { - // Create a trust manager that does not validate certificate chains - TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) { - return; - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) { - return; - } - }}; - - try { - SSLContext sc = SSLContext.getInstance("TLS"); - sc.init(null, trustAllCerts, new SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); - } catch (Exception e) { - return; - } - } - - -} diff --git a/appserver/tests/embedded/maven-plugin/localejbs/pom.xml b/appserver/tests/embedded/maven-plugin/localejbs/pom.xml deleted file mode 100644 index bb53552b8e5..00000000000 --- a/appserver/tests/embedded/maven-plugin/localejbs/pom.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - localejbs - war - Test local EJBs using maven-plugin - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - pre-integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.ejb - jakarta.ejb-api - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - diff --git a/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/LocalEjbTest.java b/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/LocalEjbTest.java deleted file mode 100644 index cf1441c07cf..00000000000 --- a/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/LocalEjbTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.localejbs; - -import org.junit.Assert; -import org.junit.Test; - -import javax.naming.InitialContext; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class LocalEjbTest { - - @Test - public void testTimer() throws Exception { - try { - InitialContext ic = new InitialContext(); - TimerEjb ejb = (TimerEjb) ic.lookup("java:global/localejbs/TimerEjb"); - System.out.println("Looked up [" + ejb + "]"); - ejb.createTimer(); - System.out.println("createTimer called"); - Thread.sleep(4000); - boolean result = ejb.verifyTimer(); - System.out.println("EJB timer called: " + result); - Assert.assertTrue(result); - System.err.println("TimerEJB successful."); - } catch (Exception ex) { - ex.printStackTrace(); - } - } -} diff --git a/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/TesterServlet.java b/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/TesterServlet.java deleted file mode 100644 index 5977e3c3bef..00000000000 --- a/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/TesterServlet.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.localejbs; - -import org.junit.runner.JUnitCore; -import org.junit.runner.Result; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.annotation.WebServlet; -import java.io.IOException; - -/** - * @author bhavanishankar@dev.java.net - */ -@WebServlet(name="TesterServlet", urlPatterns="/TesterServlet") -public class TesterServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - System.out.println("TesterServlet invoked"); - Result res = JUnitCore.runClasses(LocalEjbTest.class); - if(res.getFailureCount() == 0) { - httpServletResponse.setStatus(200, "All tests passed"); - } else { - httpServletResponse.sendError(500, "One or more tests failed"); - } - } -} diff --git a/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/TimerEjb.java b/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/TimerEjb.java deleted file mode 100644 index 0152c53517d..00000000000 --- a/appserver/tests/embedded/maven-plugin/localejbs/src/main/java/org/glassfish/tests/embedded/localejbs/TimerEjb.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.localejbs; - -import javax.ejb.*; -import javax.naming.InitialContext; - -@Stateless -public class TimerEjb { - - private static volatile boolean timeoutWasCalled = false; - private static volatile boolean autotimeoutWasCalled = false; - - public void createTimer() throws Exception { - System.err.println("In SimpleEjb:createTimer()"); - TimerService timerSvc = (TimerService) new InitialContext().lookup( - "java:comp/TimerService"); - Timer t = timerSvc.createTimer(2, "timer01"); - } - - public boolean verifyTimer() { - return timeoutWasCalled && autotimeoutWasCalled; - } - - @Timeout - private void timeout(Timer t) { - System.err.println("in SimpleEjb: timeout " + t.getInfo()); - timeoutWasCalled = true; - } - - @Schedule(second = "*", minute = "*", hour = "*") - public void autotest() { - if (!autotimeoutWasCalled) { - System.err.println("AUTO-TIMEOUT called!!!"); - } - autotimeoutWasCalled = true; - } - -} diff --git a/appserver/tests/embedded/maven-plugin/localejbs/src/test/java/org/glassfish/tests/embedded/localejbs/EjbTest.java b/appserver/tests/embedded/maven-plugin/localejbs/src/test/java/org/glassfish/tests/embedded/localejbs/EjbTest.java deleted file mode 100644 index 2929f76af37..00000000000 --- a/appserver/tests/embedded/maven-plugin/localejbs/src/test/java/org/glassfish/tests/embedded/localejbs/EjbTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.localejbs; - -import org.junit.Test; - -import java.net.HttpURLConnection; -import java.net.URL; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class EjbTest { - - @Test - public void test() throws Exception { - URL url = new URL("http://localhost:8080/test/TesterServlet"); - HttpURLConnection uc = (HttpURLConnection)url.openConnection(); - System.out.println("Test status : " + uc.getResponseMessage()); - if(uc.getResponseCode() != 200) { - throw new Exception(uc.getResponseMessage()); - } - uc.disconnect(); - } -} diff --git a/appserver/tests/embedded/maven-plugin/mdb/pom.xml b/appserver/tests/embedded/maven-plugin/mdb/pom.xml deleted file mode 100644 index bc7b023b028..00000000000 --- a/appserver/tests/embedded/maven-plugin/mdb/pom.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - mdb - war - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - pre-integration-test - - start - - - - admin - pre-integration-test - - admin - - - - create-jms-resource --restype javax.jms.Queue --property imqDestinationName=TestQueue jms/TestQueue - create-jms-resource --restype javax.jms.QueueConnectionFactory jms/TestQueueConnectionFactory - - - - - deploy - pre-integration-test - - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - junit - junit - - - jakarta.jms - jakarta.jms-api - - - jakarta.servlet - jakarta.servlet-api - - - jakarta.ejb - jakarta.ejb-api - - - - diff --git a/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/MessageProcessorBean.java b/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/MessageProcessorBean.java deleted file mode 100644 index 50a04eeb0e5..00000000000 --- a/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/MessageProcessorBean.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.mdb; - -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; -import java.io.File; -import java.io.FileOutputStream; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * @author bhavanishankar@dev.java.net - */ - -@MessageDriven(mappedName = "jms/TestQueue", activationConfig = { - @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), - @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") -}) -public class MessageProcessorBean implements MessageListener { - - private static Logger logger = Logger.getAnonymousLogger(); - - public void onMessage(Message message) { - try { - String msg = ((TextMessage) message).getText(); - logger.log(Level.INFO, "Message Received [" + msg + "]"); - FileOutputStream os = new FileOutputStream(new File( - System.getProperty("java.io.tmpdir"), "embedded_mdb_onmessage.txt")); - os.write(msg.getBytes()); - os.flush(); - os.close(); - } catch (Exception ex) { - logger.log(Level.WARNING, ex.getMessage(), ex); - } - } -} diff --git a/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/TesterServlet.java b/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/TesterServlet.java deleted file mode 100644 index 755adca709d..00000000000 --- a/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/TesterServlet.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.mdb; - -import org.junit.runner.JUnitCore; -import org.junit.runner.Result; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.annotation.WebServlet; -import java.io.IOException; - -/** - * @author bhavanishankar@dev.java.net - */ -@WebServlet(name="TesterServlet", urlPatterns="/TesterServlet") -public class TesterServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - System.out.println("TesterServlet invoked"); - Result res = JUnitCore.runClasses(UnitTest.class); - if(res.getFailureCount() == 0) { - httpServletResponse.setStatus(200, "All tests passed"); - } else { - httpServletResponse.sendError(500, "One or more tests failed"); - } - } -} diff --git a/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/UnitTest.java b/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/UnitTest.java deleted file mode 100644 index dd1b5e1e0b3..00000000000 --- a/appserver/tests/embedded/maven-plugin/mdb/src/main/java/org/glassfish/tests/embedded/mdb/UnitTest.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.mdb; - -import org.junit.Assert; -import org.junit.Test; - -import javax.jms.QueueConnection; -import javax.jms.QueueConnectionFactory; -import javax.jms.QueueSender; -import javax.jms.QueueSession; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.InitialContext; -import java.io.File; -import java.io.FileInputStream; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class UnitTest { - - @Test - public void testTimer() throws Exception { - QueueConnection queueConnection = null; - QueueSession queueSession = null; - try { - InitialContext ic = new InitialContext(); - - QueueConnectionFactory qcf = (QueueConnectionFactory) - ic.lookup("jms/TestQueueConnectionFactory"); - javax.jms.Queue queue = (javax.jms.Queue) ic.lookup("jms/TestQueue"); - - queueConnection = qcf.createQueueConnection(); - queueConnection.start(); - - queueSession = queueConnection.createQueueSession(false, - Session.AUTO_ACKNOWLEDGE); - - QueueSender sender = queueSession.createSender(queue); - - String str = "Hi From BHAVANI"; - TextMessage msg = queueSession.createTextMessage(str); - sender.send(msg); - - Thread.sleep(5000); - - byte[] message = new byte[msg.getText().length()]; - - File savedFile = new File(System.getProperty("java.io.tmpdir"), - "embedded_mdb_onmessage.txt"); - FileInputStream is = new FileInputStream(savedFile); - is.read(message); - - String savedMsg = new String(message); - - if(!savedMsg.equals(str)) { - throw new Exception("Sent message [" + str + - " ] does not match the received message [" + savedMsg + "]"); - } else { - System.out.println("Sent message [" + str + - " ] matches the received message [" + savedMsg + "]"); - } - savedFile.delete(); - } finally { - try { - queueSession.close(); - queueConnection.close(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - } -} diff --git a/appserver/tests/embedded/maven-plugin/mdb/src/test/java/org/glassfish/tests/embedded/mdb/MyTest.java b/appserver/tests/embedded/maven-plugin/mdb/src/test/java/org/glassfish/tests/embedded/mdb/MyTest.java deleted file mode 100644 index a19e290a971..00000000000 --- a/appserver/tests/embedded/maven-plugin/mdb/src/test/java/org/glassfish/tests/embedded/mdb/MyTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.mdb; - -import org.junit.Test; - -import java.net.HttpURLConnection; -import java.net.URL; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class MyTest { - - @Test - public void test() throws Exception { - URL url = new URL("http://localhost:8080/test/TesterServlet"); - HttpURLConnection uc = (HttpURLConnection) url.openConnection(); - System.out.println("Test status : " + uc.getResponseMessage()); - if (uc.getResponseCode() != 200) { - throw new Exception(uc.getResponseMessage()); - } - uc.disconnect(); - } -} diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/pom.xml b/appserver/tests/embedded/maven-plugin/multipleApps/pom.xml deleted file mode 100644 index 2340412e5fb..00000000000 --- a/appserver/tests/embedded/maven-plugin/multipleApps/pom.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - multipleApps - war - Multiple application deployment test (maven-plugin/multipleApps) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - - start - pre-integration-test - - start - - - - - admin - pre-integration-test - - admin - - - - list-applications - - - - - - deploy - pre-integration-test - - deploy - - - - - deploy2 - pre-integration-test - - deploy - - - secondapp/secondapp.war - secondapp - secondapp - - --verify=true - - - - - - undeploy - post-integration-test - - undeploy - - - secondapp - - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/secondapp/secondapp.war b/appserver/tests/embedded/maven-plugin/multipleApps/secondapp/secondapp.war deleted file mode 100644 index b17f8a946cf2596d2c92225e1870a3eac8d0c821..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4213 zcmZ`+2{=^i8z1{x#uz(kv&P68k@eb5mdIM!#!k#wQ$lD^#t=eARO6=2o?X_gA+iqH z#uC#=*Bxn`ObXvJn!#(?|HZLd(BPg=)nMH(j`_Ds0E-B763f}s%NDw zV{~3$_Mi&@paYnjFfo%gXn(4i|0fts()b02YM(dK*SlZ^f$D#S_H>(?$Up`TnaD`J z>**`AJUyf^jfX>wq0&asf#4!~mix>6t%6ySp7faulH2ZLym($4p3KJ!Jg34IL|44l z;a}i1KMWC1%55B0LaXdJuRyVOVkU z(e$|12;Iu#w6NAkpn8Lo2Ys5?PwBrEmwkA5v*{ry?@IMT0dZ}@Dx3>eA1#&Fvan%i zEtXazH72{~@r{9;Lz4=lY|%6TKmjR{{yTImq|kZ!yTQW9al2~?^&!Qre$R%zzywku zoWa=Tk`vkgUMIpU`+}ri#@kBe)F;M|pt#iUn37y`fop#@wJTivy3o61U8~+V{o*U4 zzs0avQ}ZVJ>mn^=kUp=174i<<-@dpOXvy%#$JMD#pP5hYLGda1szm0qI;I3p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PT|YZbCx~2K;km`~N&f9@+jWzh*G<0QWnTdV(SkY!o?1+Wvx4jc?RX zAWvG+x%};Kmm7^vNk^^VKlZkI(EtDd diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/java/org/glassfish/tests/embedded/jsptest/JspTestServlet.java b/appserver/tests/embedded/maven-plugin/multipleApps/src/main/java/org/glassfish/tests/embedded/jsptest/JspTestServlet.java deleted file mode 100644 index 214a9ee5d00..00000000000 --- a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/java/org/glassfish/tests/embedded/jsptest/JspTestServlet.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.jsptest; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author bhavanishankar@java.net - */ - -@WebServlet(name="JspTestServlet", urlPatterns = "/JspTestServlet") -public class JspTestServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter out = httpServletResponse.getWriter(); - - print("\n[OUTPUT from JspTestServlet]", out); - print("[Hi from JspTestServlet]", out); - print("[End of OUTPUT from SecureWebAppTestServlet]", out); - - out.flush(); - out.close(); - } - - private void print(String msg, PrintWriter out) { - out.println(msg); - System.out.println(msg); - } -} diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/resources/LocalStrings.properties b/appserver/tests/embedded/maven-plugin/multipleApps/src/main/resources/LocalStrings.properties deleted file mode 100644 index a1e80cd5d28..00000000000 --- a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/resources/LocalStrings.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -greeting_message=Hi, my name is Bhavani. What's yours? -greeting_response=Hello diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 5eeeadaac87..00000000000 --- a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - /firstapp - diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 69fcb92b390..00000000000 --- a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - firstapp - - diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/images/duke.waving.gif b/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/images/duke.waving.gif deleted file mode 100644 index 4336a2d05b9a165fa79f239cbfd347a792352c6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1305 zcmbV{>pRm60Dynn>|#TkI7a1cb277wOU`3moU;i@a@LYGDTGP4Nx56wG$Uj*H6m>; ztq^q*$z_vQad~M` zsZ4fx;CPlSvnVI$%t#bBH?<-+H8(YtpLyayT}W(dMFh8_QdaSEz4mwu zQjCc-5?n^k&*LMaykR&R6}K+sWaj1EOE@36g_w*J6Uidjb-sjV-sDZDQpprGH=~)a zAY;6fy85Z4w(djlDjFGCV%(A4?>KY<{)z2C*1I*q_CAuVr^S_hp%exLj9sL=4jY*r$>Z?qDcq>-1WY zH>@DocVai!m}!I}#6XAOL&)XceAqsLwMcJ-5_qJy*T`d(_7&Jd$KiN;Xg2z{%qr|T zhIbBvyZo z-n9h-GbIG7Sxk{(;@SF{ODsi4`s7Y5nh67&%!7~)@_7){NJRudx0>CJcxLkwjo5Om zn;~9U4xPbgVz#Kq69WX!R{#KaH39^2d!+=3NjOEU*%sZTc&#q+VA{Ir9!>tnk9#K} zwWRk@6ta~rFQl;rf#z&b9tWSk>_)BeUp?kn**=BnqTs*@70a!Mbk%B zWl0>(KI?U3UkD%)ORa|7nEFIkB(PuLGq=)gCJ<;GAiV7)k_u&Y0Xg`@<>${g5)y*x zBxo}&$XQfBln{F@ZTUOg(MPU%qlDPWLYx#!+Zn>s55Ej_RxFnocdBpN$NpOSwS7PY zH??x`grSdcCexegda%%Xw@#?;Nb!5`g1)C`Xu)23(4#W`ljDw;?l?zl(Q-OZ`Jypn zn;$j0RQ+TLTsH5rgkal)EFz_v$NuK}_%1)_ zSprZQmV_tyf!WM1ORol3f6+Z(bt`s}qcO^}e;onBjd^gDsSEE6trjyxC1i~BkpQ-J zIIrpp&(`e+*;0nq@NQ6fFFOX?XQOrDc`O0=ub?!6rxEULsj&WVO*#fL#V(nK - -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - - -Hello - - - - - - - -

    -
    - -

    - - -
    - - - <%@include file="response.jsp" %> - - - - diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/response.jsp b/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/response.jsp deleted file mode 100644 index 6ab30f3075c..00000000000 --- a/appserver/tests/embedded/maven-plugin/multipleApps/src/main/webapp/response.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%-- - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. ---%> - -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - -<%@ page import="javax.servlet.http.*" %> - -<% - String user = (String)request.getParameter("username"); - HttpSession httpSession = request.getSession(); - String users = (String)httpSession.getAttribute("users"); - if ( users == null ) { - users = user; - } - else { - users = users + ", " + user; - } - httpSession.setAttribute("users", users); -%> - - -

    , <%= users %>!

    - - - - - - - - - - - - - diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java b/appserver/tests/embedded/maven-plugin/multipleApps/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java deleted file mode 100644 index bc0038209f4..00000000000 --- a/appserver/tests/embedded/maven-plugin/multipleApps/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.jsptest; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; -import java.security.SecureRandom; -import java.security.cert.X509Certificate; - -public class JspTest { - -// private static int count = 0; - private static int EXPECTED_COUNT = 3; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - // test non secure access. - goGet("http://localhost:8080/test", "Hi, my name is Bhavani. What's yours?"); - goGet("http://localhost:8080/test/JspTestServlet", "Hi from JspTestServlet"); - - // test secure access - goGet("https://localhost:8181/test", "Hi, my name is Bhavani. What's yours?"); - goGet("https://localhost:8181/test/JspTestServlet", "Hi from JspTestServlet"); - - // test second app - goGet("http://localhost:8080/secondapp", "Hi, my name is Duke. What's yours?"); - goGet("https://localhost:8181/secondapp", "Hi, my name is Duke. What's yours?"); - } - - private static void goGet(String url, String result) throws Exception { - try { - disableCertValidation(); - URL servlet = new URL(url); - HttpURLConnection uc = (HttpURLConnection)servlet.openConnection(); - System.out.println("\nURLConnection = " + uc + " : "); - if (uc.getResponseCode() != 200) { - throw new Exception("Servlet did not return 200 OK response code"); - } - BufferedReader in = new BufferedReader(new InputStreamReader( - uc.getInputStream())); - String line = null; - boolean found = false; - int index; - while ((line = in.readLine()) != null) { - System.out.println(line); - index = line.indexOf(result); - if (index != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); - in.close(); - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - - public static void disableCertValidation() { - // Create a trust manager that does not validate certificate chains - TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) { - return; - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) { - return; - } - }}; - - try { - SSLContext sc = SSLContext.getInstance("TLS"); - sc.init(null, trustAllCerts, new SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); - } catch (Exception e) { - return; - } - } - - -} diff --git a/appserver/tests/embedded/maven-plugin/pom.xml b/appserver/tests/embedded/maven-plugin/pom.xml deleted file mode 100644 index a9f09a11356..00000000000 --- a/appserver/tests/embedded/maven-plugin/pom.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - pom - GlassFish Embedded Maven Plugin Tests - - - UTF-8 - - - - - run-with-promoted-builds - - true - - - - applicationDispatcher - dirListing - filterURIMapping - getRequestURI - index - jmxUndeployEvent - queryString - - sessionDestroyed - standalonewar - websockets - webservice - secureWebApp - jsptest - jsftest - localejbs - multipleApps - - - - - run-with-snapshot-builds - - - build - snapshot - - - - - init - applicationDispatcher - dirListing - filterURIMapping - getRequestURI - index - jmxUndeployEvent - queryString - sessionDestroyed - standalonewar - websockets - webservice - secureWebApp - jsptest - jsftest - localejbs - multipleApps - - - - - run-with-shell-jar - - - build - static-shell - - - - static-shell-init - applicationDispatcher - dirListing - filterURIMapping - getRequestURI - index - jmxUndeployEvent - queryString - sessionDestroyed - standalonewar - websockets - webservice - secureWebApp - jsptest - jsftest - localejbs - multipleApps - - - - - - - install - src/test/java - ${project.artifactId} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - never - - - - integration-test - - test - - - false - never - - target/classes - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-war-plugin - - false - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - ${project.version} - - glassfish - target/${project.artifactId}.war - 8080 - ${project.artifactId} - test - embedded - - 8181 - - - - - org.glassfish.main.common - simple-glassfish-api - ${project.version} - - - org.glassfish.main.extras - glassfish-embedded-all - ${project.version} - - - - - - - - - - - org.apache.maven - maven-plugin-api - ${maven.plugin.api.version} - - - org.apache.maven - maven-project - 2.0 - - - jakarta.servlet - jakarta.servlet-api - provided - - - junit - junit - - - jakarta.faces - jakarta.faces-api - 2.1 - provided - - - jakarta.ejb - jakarta.ejb-api - 3.2-b01 - provided - - - org.glassfish.main.extras - glassfish-embedded-all - ${project.version} - test - - - org.glassfish.grizzly - grizzly-websockets - 2.1 - provided - - - org.glassfish.grizzly - grizzly-http-servlet - 2.1 - provided - - - jakarta.jms - jakarta.jms-api - provided - ${jms-api.version} - - - - diff --git a/appserver/tests/embedded/maven-plugin/queryString/pom.xml b/appserver/tests/embedded/maven-plugin/queryString/pom.xml deleted file mode 100644 index ff258abc85b..00000000000 --- a/appserver/tests/embedded/maven-plugin/queryString/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - queryString - war - Query String Test (maven-plugin/queryString) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - pre-integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/queryString/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/queryString/src/main/java/test/ServletTest.java deleted file mode 100644 index 612517028cd..00000000000 --- a/appserver/tests/embedded/maven-plugin/queryString/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -public class ServletTest extends HttpServlet { - private static boolean isRedirected = false; - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - context = config.getServletContext(); - System.out.println("[Servlet.init] " + context.getMajorVersion()); - - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - System.out.println("requestUri: " + request.getRequestURI()); - - if (!isRedirected){ - String url = request.getParameter("url") + "?TEST=PASS"; - System.out.println("[URL] " + url); - response.sendRedirect(url); - isRedirected = true; - out.println("TEST:FAIL"); - out.flush(); - return; - } - - out.println("TEST:" + request.getParameter("TEST")); - out.flush(); - } - -} - - - diff --git a/appserver/tests/embedded/maven-plugin/queryString/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/queryString/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 4ec3c1c76fe..00000000000 --- a/appserver/tests/embedded/maven-plugin/queryString/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - ServletTest - ServletTest - test.ServletTest - - - - ServletTest - /ServletTest - - - - 10 - - - - diff --git a/appserver/tests/embedded/maven-plugin/queryString/src/test/java/org/glassfish/tests/queryString/WebTest.java b/appserver/tests/embedded/maven-plugin/queryString/src/test/java/org/glassfish/tests/queryString/WebTest.java deleted file mode 100644 index 9e3cf20e0b6..00000000000 --- a/appserver/tests/embedded/maven-plugin/queryString/src/test/java/org/glassfish/tests/queryString/WebTest.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.queryString; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; - -public class WebTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 1; - - private String contextPath = "/test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "TEST", contextPath+"/ServletTest"); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - try { - contextPath += "?url=" + contextPath; - System.out.println("Connecting "+contextPath); - URL servlet = new URL("http://localhost:8080/"+contextPath); - //URL servlet = new URL("http://localhost:8080/test/ServletTest?TEST=PASS"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - - String line = null; - int index; - while ((line = in.readLine()) != null) { - index = line.indexOf(result); - System.out.println("[Server response]" + line); - - int pos = line.indexOf("Location"); - if (pos != -1){ - contextPath = line.substring(pos + "Location:".length()).trim(); - in.close(); - break; - } - } - - servlet = new URL("http://localhost:8080/"+contextPath); - yc = servlet.openConnection(); - in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - while ((line = in.readLine()) != null) { - index = line.indexOf(result); - System.out.println("[Redirect response]" + line); - - if (index != -1) { - index = line.indexOf(":"); - String status = line.substring(index+1); - - if (status.equalsIgnoreCase("PASS")){ - count++; - } else { - break; - } - } - } - - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/remoteejbs/pom.xml b/appserver/tests/embedded/maven-plugin/remoteejbs/pom.xml deleted file mode 100644 index c006f609220..00000000000 --- a/appserver/tests/embedded/maven-plugin/remoteejbs/pom.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - remoteejbs - war - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - pre-integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.ejb - jakarta.ejb-api - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/remoteejbs/src/main/java/org/glassfish/tests/embedded/remoteejbs/TimerEjb.java b/appserver/tests/embedded/maven-plugin/remoteejbs/src/main/java/org/glassfish/tests/embedded/remoteejbs/TimerEjb.java deleted file mode 100644 index d9eec661a43..00000000000 --- a/appserver/tests/embedded/maven-plugin/remoteejbs/src/main/java/org/glassfish/tests/embedded/remoteejbs/TimerEjb.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.remoteejbs; - -import javax.ejb.*; -import javax.naming.InitialContext; - -@Stateless -public class TimerEjb implements TimerRemote { - - private static volatile boolean timeoutWasCalled = false; - private static volatile boolean autotimeoutWasCalled = false; - - public void createTimer() throws Exception { - System.err.println("In SimpleEjb:createTimer()"); - TimerService timerSvc = (TimerService) new InitialContext().lookup( - "java:comp/TimerService"); - Timer t = timerSvc.createTimer(2, "timer01"); - } - - public boolean verifyTimer() { - return timeoutWasCalled && autotimeoutWasCalled; - } - - @Timeout - private void timeout(Timer t) { - System.err.println("in SimpleEjb: timeout " + t.getInfo()); - timeoutWasCalled = true; - } - - @Schedule(second = "*", minute = "*", hour = "*") - public void autotest() { - if (!autotimeoutWasCalled) { - System.err.println("AUTO-TIMEOUT called!!!"); - } - autotimeoutWasCalled = true; - } - -} diff --git a/appserver/tests/embedded/maven-plugin/remoteejbs/src/main/java/org/glassfish/tests/embedded/remoteejbs/TimerRemote.java b/appserver/tests/embedded/maven-plugin/remoteejbs/src/main/java/org/glassfish/tests/embedded/remoteejbs/TimerRemote.java deleted file mode 100644 index cc99efd21d2..00000000000 --- a/appserver/tests/embedded/maven-plugin/remoteejbs/src/main/java/org/glassfish/tests/embedded/remoteejbs/TimerRemote.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.remoteejbs; - -import javax.ejb.Remote; - -/** - * @author bhavanishankar@dev.java.net - */ -@Remote -public interface TimerRemote { - - void createTimer() throws Exception; - - boolean verifyTimer() throws Exception; -} diff --git a/appserver/tests/embedded/maven-plugin/remoteejbs/src/test/java/org/glassfish/tests/embedded/remoteejbs/EjbTest.java b/appserver/tests/embedded/maven-plugin/remoteejbs/src/test/java/org/glassfish/tests/embedded/remoteejbs/EjbTest.java deleted file mode 100644 index 4ebb19016eb..00000000000 --- a/appserver/tests/embedded/maven-plugin/remoteejbs/src/test/java/org/glassfish/tests/embedded/remoteejbs/EjbTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.remoteejbs; - -import org.glassfish.tests.embedded.remoteejbs.*; -import org.junit.Assert; -import org.junit.Test; - -import javax.naming.InitialContext; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class EjbTest { - - @Test - public void testTimer() throws Exception { - try { - InitialContext ic = new InitialContext(); - TimerRemote ejb = - (TimerRemote) ic.lookup("java:global/remoteejbs/TimerEjb"); - System.out.println("Looked up [" + ejb + "]"); - ejb.createTimer(); - System.out.println("createTimer called"); - Thread.sleep(4000); - boolean result = ejb.verifyTimer(); - System.out.println("EJB timer called: " + result); - Assert.assertTrue(result); - System.err.println("TimerEJB successful."); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/scattered/pom.xml b/appserver/tests/embedded/maven-plugin/scattered/pom.xml deleted file mode 100644 index f955b57de1e..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish - scattered - pom - - Maven deploy test - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - src/main/web - - - - install - - runscatteredarchive - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/FilterTest.java b/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/FilterTest.java deleted file mode 100755 index 6a46ecbd91a..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/FilterTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import javax.servlet.*; -import javax.servlet.http.*; -public class FilterTest implements Filter{ - - private ServletContext context; - - public void destroy() { - System.out.println("[Filter.destroy]"); - } - - public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException { - System.out.println("[Filter.doFilter]"); - - ((HttpServletRequest)request).getSession().setAttribute("FILTER", "PASS"); - filterChain.doFilter(request, response); - - } - - - public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException { - System.out.println("[Filter.init]"); - context = filterConfig.getServletContext(); - } - -} diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest.java deleted file mode 100644 index c71b7e39d77..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; -import org.xml.sax.InputSource; -import org.w3c.dom.Element; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.w3c.dom.Node; - -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.SAXException; - -// jaxp 1.0.1 imports -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest extends HttpServlet implements HttpSessionListener { - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - context = config.getServletContext(); - System.out.println("[Servlet.init] " + context.getMajorVersion()); - - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - request.getSession().setAttribute("FILTER-REQUEST", request.getSession().getAttribute("FILTER")); - request.getSession().setAttribute("FILTER", "FAIL"); - - RequestDispatcher rd = context.getRequestDispatcher("/ServletTest2"); - rd.forward(request, response); - } - - public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionCreated]"); - } - - public void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionDestroyed]"); - System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test")); - } -} - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest2.java b/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest2.java deleted file mode 100755 index 3a5eab4f14a..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest2.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -public class ServletTest2 extends HttpServlet implements HttpSessionListener { - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet2.init]"); - context = config.getServletContext(); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet2.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet2.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - request.getSession().setAttribute("FILTER-FORWARD",request.getSession().getAttribute("FILTER")); - request.getSession().setAttribute("FILTER", "FAIL"); - - RequestDispatcher rd = request.getRequestDispatcher("/ServletTest3"); - rd.include(request, response); - } - - public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionCreated]"); - } - - public void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionDestroyed]"); - System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test")); - } - -} - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest3.java b/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest3.java deleted file mode 100644 index bbbf5ee9fbd..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest3.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; -import org.xml.sax.InputSource; -import org.w3c.dom.Element; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.w3c.dom.Node; - -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.SAXException; - -// jaxp 1.0.1 imports -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest3 extends HttpServlet{ - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet3.init]"); - context = config.getServletContext(); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet3.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet3.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - out.println("FILTER-REQUEST:" + request.getSession().getAttribute("FILTER-REQUEST")); - out.println("FILTER-FORWARD:" + request.getSession().getAttribute("FILTER-FORWARD")); - out.println("FILTER-INCLUDE:" + request.getSession().getAttribute("FILTER")); - } - -} - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index aaa23b899ce..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -tomcat-test - - - tomcat - tomcat - tomcat - - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index b208502f585..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - FilterTest - test.FilterTest - - - - FilterTest - /* - REQUEST - INCLUDE - FORWARD - ERROR - - - - ServletTest - ServletTest - test.ServletTest - - - ServletTest2 - ServletTest2 - test.ServletTest2 - - - ServletTest3 - ServletTest3 - test.ServletTest3 - - - - ServletTest - /ServletTest - - - ServletTest2 - /ServletTest2 - - - ServletTest3 - /ServletTest3 - - - - 10 - - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.html b/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.html deleted file mode 100755 index d33b9219adb..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - -Hello World! - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.jsp b/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.jsp deleted file mode 100644 index 4efc6922793..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - - - - -

    <% out.print("Hello World!"); %>

    - - diff --git a/appserver/tests/embedded/maven-plugin/secureWebApp/bootstrap.properties b/appserver/tests/embedded/maven-plugin/secureWebApp/bootstrap.properties deleted file mode 100644 index 3181683883f..00000000000 --- a/appserver/tests/embedded/maven-plugin/secureWebApp/bootstrap.properties +++ /dev/null @@ -1,41 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -test_key2=test_value_2 diff --git a/appserver/tests/embedded/maven-plugin/secureWebApp/glassfish.properties b/appserver/tests/embedded/maven-plugin/secureWebApp/glassfish.properties deleted file mode 100644 index f49d3a83340..00000000000 --- a/appserver/tests/embedded/maven-plugin/secureWebApp/glassfish.properties +++ /dev/null @@ -1,41 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -embedded-glassfish-config.server.jms-service.jms-host.default_JMS_host.host=0.0.0.0 diff --git a/appserver/tests/embedded/maven-plugin/secureWebApp/pom.xml b/appserver/tests/embedded/maven-plugin/secureWebApp/pom.xml deleted file mode 100644 index 91f397af9fe..00000000000 --- a/appserver/tests/embedded/maven-plugin/secureWebApp/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - securewebapp - war - Test https and other plugin configurations (maven-plugin/secureWebApp) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - test_key=test_value - - bootstrap.properties - - embedded-glassfish-config.server.jms-service.jms-host.default_JMS_host.port=17676 - - glassfish.properties - - ANTLR_USE_DIRECT_CLASS_LOADING=true - - system.properties - - - - - start - deploy - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - jakarta.ejb - jakarta.ejb-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/secureWebApp/src/main/java/test/SecureWebAppTestServlet.java b/appserver/tests/embedded/maven-plugin/secureWebApp/src/main/java/test/SecureWebAppTestServlet.java deleted file mode 100644 index c36b823ad3c..00000000000 --- a/appserver/tests/embedded/maven-plugin/secureWebApp/src/main/java/test/SecureWebAppTestServlet.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author bhavanishankar@java.net - */ - -@WebServlet(name="SecureWebAppTestServlet", urlPatterns = "/SecureWebAppTestServlet") -public class SecureWebAppTestServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter out = httpServletResponse.getWriter(); - - print("\n[OUTPUT from SecureWebAppTestServlet]", out); - print("[Hi from SecureWebAppTestServlet]", out); - - String sysProp = System.getProperty("org.glassfish.embedded.greeting"); - print("[System property org.glassfish.embedded.greeting = " + sysProp + "]", out); - if(!"Hi from BHAVANI".equals(sysProp)) { - httpServletResponse.sendError(500, - "System property org.glassfish.embedded.greeting not found"); - return; - } - - Boolean directClassLoading = Boolean.getBoolean("ANTLR_USE_DIRECT_CLASS_LOADING"); - print("[System property ANTLR_USE_DIRECT_CLASS_LOADING = " + - System.getProperty("ANTLR_USE_DIRECT_CLASS_LOADING") + "]", out); - if(!directClassLoading) { - httpServletResponse.sendError(500, - "System property ANTLR_USE_DIRECT_CLASS_LOADING is not set"); - return; - } - print("[End of OUTPUT from SecureWebAppTestServlet]", out); - - out.flush(); - out.close(); - } - - private void print(String msg, PrintWriter out) { - out.println(msg); - System.out.println(msg); - } -} diff --git a/appserver/tests/embedded/maven-plugin/secureWebApp/src/test/java/org/glassfish/tests/embedded/securewebapp/SecureWebAppTest.java b/appserver/tests/embedded/maven-plugin/secureWebApp/src/test/java/org/glassfish/tests/embedded/securewebapp/SecureWebAppTest.java deleted file mode 100644 index 801b405d2e0..00000000000 --- a/appserver/tests/embedded/maven-plugin/secureWebApp/src/test/java/org/glassfish/tests/embedded/securewebapp/SecureWebAppTest.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - - -package org.glassfish.tests.embedded.securewebapp; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URL; -import java.security.SecureRandom; -import java.security.cert.X509Certificate; - -public class SecureWebAppTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 3; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "Hi from SecureWebAppTestServlet", contextPath); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - try { - disableCertValidation(); - URL servlet = new URL("https://localhost:8181/test/SecureWebAppTestServlet"); - HttpsURLConnection uc = (HttpsURLConnection) servlet.openConnection(); - System.out.println("URLConnection = " + uc); - if (uc.getResponseCode() != 200) { - throw new Exception("Servlet did not return 200 OK response code"); - } - BufferedReader in = new BufferedReader(new InputStreamReader( - uc.getInputStream())); - String line = null; - int index; - while ((line = in.readLine()) != null) { - System.out.println(line); - index = line.indexOf(result); - if (index != -1) { - index = line.indexOf(":"); - String status = line.substring(index + 1); - - if (status.equalsIgnoreCase("PASS")) { - count++; - } else { - return; - } - } - } - Assert.assertTrue(count == 3); - - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - - public static void disableCertValidation() { - // Create a trust manager that does not validate certificate chains - TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) { - return; - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) { - return; - } - }}; - - try { - SSLContext sc = SSLContext.getInstance("TLS"); - sc.init(null, trustAllCerts, new SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); - } catch (Exception e) { - return; - } - } - - -} diff --git a/appserver/tests/embedded/maven-plugin/secureWebApp/system.properties b/appserver/tests/embedded/maven-plugin/secureWebApp/system.properties deleted file mode 100644 index ba8aabca658..00000000000 --- a/appserver/tests/embedded/maven-plugin/secureWebApp/system.properties +++ /dev/null @@ -1,41 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -org.glassfish.embedded.greeting=Hi from BHAVANI diff --git a/appserver/tests/embedded/maven-plugin/sessionDestroyed/pom.xml b/appserver/tests/embedded/maven-plugin/sessionDestroyed/pom.xml deleted file mode 100644 index ed0d184d891..00000000000 --- a/appserver/tests/embedded/maven-plugin/sessionDestroyed/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - sessionDestroyed - war - Session Lifecyle Test (maven-plugin/sessionDestroyed) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/main/java/test/ServletTest.java deleted file mode 100644 index 465c53c0a3a..00000000000 --- a/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest extends HttpServlet implements HttpSessionListener { - - private ServletContext context; - private static String status = "DESTROYED:FAIL"; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - - request.getSession().setAttribute("test","DESTROYED:PASS"); - request.getSession().invalidate(); - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - out.println(status); - } - - - public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionCreated]"); - } - - public void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionDestroyed]"); - status = (String)httpSessionEvent.getSession().getAttribute("test"); - } -} - - - diff --git a/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index dbbdb206145..00000000000 --- a/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - test.ServletTest - - - - ServletTest - ServletTest - test.ServletTest - - - - ServletTest - /ServletTest - - - - - - diff --git a/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/test/java/org/glassfish/tests/sessionDestroyed/WebTest.java b/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/test/java/org/glassfish/tests/sessionDestroyed/WebTest.java deleted file mode 100644 index 7c576298902..00000000000 --- a/appserver/tests/embedded/maven-plugin/sessionDestroyed/src/test/java/org/glassfish/tests/sessionDestroyed/WebTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.sessionDestroyed; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; - -public class WebTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 1; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "DESTROYED", contextPath+"/ServletTest"); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - try { - URL servlet = new URL("http://localhost:8080/"+contextPath); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - int index; - while ((line = in.readLine()) != null) { - index = line.indexOf(result); - System.out.println(line); - if (index != -1) { - index = line.indexOf(":"); - String status = line.substring(index+1); - - if (status.equalsIgnoreCase("PASS")){ - count++; - } else { - return; - } - } - } - Assert.assertTrue(count==EXPECTED_COUNT); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/simple/hello.war b/appserver/tests/embedded/maven-plugin/simple/hello.war deleted file mode 100644 index 90e53c772cc24075645776944497de8a12d0e588..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4102 zcmaJ^2UwHI77c_FiV#ZZ2&f>k5UMm$ngl`!B?3~E9(qmaC{1J$lora;1u1KR1qGxd zT{_ZB=+cA;;?f0Q*j>ckb>Gc*|4hFBo|!XuCU@rOB7kJnfMa{{z(?wj#$OLA02u(O zrmrjl*M^B6bpQame}#eo&xxTs2*`pNG1QUh%tZedid5Ey!_;o*Ly@r0$gWN;gb4KA z8H9*XPgn0Nl-Qu;%mSuMmC-|3L#s!_01!#S-~GFmUuAj}iV1}N@Qw{L*11U+1FO%} zCjDGj23hsApT>)r`a@tEbA&iiK}s#^I3V`xM&uHdz$M$tvQy9gbwq?B=b4V;3Dtj3 zjFL#z!Nt<@`9=uF?u2kYf3;)Aw=`nou~#OSyYxwowEF`M-u zXd~eELTa?Xgq134Bs6J*Q1tS7@I*H1=|E#0UV@czZ|~7nI~>AgR*TPY>Ji#}=R&Mx z-3z>>uuRKyj&?Zo`u5|5;1su_YbQisxCA?NiPU+oVn^H z0vJrpS~=0_zsuZTS-T(8;MgPvzP`R6S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QZ+oq97fp1mh8>-Uy4hc z$yJ>;p8=$b_r4wPAb=|I{3(b)W{(ih9!?+tKy_R~U2V|5P)Dr$BNWmJF9xnXxJjFX zfR=G5QFK_P1@`r;1URJLxTKcURxTZ%r}+elkN=uklA+7t|7%05r2pr|?q!2&h2ELM z&)B{ujbcT`pt#RVq|gDftTJk7Ph4N?(uN0${Ed^fMGFkXCZ1mWlSD-%NM1#YzyKkU z6Em4@Hg2@Aj$7C(YJcgtL#;svdp!f(-Y;j-RHCk8IUlE(u%MS|!!V#PXxC}|`_^Idru#gRka9=1b`Dz(J#VC1Dy=k6AKT4DQ{BW>J;So1v~2DKN$B95?O<5w zz&IWF-n0AVm^Vh=D;!are*FWwv{kHU+?iZ`K)aHbxjr}yH%}uxHLR>+fB#z0rH(}s zNZeHJQ%O+aLs@udtd2Gu3lDjoGb8WX+v$Bt5MNB1gUO7`~QwQtX;FEyo<9U>zEsg+ortOA= z#sOhXuWM}QN)c(`sHi_mzzb9>Z3=!i31UMqK!3ws}LB;X)Q$OaqvL(3&s zhhRxu4$LpZY68@!*zmd`{7zpE{c?pwBWdfZKP`LJU#yT-tQYpJ3Uw*nK=@4Ex8~() zqzD|>CdIP@nWTf;f{)mFY$)o1p>$xYfH%>>Tx^rs3qsjEpr`GxjGSzAFwh)s;=^scQET@@phjoNFa@uxCLab8lNq5^l+jLeoW}v5TUH5#Vun40bG^PnCOAs7jj($2`Mx1zcmzb zy@&<|5R{L|Dl=w-$ah}%%65lsfyU?H+6H$(c){_(#{=Q?Mb~H_HFG^nTyRkLvtsA1TDL l|E=o(6ZX#naSBVO`Fpw0MUYb*zoj95iiqVz<;?M~{{fQ-g*X5J diff --git a/appserver/tests/embedded/maven-plugin/simple/pom.xml b/appserver/tests/embedded/maven-plugin/simple/pom.xml deleted file mode 100644 index 081a6d60a9c..00000000000 --- a/appserver/tests/embedded/maven-plugin/simple/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish - maven-glassfish-plugin-tester-deploy - pom - Maven deploy test - - - install - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - glassfish - hello.war - 8080 - - - - install - - start - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/pom.xml b/appserver/tests/embedded/maven-plugin/standalonewar/pom.xml deleted file mode 100644 index 0808f63fe84..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - standalonewar - war - Standalone WAR Test (maven-plugin/standalonewar) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - pre-integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/FilterTest.java b/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/FilterTest.java deleted file mode 100755 index 6a46ecbd91a..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/FilterTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import javax.servlet.*; -import javax.servlet.http.*; -public class FilterTest implements Filter{ - - private ServletContext context; - - public void destroy() { - System.out.println("[Filter.destroy]"); - } - - public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException { - System.out.println("[Filter.doFilter]"); - - ((HttpServletRequest)request).getSession().setAttribute("FILTER", "PASS"); - filterChain.doFilter(request, response); - - } - - - public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException { - System.out.println("[Filter.init]"); - context = filterConfig.getServletContext(); - } - -} diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest.java deleted file mode 100644 index c71b7e39d77..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; -import org.xml.sax.InputSource; -import org.w3c.dom.Element; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.w3c.dom.Node; - -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.SAXException; - -// jaxp 1.0.1 imports -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest extends HttpServlet implements HttpSessionListener { - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - context = config.getServletContext(); - System.out.println("[Servlet.init] " + context.getMajorVersion()); - - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - request.getSession().setAttribute("FILTER-REQUEST", request.getSession().getAttribute("FILTER")); - request.getSession().setAttribute("FILTER", "FAIL"); - - RequestDispatcher rd = context.getRequestDispatcher("/ServletTest2"); - rd.forward(request, response); - } - - public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionCreated]"); - } - - public void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionDestroyed]"); - System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test")); - } -} - - - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest2.java b/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest2.java deleted file mode 100755 index 3a5eab4f14a..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest2.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -public class ServletTest2 extends HttpServlet implements HttpSessionListener { - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet2.init]"); - context = config.getServletContext(); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet2.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet2.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - request.getSession().setAttribute("FILTER-FORWARD",request.getSession().getAttribute("FILTER")); - request.getSession().setAttribute("FILTER", "FAIL"); - - RequestDispatcher rd = request.getRequestDispatcher("/ServletTest3"); - rd.include(request, response); - } - - public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionCreated]"); - } - - public void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionDestroyed]"); - System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test")); - } - -} - - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest3.java b/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest3.java deleted file mode 100644 index bbbf5ee9fbd..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/java/test/ServletTest3.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; -import org.xml.sax.InputSource; -import org.w3c.dom.Element; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.w3c.dom.Node; - -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.SAXException; - -// jaxp 1.0.1 imports -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest3 extends HttpServlet{ - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet3.init]"); - context = config.getServletContext(); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet3.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet3.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - out.println("FILTER-REQUEST:" + request.getSession().getAttribute("FILTER-REQUEST")); - out.println("FILTER-FORWARD:" + request.getSession().getAttribute("FILTER-FORWARD")); - out.println("FILTER-INCLUDE:" + request.getSession().getAttribute("FILTER")); - } - -} - - - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index aaa23b899ce..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -tomcat-test - - - tomcat - tomcat - tomcat - - - - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index b208502f585..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - FilterTest - test.FilterTest - - - - FilterTest - /* - REQUEST - INCLUDE - FORWARD - ERROR - - - - ServletTest - ServletTest - test.ServletTest - - - ServletTest2 - ServletTest2 - test.ServletTest2 - - - ServletTest3 - ServletTest3 - test.ServletTest3 - - - - ServletTest - /ServletTest - - - ServletTest2 - /ServletTest2 - - - ServletTest3 - /ServletTest3 - - - - 10 - - - - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/index.html b/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/index.html deleted file mode 100755 index d33b9219adb..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - -Hello World! - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/index.jsp b/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/index.jsp deleted file mode 100644 index 4efc6922793..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/main/webapp/index.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - - - - -

    <% out.print("Hello World!"); %>

    - - diff --git a/appserver/tests/embedded/maven-plugin/standalonewar/src/test/java/org/glassfish/tests/standalonewar/WebTest.java b/appserver/tests/embedded/maven-plugin/standalonewar/src/test/java/org/glassfish/tests/standalonewar/WebTest.java deleted file mode 100644 index e88e61ac0df..00000000000 --- a/appserver/tests/embedded/maven-plugin/standalonewar/src/test/java/org/glassfish/tests/standalonewar/WebTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.standalonewar; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; - -public class WebTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 3; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "FILTER", contextPath); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - try { - URL servlet = new URL("http://localhost:8080/test/ServletTest"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - int index; - while ((line = in.readLine()) != null) { - index = line.indexOf(result); - System.out.println(line); - if (index != -1) { - index = line.indexOf(":"); - String status = line.substring(index+1); - - if (status.equalsIgnoreCase("PASS")){ - count++; - } else { - return; - } - } - } - Assert.assertTrue(count==3); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/static-shell-init/pom.xml b/appserver/tests/embedded/maven-plugin/static-shell-init/pom.xml deleted file mode 100644 index e59789ee47e..00000000000 --- a/appserver/tests/embedded/maven-plugin/static-shell-init/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - init - pom - Bootstrap all tests to use glassfish-static-shell-jar - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - org.glassfish.main.extras - glassfish-embedded-static-shell - system - ${project.version} - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - start - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/webservice/pom.xml b/appserver/tests/embedded/maven-plugin/webservice/pom.xml deleted file mode 100644 index 2fb2aa6ffe3..00000000000 --- a/appserver/tests/embedded/maven-plugin/webservice/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - webservice - war - WebService Test (maven-plugin/webservice) - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - pre-integration-test - - start - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - jakarta.ejb - jakarta.ejb-api - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/webservice/src/main/java/test/SimpleWebService.java b/appserver/tests/embedded/maven-plugin/webservice/src/main/java/test/SimpleWebService.java deleted file mode 100644 index 49e45025e9e..00000000000 --- a/appserver/tests/embedded/maven-plugin/webservice/src/main/java/test/SimpleWebService.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package test; - -import javax.jws.*; - -@WebService -public class SimpleWebService { - - @WebMethod(operationName="add") - public int add(int i, int j) throws Exception { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - return k; - } - - @WebMethod(operationName="sayHi") - public String sayHi() throws Exception { - System.out.println("hi from SimpleWebService"); - return "hi from SimpleWebService"; - } - -} - - diff --git a/appserver/tests/embedded/maven-plugin/webservice/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/webservice/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1dd2ef0f388..00000000000 --- a/appserver/tests/embedded/maven-plugin/webservice/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - 10 - - - - diff --git a/appserver/tests/embedded/maven-plugin/webservice/src/test/java/org/glassfish/tests/standalonewar/WebTest.java b/appserver/tests/embedded/maven-plugin/webservice/src/test/java/org/glassfish/tests/standalonewar/WebTest.java deleted file mode 100644 index 8dc4658b0a3..00000000000 --- a/appserver/tests/embedded/maven-plugin/webservice/src/test/java/org/glassfish/tests/standalonewar/WebTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - - -package org.glassfish.tests.ejbwar; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; -import javax.naming.InitialContext; - -public class WebTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 3; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "SimpleWebServicePort", contextPath); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - try { - URL servlet = new URL("http://localhost:8080/test/SimpleWebServiceService?wsdl"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - int index; - while ((line = in.readLine()) != null) { - System.out.println(line); - index = line.indexOf(result); - if (index != -1) { - index = line.indexOf(":"); - String status = line.substring(index+1); - - if (status.equalsIgnoreCase("PASS")){ - count++; - } else { - return; - } - } - } - Assert.assertTrue(count==3); - - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - -} diff --git a/appserver/tests/embedded/maven-plugin/websockets/pom.xml b/appserver/tests/embedded/maven-plugin/websockets/pom.xml deleted file mode 100644 index cfac6a56b02..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 4.1-SNAPSHOT - - org.glassfish.tests.embedded.maven-plugin - websockets - war - WebSocket Test (maven-plugin/websockets) - - - install - src/test/java - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - - start - pre-integration-test - - start - - - - admin - pre-integration-test - - admin - - - - set configs.config.server-config.network-config.protocols.protocol.http-listener.http.websockets-support-enabled=true - - - - - deploy - pre-integration-test - - deploy - - - - stop - post-integration-test - - undeploy - stop - - - - - - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven - maven-project - - - jakarta.servlet - jakarta.servlet-api - - - org.glassfish.grizzly - grizzly-websockets - - - org.glassfish.grizzly - grizzly-http-servlet - - - junit - junit - - - - diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/ChatApplication.java b/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/ChatApplication.java deleted file mode 100644 index c84608e19d0..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/ChatApplication.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package com.sun.grizzly.samples.websockets; - -import java.util.logging.Level; - -import org.glassfish.grizzly.Connection; -import org.glassfish.grizzly.http.HttpRequestPacket;; -import org.glassfish.grizzly.websockets.DataFrame; -import org.glassfish.grizzly.websockets.NetworkHandler; -import org.glassfish.grizzly.websockets.WebSocket; -import org.glassfish.grizzly.websockets.WebSocketApplication; -import org.glassfish.grizzly.websockets.WebSocketListener; - -import java.io.IOException; - -public class ChatApplication extends WebSocketApplication { - @Override - public boolean isApplicationRequest(HttpRequestPacket request) { - return "/chat".equals(request.getRequestURI()); - } - - @Override - public WebSocket createSocket(final Connection connection, WebSocketListener... listeners) { - return new ChatWebSocket(listeners); - } - - public void onMessage(WebSocket socket, DataFrame frame) throws IOException { - final String data = frame.getTextPayload(); - if (data.startsWith("login:")) { - login((ChatWebSocket) socket, frame); - } else { - broadcast(((ChatWebSocket) socket).getUser(), data); - } - } - - @Override - public void onClose(WebSocket websocket) { - broadcast("system", ((ChatWebSocket)websocket).getUser() + " left the chat"); - } - - /** - * Broadcasts the text message from the user. - * - * @param user the user name - * @param text the text message - */ - private void broadcast(String user, String text) { - WebSocketsServlet.logger.log(Level.INFO, "Broadcasting: {0} from: {1}", new Object[]{text, user}); - for (WebSocket websocket : getWebSockets()) { - final ChatWebSocket chat = (ChatWebSocket) websocket; - if (chat.getUser() != null) { // it may happen some websocket is on the list, but not logged in to the chat - chat.sendJson(user, text); - } - } - - } - - private void login(ChatWebSocket socket, DataFrame frame) throws IOException { - if (socket.getUser() == null) { - WebSocketsServlet.logger.info("ChatApplication.login"); - socket.setUser(frame.getTextPayload().split(":")[1].trim()); - broadcast(socket.getUser(), " has joined the chat."); - } - } -} diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/ChatWebSocket.java b/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/ChatWebSocket.java deleted file mode 100644 index 8cf7c9b0139..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/ChatWebSocket.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package com.sun.grizzly.samples.websockets; - -import org.glassfish.grizzly.websockets.BaseWebSocket; -import org.glassfish.grizzly.websockets.NetworkHandler; -import org.glassfish.grizzly.websockets.WebSocketListener; -import org.glassfish.grizzly.websockets.WebSocketException; - -import java.util.logging.Level; -import java.io.IOException; - -public class ChatWebSocket extends BaseWebSocket { - private volatile String user; - - public ChatWebSocket(WebSocketListener... listeners) { - super(listeners); - } - - public String getUser() { - return user; - } - - public void setUser(String user) { - this.user = user; - } - - /** - * Send the message in JSON encoding acceptable by browser's javascript. - * - * @param user the user name - * @param text the text message - */ - public void sendJson(String user, String text) { - try { - final String msg = toJsonp(user, text); - send(msg); - } catch (WebSocketException e) { - WebSocketsServlet.logger.log(Level.SEVERE, "Removing chat client: " + e.getMessage(), e); - close(PROTOCOL_ERROR, e.getMessage()); - } - } - - private String toJsonp(String name, String message) { - return "window.parent.app.update({ name: \"" + escape(name) + - "\", message: \"" + escape(message) + "\" });\n"; - } - - private String escape(String orig) { - StringBuilder buffer = new StringBuilder(orig.length()); - - for (int i = 0; i < orig.length(); i++) { - char c = orig.charAt(i); - switch (c) { - case '\b': - buffer.append("\\b"); - break; - case '\f': - buffer.append("\\f"); - break; - case '\n': - buffer.append("
    "); - break; - case '\r': - // ignore - break; - case '\t': - buffer.append("\\t"); - break; - case '\'': - buffer.append("\\'"); - break; - case '\"': - buffer.append("\\\""); - break; - case '\\': - buffer.append("\\\\"); - break; - case '<': - buffer.append("<"); - break; - case '>': - buffer.append(">"); - break; - case '&': - buffer.append("&"); - break; - default: - buffer.append(c); - } - } - - return buffer.toString(); - } -} diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/WebSocketsServlet.java b/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/WebSocketsServlet.java deleted file mode 100755 index 17680924568..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/java/com/sun/grizzly/samples/websockets/WebSocketsServlet.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package com.sun.grizzly.samples.websockets; - -import org.glassfish.grizzly.websockets.WebSocketEngine; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import java.util.logging.Logger; - -public class WebSocketsServlet extends HttpServlet { - static final Logger logger = Logger.getLogger(WebSocketEngine.WEBSOCKET); - private final ChatApplication app = new ChatApplication(); - @Override - public void init(ServletConfig config) throws ServletException { - WebSocketEngine.getEngine().register(new ChatApplication()); - } -} diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/META-INF/context.xml b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/META-INF/context.xml deleted file mode 100755 index 42d4087a907..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/META-INF/context.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 0e9630ad46e..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - /grizzly-websockets-chat - - diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 8ce0e2ae5bf..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - Ajax WebSockets Application - Ajax Chat Websockets - - AjaxChatWebSockets - WebSocketsServlet - com.sun.grizzly.samples.websockets.WebSocketsServlet - 1 - - - WebSocketsServlet - /chat - - - 25 - - - diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/body-background.png b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/body-background.png deleted file mode 100755 index ece11eb20ac9dea8dbda6dfebbc134c78fd3b096..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2381 zcmV-T39|NyP)lY zGX8tLsDB9nA{t}psd?rx=Tr8@bbK)p0c1a{#{e-v=Dyo7FA}}HygL(N{gL_q9I&~Q zz2bSR5B7{8jFE}x1r*~aJP$T#;ITpt^FT1)4)-CwLi98d(a@3UgW30p&nNc7v~Tj9 zkuX;%*ISp|z6Btq7wFq}>s@|m&-uKEn&(>`NBs1h|JOPz;bDfKK=!LlSgtS+#LZ!v z9nOpBW-TwGy@E^kwsT%@fH9V@rFGh~C)K$3=sDlg-j3%z!amY79JW@m4Zc|KFnY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*FeVzJtk#%e1c?`lVW}*GbB^_jG-oVxAChc!D>mqZm1D7>})$Y{C3ei zOC$>j(k$n&v(^TyS`k&cerj*~`&ql@Yrf`dzUFJb=4-y@Yrf`dzUFJb=4-y@Yrf`d zzUFJb=4-y@Yrf`dzUFJb=4-y@Yrf`d{+am?r-?)x2bH@?00000NkvXXu0mjfgMx{e diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/header-background.png b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/header-background.png deleted file mode 100755 index 93e4a49c3795da40ddee63af280a4a0fadffbb45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20847 zcmX_o1yoyI&~1t}P$=$F+-ZT}P6+NU#oY?UwG?+K?iSqLr7c=CSb*a0R-m}_<@^8l z-mE0|uB^L~oH;Xl=Ipa?qSRDmu`tLm0001%yc|RW06^wJoLd5s5U=Z=TMCE+`e!+P zHvr%b{(sL`fUF!60Du}G50TXJUOMgZsW+7M;eT?^*FPIKqF>bG?lV;8rzCppKrw;Fff{&wWQeaoymK!qIOOK;{W>F z!dc5guNQh6RP;j=rg)mX>%GWAbu5$>PFJ_9^*?!3wB`5UPjd8~R80|W@bz}GHRh~( z>@)spHSz~yCA8U|BY7LZ;sSF9U5OG1qXb8`|8DNUL#Xty3!{gWWp;GO7Y8V|9q zXNroN<(c95O&FG!M2{3sU51x=M4rF}Dxt}jwaRd++{8~b&C9=*N!G` zG>Pf|ujNqfj1xAZ4b--riS`EyD3D)sjGgCCyOP}0s`;K@yLb#|3i*I@b@m_h9tK7s z1kit!K9~7_FQUh1yjRme7P`$#W0N;2Mv$=_N4C}bRKIJCxFvLBvZ7Vtv}>xs@#?`#*ie^p7fkhw0*T~oNg(QpoVlR{^WtrTA$jG)==KGM1VmW`eD89iD z=qXz>di$I8RZ&_uUM;S3|C`$CQEd}J((V#n7?-nRPYf6QU*aBim-Tiok;(LR+tzSM z9V|5VJOXMHdaJO@aUqDazV9F=LzfK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<@n5SR9u` zipGHRi$c>U6eh#UD0vRZY(qFYaFH#j=6sha83u+_^^8so&{rUaix2Etu>+M4PbIqo z7d{9uAv81d&i<_Y@w*=i-X8z0&9=H7<1@{%;2wBxZq|ITA$Vz0(bfF%!A@h*oyN`g zBoL-|G&?rLfJ^v{#%PqkE7%Kk1plN`gc24#u@T%rjSF`-7J5mQ*_6Yf55|13@#Pq%j= z*f8fhzN`5{i*>yPL5fcDGI_QgpxOdR)v+VN3QtY$H2r0(^hNyU{{1>%8r+f}g5i2i zHD|(m{(N8I?D2asb%8xuUzss!VpT`(<@xB}LEIC=(6j&Z2Ad-*H8*pxavcueI z=F?TA$3!QP54oD_J%3gqRyxHJJ=+IPa)TrBIlhHGp1KO+SuU|V&kKnjkTBZScOrtC zs;zOY+w9>)chLV5{z=taB_4CxFB7HioI7A=Ty@Kw2l-*}({#Q0mC)eeD9;vbLM0zU WJ?(u`1-_stbncAB=~CmHcmE4k8PTo) diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/main-background.png b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/images/main-background.png deleted file mode 100755 index e94cb2d7cabdfe73d831be98c7e1c1d8bc422374..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8026 zcmd6LX*|?>ANHTN(;`uaEYZ>7PNozQ+3KX6tOr?!7{$!Q%y6WJiNRS4At~F~=A?r< zc4JA_a}+W&rYyr4OC=-ASQ<+R&v(w}zMmKOi|5=gpBH`l{Ks$R|6Q){bzR?I%n!B} zQacoPAP6FL@q2Rz1le>FK_st!B?+Hom+lFN|F-}5JvsVcE};m+b)m34w)zl`52SGV?wsvwPf4&Z*?T* zE&2-!{cm@?YxTRNmmc@z&EA;0q>bgq^kI6tR#Ru`C}kH&Z379uC*aO_I$`>i2KA z9^QvERTnf!B9W^5@KhEmqwVG-k}==!^a~bVN{%U5*4&xTAs<-DYY^4*OW9 zfiy|0bs$K%PbPMHqu=|7gp(2ow_UgSR$R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{<-e|)uex}`+qg*pX>f#P5S?-4QO-oZ2AJz8nXv!svV_^M=q=}-#|-U%~DhS zuJ%{3_*hOBnw{wQ6!uEIkVb9C$v=$2nN&aL2(_1Iy@C=LR0p^5fPQN|f}sR5 zRG4&K;H-SkJJldo|5VZ19~Gelz3VW-{*_z@Ki`KPYHC)CiRDpSBx<&KXsXBk{qCos zgaad2M_%*veb6y&4pu&|R*s+v@f%+-8}0(FjoJ3LFl@FvX+Db-Uo3%KRyM*a+o=aP z_Bi+zH6}Yeu4>JIE1CzX23om3i{@JDe(^5d!)h2krj`x^Xa2ix7J{t%jP?yR+I-Zm zOnQ>b_5M(3HiSwwASAk2`XoK5Swg>h&{+T8DX648=wbiJ#_QnS$njd!s{=0h3#5&s zRP{54+YhK##a~Kx2RRTBM1I*xPuRt>T-N!$3bPrb*}SnRFC*A& zi$oH>@A-m#wswSGWwv6rZV^tR!OF4WeRj<-uxfS#HqO|MotS^^OUvK!$qLK{a`C*a KdGU8%KmQ-Yf=jjl diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/index.html b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/index.html deleted file mode 100755 index 597e3c2c53c..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/index.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - Glassfish Chat - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    Please input your name:
    -
    - -
    - -
    -
    Your browser does not support websockets.
    -
    - -
    -
    -
    -
    - - - diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/index.jsp b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/index.jsp deleted file mode 100644 index 4efc6922793..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/index.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - - - - -

    <% out.print("Hello World!"); %>

    - - diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/application.js b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/application.js deleted file mode 100755 index 358028a91aa..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/application.js +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -var count = 0; -var loop = 0; -var websocket = null; -var name = null; -var url = 'ws://' + document.location.host + document.location.pathname + 'chat'; - -var app = { - initialize: function() { - if ("WebSocket" in window) { - $('login-name').focus(); - app.listen(); - } else { - $('missing-sockets').style.display = 'inherit'; - $('login-name').style.display = 'none'; - $('login-button').style.display = 'none'; - $('display').style.display = 'none'; - } - }, - listen: function() { - $('websockets-frame').src = app.url + '?' + count; - count ++; - }, - login: function() { - name = $F('login-name'); - if (! name.length > 0) { - $('system-message').style.color = 'red'; - $('login-name').focus(); - return; - } - $('system-message').style.color = '#2d2b3d'; - $('system-message').innerHTML = name + ':'; - - $('login-button').disabled = true; - $('login-form').style.display = 'none'; - $('message-form').style.display = ''; - - websocket = new WebSocket(url); - websocket.name = name; - websocket.onopen = function() { - // Web Socket is connected. You can send data by send() method - websocket.send('login:' + name); - }; - websocket.onmessage = function (evt) { - eval(evt.data); - $('message').disabled = false; - $('post-button').disabled = false; - $('message').focus(); - $('message').value = ''; - }; - websocket.onclose = function() { - var p = document.createElement('p'); - p.innerHTML = name + ': has left the chat'; - - $('display').appendChild(p); - - new Fx.Scroll('display').down(); - }; - }, - post: function() { - var message = $F('message'); - if (!message > 0) { - return; - } - $('message').disabled = true; - $('post-button').disabled = true; - - websocket.send(message); - }, - update: function(data) { - if (data) { - var p = document.createElement('p'); - p.innerHTML = data.message; - - $('display').appendChild(p); - - new Fx.Scroll('display').down(); - } - } -}; - -var rules = { - '#login-name': function(elem) { - Event.observe(elem, 'keydown', function(e) { - if (e.keyCode == 13) { - $('login-button').focus(); - } - }); - }, - '#login-button': function(elem) { - elem.onclick = app.login; - }, - '#message': function(elem) { - Event.observe(elem, 'keydown', function(e) { - if (e.shiftKey && e.keyCode == 13) { - $('post-button').focus(); - } - }); - }, - '#post-button': function(elem) { - elem.onclick = app.post; - } -}; -Behaviour.addLoadEvent(app.initialize); -Behaviour.register(rules); - diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/behaviour.js b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/behaviour.js deleted file mode 100755 index a7444e874a0..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/behaviour.js +++ /dev/null @@ -1,294 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - Behaviour v1.1 by Ben Nolan, June 2005. Based largely on the work - of Simon Willison (see comments by Simon below). - - Description: - - Uses css selectors to apply javascript behaviours to enable - unobtrusive javascript in html documents. - - Usage: - - var myrules = { - 'b.someclass' : function(element){ - element.onclick = function(){ - alert(this.innerHTML); - } - }, - '#someid u' : function(element){ - element.onmouseover = function(){ - this.innerHTML = "BLAH!"; - } - } - }; - - Behaviour.register(myrules); - - // Call Behaviour.apply() to re-apply the rules (if you - // update the dom, etc). - - License: - - This file is entirely BSD licensed. - - More information: - - http://ripcord.co.nz/behaviour/ - -*/ - -var Behaviour = { - list : new Array, - - register : function(sheet){ - Behaviour.list.push(sheet); - }, - - start : function(){ - Behaviour.addLoadEvent(function(){ - Behaviour.apply(); - }); - }, - - apply : function(){ - for (h=0;sheet=Behaviour.list[h];h++){ - for (selector in sheet){ - list = document.getElementsBySelector(selector); - - if (!list){ - continue; - } - - for (i=0;element=list[i];i++){ - sheet[selector](element); - } - } - } - }, - - addLoadEvent : function(func){ - var oldonload = window.onload; - - if (typeof window.onload != 'function') { - window.onload = func; - } else { - window.onload = function() { - oldonload(); - func(); - } - } - } -} - -Behaviour.start(); - -/* - The following code is Copyright (C) Simon Willison 2004. - - document.getElementsBySelector(selector) - - returns an array of element objects from the current document - matching the CSS selector. Selectors can contain element names, - class names and ids and can be nested. For example: - - elements = document.getElementsBySelect('div#main p a.external') - - Will return an array of all 'a' elements with 'external' in their - class attribute that are contained inside 'p' elements that are - contained inside the 'div' element which has id="main" - - New in version 0.4: Support for CSS2 and CSS3 attribute selectors: - See http://www.w3.org/TR/css3-selectors/#attribute-selectors - - Version 0.4 - Simon Willison, March 25th 2003 - -- Works in Phoenix 0.5, Mozilla 1.3, Opera 7, Internet Explorer 6, Internet Explorer 5 on Windows - -- Opera 7 fails -*/ - -function getAllChildren(e) { - // Returns all children of element. Workaround required for IE5/Windows. Ugh. - return e.all ? e.all : e.getElementsByTagName('*'); -} - -document.getElementsBySelector = function(selector) { - // Attempt to fail gracefully in lesser browsers - if (!document.getElementsByTagName) { - return new Array(); - } - // Split selector in to tokens - var tokens = selector.split(' '); - var currentContext = new Array(document); - for (var i = 0; i < tokens.length; i++) { - token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');; - if (token.indexOf('#') > -1) { - // Token is an ID selector - var bits = token.split('#'); - var tagName = bits[0]; - var id = bits[1]; - var element = document.getElementById(id); - if (tagName && element.nodeName.toLowerCase() != tagName) { - // tag with that ID not found, return false - return new Array(); - } - // Set currentContext to contain just this element - currentContext = new Array(element); - continue; // Skip to next token - } - if (token.indexOf('.') > -1) { - // Token contains a class selector - var bits = token.split('.'); - var tagName = bits[0]; - var className = bits[1]; - if (!tagName) { - tagName = '*'; - } - // Get elements matching tag, filter them for class selector - var found = new Array; - var foundCount = 0; - for (var h = 0; h < currentContext.length; h++) { - var elements; - if (tagName == '*') { - elements = getAllChildren(currentContext[h]); - } else { - elements = currentContext[h].getElementsByTagName(tagName); - } - for (var j = 0; j < elements.length; j++) { - found[foundCount++] = elements[j]; - } - } - currentContext = new Array; - var currentContextIndex = 0; - for (var k = 0; k < found.length; k++) { - if (found[k].className && found[k].className.match(new RegExp('\\b'+className+'\\b'))) { - currentContext[currentContextIndex++] = found[k]; - } - } - continue; // Skip to next token - } - // Code to deal with attribute selectors - if (token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)) { - var tagName = RegExp.$1; - var attrName = RegExp.$2; - var attrOperator = RegExp.$3; - var attrValue = RegExp.$4; - if (!tagName) { - tagName = '*'; - } - // Grab all of the tagName elements within current context - var found = new Array; - var foundCount = 0; - for (var h = 0; h < currentContext.length; h++) { - var elements; - if (tagName == '*') { - elements = getAllChildren(currentContext[h]); - } else { - elements = currentContext[h].getElementsByTagName(tagName); - } - for (var j = 0; j < elements.length; j++) { - found[foundCount++] = elements[j]; - } - } - currentContext = new Array; - var currentContextIndex = 0; - var checkFunction; // This function will be used to filter the elements - switch (attrOperator) { - case '=': // Equality - checkFunction = function(e) { return (e.getAttribute(attrName) == attrValue); }; - break; - case '~': // Match one of space seperated words - checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b'))); }; - break; - case '|': // Match start with value followed by optional hyphen - checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?'))); }; - break; - case '^': // Match starts with value - checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) == 0); }; - break; - case '$': // Match ends with value - fails with "Warning" in Opera 7 - checkFunction = function(e) { return (e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length); }; - break; - case '*': // Match ends with value - checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) > -1); }; - break; - default : - // Just test for existence of attribute - checkFunction = function(e) { return e.getAttribute(attrName); }; - } - currentContext = new Array; - var currentContextIndex = 0; - for (var k = 0; k < found.length; k++) { - if (checkFunction(found[k])) { - currentContext[currentContextIndex++] = found[k]; - } - } - // alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue); - continue; // Skip to next token - } - - if (!currentContext[0]){ - return; - } - - // If we get here, token is JUST an element (not a class or ID selector) - tagName = token; - var found = new Array; - var foundCount = 0; - for (var h = 0; h < currentContext.length; h++) { - var elements = currentContext[h].getElementsByTagName(tagName); - for (var j = 0; j < elements.length; j++) { - found[foundCount++] = elements[j]; - } - } - currentContext = found; - } - return currentContext; -} - -/* That revolting regular expression explained -/^(\w+)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/ - \---/ \---/\-------------/ \-------/ - | | | | - | | | The value - | | ~,|,^,$,* or = - | Attribute - Tag -*/ diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/moo.fx.js b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/moo.fx.js deleted file mode 100755 index 8e1a0fc2189..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/moo.fx.js +++ /dev/null @@ -1,172 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -var Fx = fx = {}; - -Fx.Base = function(){}; -Fx.Base.prototype = { - - setOptions: function(options){ - this.options = Object.extend({ - onStart: function(){}, - onComplete: function(){}, - transition: Fx.Transitions.sineInOut, - duration: 500, - unit: 'px', - wait: true, - fps: 50 - }, options || {}); - }, - - step: function(){ - var time = new Date().getTime(); - if (time < this.time + this.options.duration){ - this.cTime = time - this.time; - this.setNow(); - } else { - setTimeout(this.options.onComplete.bind(this, this.element), 10); - this.clearTimer(); - this.now = this.to; - } - this.increase(); - }, - - setNow: function(){ - this.now = this.compute(this.from, this.to); - }, - - compute: function(from, to){ - var change = to - from; - return this.options.transition(this.cTime, from, change, this.options.duration); - }, - - clearTimer: function(){ - clearInterval(this.timer); - this.timer = null; - return this; - }, - - _start: function(from, to){ - if (!this.options.wait) this.clearTimer(); - if (this.timer) return; - setTimeout(this.options.onStart.bind(this, this.element), 10); - this.from = from; - this.to = to; - this.time = new Date().getTime(); - this.timer = setInterval(this.step.bind(this), Math.round(1000/this.options.fps)); - return this; - }, - - custom: function(from, to){ - return this._start(from, to); - }, - - set: function(to){ - this.now = to; - this.increase(); - return this; - }, - - hide: function(){ - return this.set(0); - }, - - setStyle: function(e, p, v){ - if (p == 'opacity'){ - if (v == 0 && e.style.visibility != "hidden") e.style.visibility = "hidden"; - else if (e.style.visibility != "visible") e.style.visibility = "visible"; - if (window.ActiveXObject) e.style.filter = "alpha(opacity=" + v*100 + ")"; - e.style.opacity = v; - } else e.style[p] = v+this.options.unit; - } - -}; - -Fx.Style = Class.create(); -Fx.Style.prototype = Object.extend(new Fx.Base(), { - - initialize: function(el, property, options){ - this.element = $(el); - this.setOptions(options); - this.property = property.camelize(); - }, - - increase: function(){ - this.setStyle(this.element, this.property, this.now); - } - -}); - -Fx.Styles = Class.create(); -Fx.Styles.prototype = Object.extend(new Fx.Base(), { - - initialize: function(el, options){ - this.element = $(el); - this.setOptions(options); - this.now = {}; - }, - - setNow: function(){ - for (p in this.from) this.now[p] = this.compute(this.from[p], this.to[p]); - }, - - custom: function(obj){ - if (this.timer && this.options.wait) return; - var from = {}; - var to = {}; - for (p in obj){ - from[p] = obj[p][0]; - to[p] = obj[p][1]; - } - return this._start(from, to); - }, - - increase: function(){ - for (var p in this.now) this.setStyle(this.element, p, this.now[p]); - } - -}); - -//Transitions (c) 2003 Robert Penner (http://www.robertpenner.com/easing/), BSD License. - -Fx.Transitions = { - linear: function(t, b, c, d) { return c*t/d + b; }, - sineInOut: function(t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; } -}; \ No newline at end of file diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/moo.fx.pack.js b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/moo.fx.pack.js deleted file mode 100755 index 33c1f1daad9..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/moo.fx.pack.js +++ /dev/null @@ -1,119 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -Fx.Scroll = Class.create(); -Fx.Scroll.prototype = Object.extend(new Fx.Base(), { - - initialize: function(el, options) { - this.element = $(el); - this.setOptions(options); - this.element.style.overflow = 'hidden'; - }, - - down: function(){ - return this.custom(this.element.scrollTop, this.element.scrollHeight-this.element.offsetHeight); - }, - - up: function(){ - return this.custom(this.element.scrollTop, 0); - }, - - increase: function(){ - this.element.scrollTop = this.now; - } - -}); - -//fx.Color, originally by Tom Jensen (http://neuemusic.com) MIT-style LICENSE. - -Fx.Color = Class.create(); -Fx.Color.prototype = Object.extend(new Fx.Base(), { - - initialize: function(el, property, options){ - this.element = $(el); - this.setOptions(options); - this.property = property.camelize(); - this.now = []; - }, - - custom: function(from, to){ - return this._start(from.hexToRgb(true), to.hexToRgb(true)); - }, - - setNow: function(){ - [0,1,2].each(function(i){ - this.now[i] = Math.round(this.compute(this.from[i], this.to[i])); - }.bind(this)); - }, - - increase: function(){ - this.element.style[this.property] = "rgb("+this.now[0]+","+this.now[1]+","+this.now[2]+")"; - } - -}); - -Object.extend(String.prototype, { - - rgbToHex: function(array){ - var rgb = this.match(new RegExp('([\\d]{1,3})', 'g')); - if (rgb[3] == 0) return 'transparent'; - var hex = []; - for (var i = 0; i < 3; i++){ - var bit = (rgb[i]-0).toString(16); - hex.push(bit.length == 1 ? '0'+bit : bit); - } - var hexText = '#'+hex.join(''); - if (array) return hex; - else return hexText; - }, - - hexToRgb: function(array){ - var hex = this.match(new RegExp('^[#]{0,1}([\\w]{1,2})([\\w]{1,2})([\\w]{1,2})$')); - var rgb = []; - for (var i = 1; i < hex.length; i++){ - if (hex[i].length == 1) hex[i] += hex[i]; - rgb.push(parseInt(hex[i], 16)); - } - var rgbText = 'rgb('+rgb.join(',')+')'; - if (array) return rgb; - else return rgbText; - } - -}); \ No newline at end of file diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/prototype.js b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/prototype.js deleted file mode 100755 index 579daf27605..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/javascripts/prototype.js +++ /dev/null @@ -1,1813 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -var Prototype = { - Version: '1.4.0', - ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', - - emptyFunction: function() {}, - K: function(x) {return x} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Object.inspect = function(object) { - try { - if (object == undefined) return 'undefined'; - if (object == null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } -} - -Function.prototype.bind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -} - -Object.extend(Number.prototype, { - toColorPart: function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - } -}); - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} -Object.extend(String.prototype, { - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(eval); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; - }, - - toQueryParams: function() { - var pairs = this.match(/^\??(.*)$/)[1].split('&'); - return pairs.inject({}, function(params, pairString) { - var pair = pairString.split('='); - params[pair[0]] = pair[1]; - return params; - }); - }, - - toArray: function() { - return this.split(''); - }, - - camelize: function() { - var oStringList = this.split('-'); - if (oStringList.length == 1) return oStringList[0]; - - var camelizedString = this.indexOf('-') == 0 - ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) - : oStringList[0]; - - for (var i = 1, len = oStringList.length; i < len; i++) { - var s = oStringList[i]; - camelizedString += s.charAt(0).toUpperCase() + s.substring(1); - } - - return camelizedString; - }, - - inspect: function() { - return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'"; - } -}); - -String.prototype.parseQuery = String.prototype.toQueryParams; - -var $break = new Object(); -var $continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != $continue) throw e; - } - }); - } catch (e) { - if (e != $break) throw e; - } - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - result = result && !!(iterator || Prototype.K)(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator) { - var result = true; - this.each(function(value, index) { - if (result = !!(iterator || Prototype.K)(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function (iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.collect(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.collect(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.collect(Prototype.K); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; - }); - }, - - inspect: function() { - return '#'; - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); -var $A = Array.from = function(iterable) { - if (!iterable) return []; - if (iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0; i < iterable.length; i++) - results.push(iterable[i]); - return results; - } -} - -Object.extend(Array.prototype, Enumerable); - -Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0; i < this.length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != undefined || value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(value.constructor == Array ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - indexOf: function(object) { - for (var i = 0; i < this.length; i++) - if (this[i] == object) return i; - return -1; - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - shift: function() { - var result = this[0]; - for (var i = 0; i < this.length - 1; i++) - this[i] = this[i + 1]; - this.length--; - return result; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - } -}); -var Hash = { - _each: function(iterator) { - for (key in this) { - var value = this[key]; - if (typeof value == 'function') continue; - - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - merge: function(hash) { - return $H(hash).inject($H(this), function(mergedHash, pair) { - mergedHash[pair.key] = pair.value; - return mergedHash; - }); - }, - - toQueryString: function() { - return this.map(function(pair) { - return pair.map(encodeURIComponent).join('='); - }).join('&'); - }, - - inspect: function() { - return '#'; - } -} - -function $H(object) { - var hash = Object.extend({}, object || {}); - Object.extend(hash, Enumerable); - Object.extend(hash, Hash); - return hash; -} -ObjectRange = Class.create(); -Object.extend(ObjectRange.prototype, Enumerable); -Object.extend(ObjectRange.prototype, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - do { - iterator(value); - value = value.succ(); - } while (this.include(value)); - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -} - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - }, - - activeRequestCount: 0 -} - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responderToAdd) { - if (!this.include(responderToAdd)) - this.responders.push(responderToAdd); - }, - - unregister: function(responderToRemove) { - this.responders = this.responders.without(responderToRemove); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (responder[callback] && typeof responder[callback] == 'function') { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) {} - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { - Ajax.activeRequestCount++; - }, - - onComplete: function() { - Ajax.activeRequestCount--; - } -}); - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - Object.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - this.url = url; - if (this.options.method == 'get' && parameters.length > 0) - this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; - - Ajax.Responders.dispatch('onCreate', this, this.transport); - - this.transport.open(this.options.method, this.url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - this.dispatchException(e); - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - header: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) {} - }, - - evalJSON: function() { - try { - return eval(this.header('X-JSON')); - } catch (e) {} - }, - - evalResponse: function() { - try { - return eval(this.transport.responseText); - } catch (e) { - this.dispatchException(e); - } - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - var transport = this.transport, json = this.evalJSON(); - - if (event == 'Complete') { - try { - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(transport, json); - } catch (e) { - this.dispatchException(e); - } - - if ((this.header('Content-type') || '').match(/^text\/javascript/i)) - this.evalResponse(); - } - - try { - (this.options['on' + event] || Prototype.emptyFunction)(transport, json); - Ajax.Responders.dispatch('on' + event, this, transport, json); - } catch (e) { - this.dispatchException(e); - } - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = Prototype.emptyFunction; - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Updater = Class.create(); - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function(transport, object) { - this.updateContent(); - onComplete(transport, object); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - var response = this.transport.responseText; - - if (!this.options.evalScripts) - response = response.stripScripts(); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - Element.update(receiver, response); - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout(this.onComplete.bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -document.getElementsByClassName = function(className, parentElement) { - var children = ($(parentElement) || document.body).getElementsByTagName('*'); - return $A(children).inject([], function(elements, child) { - if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) - elements.push(child); - return elements; - }); -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - Element[Element.visible(element) ? 'hide' : 'show'](element); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - update: function(element, html) { - $(element).innerHTML = html.stripScripts(); - setTimeout(function() {html.evalScripts()}, 10); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).include(className); - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).add(className); - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).remove(className); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - }, - - empty: function(element) { - return $(element).innerHTML.match(/^\s*$/); - }, - - scrollTo: function(element) { - element = $(element); - var x = element.x ? element.x : element.offsetLeft, - y = element.y ? element.y : element.offsetTop; - window.scrollTo(x, y); - }, - - getStyle: function(element, style) { - element = $(element); - var value = element.style[style.camelize()]; - if (!value) { - if (document.defaultView && document.defaultView.getComputedStyle) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css.getPropertyValue(style) : null; - } else if (element.currentStyle) { - value = element.currentStyle[style.camelize()]; - } - } - - if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) - if (Element.getStyle(element, 'position') == 'static') value = 'auto'; - - return value == 'auto' ? null : value; - }, - - setStyle: function(element, style) { - element = $(element); - for (name in style) - element.style[name.camelize()] = style[name]; - }, - - getDimensions: function(element) { - element = $(element); - if (Element.getStyle(element, 'display') != 'none') - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = ''; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = 'none'; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return; - element._overflow = element.style.overflow; - if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') - element.style.overflow = 'hidden'; - }, - - undoClipping: function(element) { - element = $(element); - if (element._overflow) return; - element.style.overflow = element._overflow; - element._overflow = undefined; - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content.stripScripts(); - - if (this.adjacency && this.element.insertAdjacentHTML) { - try { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } catch (e) { - if (this.element.tagName.toLowerCase() == 'tbody') { - this.insertContent(this.contentFromAnonymousTable()); - } else { - throw e; - } - } - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.insertContent([this.range.createContextualFragment(this.content)]); - } - - setTimeout(function() {content.evalScripts()}, 10); - }, - - contentFromAnonymousTable: function() { - var div = document.createElement('div'); - div.innerHTML = '' + this.content + '
    '; - return $A(div.childNodes[0].childNodes[0].childNodes); - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, this.element); - }).bind(this)); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function(fragments) { - fragments.reverse(false).each((function(fragment) { - this.element.insertBefore(fragment, this.element.firstChild); - }).bind(this)); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.appendChild(fragment); - }).bind(this)); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, - this.element.nextSibling); - }).bind(this)); - } -}); - -/*--------------------------------------------------------------------------*/ - -Element.ClassNames = Class.create(); -Element.ClassNames.prototype = { - initialize: function(element) { - this.element = $(element); - }, - - _each: function(iterator) { - this.element.className.split(/\s+/).select(function(name) { - return name.length > 0; - })._each(iterator); - }, - - set: function(className) { - this.element.className = className; - }, - - add: function(classNameToAdd) { - if (this.include(classNameToAdd)) return; - this.set(this.toArray().concat(classNameToAdd).join(' ')); - }, - - remove: function(classNameToRemove) { - if (!this.include(classNameToRemove)) return; - this.set(this.select(function(className) { - return className != classNameToRemove; - }).join(' ')); - }, - - toString: function() { - return this.toArray().join(' '); - } -} - -Object.extend(Element.ClassNames.prototype, Enumerable); -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - element = $(element); - element.focus(); - if (element.select) - element.select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - findFirstElement: function(form) { - return Form.getElements(form).find(function(element) { - return element.type != 'hidden' && !element.disabled && - ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - Field.activate(Form.findFirstElement(form)); - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) { - var key = encodeURIComponent(parameter[0]); - if (key.length == 0) return; - - if (parameter[1].constructor != Array) - parameter[1] = [parameter[1]]; - - return parameter[1].map(function(value) { - return key + '=' + encodeURIComponent(value); - }).join('&'); - } - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - return Form.Element.Serializers[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - }, - - selectOne: function(element) { - var value = '', opt, index = element.selectedIndex; - if (index >= 0) { - opt = element.options[index]; - value = opt.value; - if (!value && !('value' in opt)) - value = opt.text; - } - return [element.name, value]; - }, - - selectMany: function(element) { - var value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) { - var optValue = opt.value; - if (!optValue && !('value' in opt)) - optValue = opt.text; - value.push(optValue); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - event.cancelBubble = true; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.attachEvent)) - name = 'keydown'; - - this._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } -}); - -/* prevent memory leaks in IE */ -Event.observe(window, 'unload', Event.unloadCache, false); -var Position = { - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - p = Element.getStyle(element, 'position'); - if (p == 'relative' || p == 'absolute') break; - } - } while (element); - return [valueL, valueT]; - }, - - offsetParent: function(element) { - if (element.offsetParent) return element.offsetParent; - if (element == document.body) return element; - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return element; - - return document.body; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - }, - - page: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent==document.body) - if (Element.getStyle(element,'position')=='absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } while (element = element.parentNode); - - return [valueL, valueT]; - }, - - clone: function(source, target) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || {}) - - // find page position of source - source = $(source); - var p = Position.page(source); - - // find coordinate system to use - target = $(target); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(target,'position') == 'absolute') { - parent = Position.offsetParent(target); - delta = Position.page(parent); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if(options.setWidth) target.style.width = source.offsetWidth + 'px'; - if(options.setHeight) target.style.height = source.offsetHeight + 'px'; - }, - - absolutize: function(element) { - element = $(element); - if (element.style.position == 'absolute') return; - Position.prepare(); - - var offsets = Position.positionedOffset(element); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px';; - element.style.left = left + 'px';; - element.style.width = width + 'px';; - element.style.height = height + 'px';; - }, - - relativize: function(element) { - element = $(element); - if (element.style.position == 'relative') return; - Position.prepare(); - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - } -} - -// Safari returns margins on body which is incorrect if the child is absolutely -// positioned. For performance reasons, redefine Position.cumulativeOffset for -// KHTML/WebKit only. -if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { - Position.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return [valueL, valueT]; - } -} \ No newline at end of file diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/stylesheets/default.css b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/stylesheets/default.css deleted file mode 100755 index 71c45537916..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/stylesheets/default.css +++ /dev/null @@ -1,106 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -body { - background: #5c8098 url(../images/body-background.png) repeat-x; -} - -html, body, h1, h2 { - margin: 0; - padding: 0; -} - -body, textarea, input { - font-size: 12px; - font-family: Verdana, Helvetica, Arial, sans-serif; - color: #2d2b3d; -} - -#container { - text-align: center; -} - -#container-inner { - margin-left: auto; - margin-right: auto; - text-align: justify; - width: 820px; -} - -#header { - width: 820px; - height: 100px; - background: url(../images/header-background.png) no-repeat; -} - -#header h1 { - display: none; -} - -#main { - height: 610px; - background: url(../images/main-background.png) no-repeat; - text-align: left; - width: 740px; - padding: 30px 40px 20px 40px; -} - -#display { - border: 1px solid #5c8098; - width: 740px; - height: 400px; - margin-bottom: 10px; - overflow-y: scroll; -} - -#login-name { - width: 200px; -} - -#message { - width: 740px; - height: 50px; -} - -#missing-sockets { - color: red; - font-size: xx-large; - display: none; -} diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/test.html b/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/test.html deleted file mode 100644 index fcbf6d98572..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/main/webapp/test.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - WebSockets Ping - - diff --git a/appserver/tests/embedded/maven-plugin/websockets/src/test/java/org/glassfish/tests/standalonewar/WebTest.java b/appserver/tests/embedded/maven-plugin/websockets/src/test/java/org/glassfish/tests/standalonewar/WebTest.java deleted file mode 100644 index 06ed3dc5b8c..00000000000 --- a/appserver/tests/embedded/maven-plugin/websockets/src/test/java/org/glassfish/tests/standalonewar/WebTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.standalonewar; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.URL; -import java.net.URLConnection; - -public class WebTest { - - private static int count = 0; - private static int EXPECTED_COUNT = 3; - - private String contextPath = "test"; - - @BeforeClass - public static void setup() throws IOException { - } - - @Test - public void testWeb() throws Exception { - goGet("localhost", 8080, "Please input your name", contextPath); - } - - private static void goGet(String host, int port, - String result, String contextPath) throws Exception { - try { - URL servlet = new URL("http://localhost:8080/test"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - int index; - while ((line = in.readLine()) != null) { - index = line.indexOf(result); - if (index != -1) { - index = line.indexOf(":"); - String status = line.substring(index+1); - - if (status.equalsIgnoreCase("PASS")){ - count++; - } else { - return; - } - } - } - Assert.assertTrue(count==3); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - -} diff --git a/appserver/tests/embedded/mysql/pom.xml b/appserver/tests/embedded/mysql/pom.xml deleted file mode 100644 index 749af6a774b..00000000000 --- a/appserver/tests/embedded/mysql/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded - mysql - 4.1-SNAPSHOT - war - Simple web application which uses mysql as database - - mysqltest - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - - - - - - org.apache.maven.plugins - maven-war-plugin - - false - - - - - - - org.glassfish.main.extras - glassfish-embedded-all - 4.1-SNAPSHOT - - - mysql - mysql-connector-java - 5.1.15 - - - com.mysql.connector - mxj - ${project.version} - system - /tmp/mysql-connector-mxj-gpl-5-0-11/mysql-connector-mxj-gpl-5-0-11.jar - - - com.mysql.connector - mxj-db-files - ${project.version} - system - /tmp/mysql-connector-mxj-gpl-5-0-11/mysql-connector-mxj-gpl-5-0-11-db-files.jar - - - junit - junit - test - - - diff --git a/appserver/tests/embedded/mysql/src/main/java/org/glassfish/tests/embedded/web/MySqlTestServlet.java b/appserver/tests/embedded/mysql/src/main/java/org/glassfish/tests/embedded/web/MySqlTestServlet.java deleted file mode 100644 index 3ba7d9cd80c..00000000000 --- a/appserver/tests/embedded/mysql/src/main/java/org/glassfish/tests/embedded/web/MySqlTestServlet.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import javax.annotation.Resource; -import javax.annotation.sql.DataSourceDefinition; -import javax.annotation.sql.DataSourceDefinitions; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import javax.transaction.UserTransaction; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.Connection; - -/** - * @author bhavanishankar@java.net - */ -@DataSourceDefinitions({ -@DataSourceDefinition(name = "java:app/mysql/MySQLDataSource", - className = "com.mysql.cj.jdbc.MysqlDataSource", - portNumber = 3306, - serverName = "localhost", - databaseName = "testDB", - user = "root", - password = "abc123", - properties = {"createDatabaseIfNotExist=true"}), -@DataSourceDefinition(name = "java:app/mysql/MySQLEmbeddedDataSource", - className = "com.mysql.jdbc.Driver", - url="jdbc:mysql:mxj://localhost:3336/testDB", - user = "root", - password = "abc123", - properties = {"createDatabaseIfNotExist=true", - "server.basedir=/tmp/testDB", "server.initialize-user=true"}) -}) -@WebServlet(name = "mySqlTestServlet", urlPatterns = "/mysqlTestServlet") -public class MySqlTestServlet extends HttpServlet { - - @Resource(mappedName = "java:app/mysql/MySQLDataSource") - DataSource myDB; - - @Resource(mappedName = "java:app/mysql/MySQLEmbeddedDataSource") - DataSource myEmbeddedDB; - - @PersistenceContext - private EntityManager em; - - @Resource - private UserTransaction utx; - - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter writer = httpServletResponse.getWriter(); - try { - writer.println("DS = " + myDB); - writer.println("EM = " + em); - Connection connection = myEmbeddedDB.getConnection(); - writer.println("connection = " + connection); - connection.close(); - - if (!entryExists("BHAVANI-13-02")) { - Person person = new Person("BHAVANI-13-02", "Bhavanishankar", "Engineer"); - utx.begin(); - em.persist(person); - utx.commit(); - System.out.println("Persisted " + person); - } - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - writer.flush(); - writer.close(); - } - } - - private boolean entryExists(String uuid) { - return em.find(Person.class, uuid) != null; - } - -} diff --git a/appserver/tests/embedded/mysql/src/main/java/org/glassfish/tests/embedded/web/Person.java b/appserver/tests/embedded/mysql/src/main/java/org/glassfish/tests/embedded/web/Person.java deleted file mode 100644 index 1b5c91578e4..00000000000 --- a/appserver/tests/embedded/mysql/src/main/java/org/glassfish/tests/embedded/web/Person.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - -/** - * @author bhavanishankar@java.net - */ - -@Entity -@Table(name = "person") -public class Person { - - @Id - @Column(name = "UUID") - private String uuid; - - @Column(name = "NAME") - private String name; - - @Column(name = "PROFESSION") - private String profession; - - public Person() {} - - public Person(String uuid, String name, String profession) { - setUuid(uuid); - setName(name); - setProfession(profession); - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getProfession() { - return profession; - } - - public void setProfession(String profession) { - this.profession = profession; - } - - @Override - public String toString() { - return "Person [uuid = " + uuid + ", name = " + name + - ", profession = " + profession + "]"; - } -} diff --git a/appserver/tests/embedded/mysql/src/main/resources/META-INF/persistence.xml b/appserver/tests/embedded/mysql/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 701b5adff36..00000000000 --- a/appserver/tests/embedded/mysql/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - java:app/mysql/MySQLEmbeddedDataSource - - - - - - diff --git a/appserver/tests/embedded/mysql/src/test/java/org/glassfish/tests/embedded/web/MySqlTest.java b/appserver/tests/embedded/mysql/src/test/java/org/glassfish/tests/embedded/web/MySqlTest.java deleted file mode 100644 index 8d55f2f5526..00000000000 --- a/appserver/tests/embedded/mysql/src/test/java/org/glassfish/tests/embedded/web/MySqlTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.*; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; - -/** - * @author bhavanishankar@java.net - */ - -public class MySqlTest { - - @Test - public void test() throws Exception { - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setPort("http-listener", 8080); - - GlassFish glassFish = GlassFishRuntime.bootstrap(). - newGlassFish(glassFishProperties); - - glassFish.start(); - - Deployer deployer = glassFish.getDeployer(); - String appName = deployer.deploy(new File("target/mysqltest.war")); - System.out.println("Deployed [" + appName + "]"); - - - // Access the app - get("http://localhost:8080/mysqltest/mysqlTestServlet", "connection = "); - - glassFish.dispose(); - - } - - private static void get(String url, String result) throws Exception { - try { - URL servlet = new URL(url); - HttpURLConnection uc = (HttpURLConnection) servlet.openConnection(); - System.out.println("\nURLConnection = " + uc + " : "); - if (uc.getResponseCode() != 200) { - throw new Exception("Servlet did not return 200 OK response code"); - } - BufferedReader in = new BufferedReader(new InputStreamReader( - uc.getInputStream())); - String line = null; - boolean found = false; - int index; - while ((line = in.readLine()) != null) { - System.out.println(line); - index = line.indexOf(result); - if (index != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); - in.close(); - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } -} diff --git a/appserver/tests/embedded/pom.xml b/appserver/tests/embedded/pom.xml deleted file mode 100755 index cbe3d1bb01f..00000000000 --- a/appserver/tests/embedded/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests - embedded - 5.194-SNAPSHOT - pom - GlassFish Embedded Tests - - - basic - cdi_basic - cdi_ejb_jpa - glassfish_resources_xml - ejb - scatteredarchive - maven-plugin - web - inplanted - static - - diff --git a/appserver/tests/embedded/scatteredarchive/pom.xml b/appserver/tests/embedded/scatteredarchive/pom.xml deleted file mode 100644 index 3f66894dfc3..00000000000 --- a/appserver/tests/embedded/scatteredarchive/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.embedded.basic - scatteredarchive - 4.1-SNAPSHOT - Scattered Archive Test - - scatteredarchive - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - false - false - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - 4.1-SNAPSHOT - - - - - run-with-shell-jar - - - build - static-shell - - - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - - - junit - junit - - - diff --git a/appserver/tests/embedded/scatteredarchive/src/main/config/application.xml b/appserver/tests/embedded/scatteredarchive/src/main/config/application.xml deleted file mode 100755 index 47f22885646..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/main/config/application.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - Scattered Enterprise Archive Test - - Scattered Enterprise Archive - - - - sa.war - satest - - - - - scatteredra.rar - - diff --git a/appserver/tests/embedded/scatteredarchive/src/main/config/ra.xml b/appserver/tests/embedded/scatteredarchive/src/main/config/ra.xml deleted file mode 100644 index 831332e4e5c..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/main/config/ra.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - Scattered Archive Test RA - Oracle Corporation - ScatteredArchiveTestRA - 1.0 - - - - - org.glassfish.tests.embedded.scatteredarchive.ScatteredArchiveTestRA - - - - - diff --git a/appserver/tests/embedded/scatteredarchive/src/main/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTestRA.java b/appserver/tests/embedded/scatteredarchive/src/main/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTestRA.java deleted file mode 100644 index e21e71e8948..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/main/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTestRA.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.scatteredarchive; - -import javax.resource.ResourceException; -import javax.resource.spi.ActivationSpec; -import javax.resource.spi.BootstrapContext; -import javax.resource.spi.ResourceAdapter; -import javax.resource.spi.ResourceAdapterInternalException; -import javax.resource.spi.endpoint.MessageEndpointFactory; -import javax.transaction.xa.XAResource; -import java.util.logging.Logger; - -/** - * @author bhavanishankar@java.net - */ - -public class ScatteredArchiveTestRA implements ResourceAdapter { - - private static final Logger logger = Logger.getAnonymousLogger(); - - public void start(BootstrapContext bootstrapContext) - throws ResourceAdapterInternalException { - logger.info("ScatteredArchiveTestRA start has been called"); - } - - public void stop() { - logger.info("ScatteredArchiveTestRA stop has been called"); - } - - public void endpointActivation(MessageEndpointFactory messageEndpointFactory, - ActivationSpec activationSpec) throws ResourceException { - logger.info("ScatteredArchiveTestRA endpointActivation has been called"); - } - - public void endpointDeactivation(MessageEndpointFactory messageEndpointFactory, - ActivationSpec activationSpec) { - logger.info("ScatteredArchiveTestRA endpointDeactivation has been called"); - } - - public XAResource[] getXAResources(ActivationSpec[] activationSpecs) - throws ResourceException { - logger.info("ScatteredArchiveTestRA getXAResources has been called"); - return new XAResource[0]; - } -} diff --git a/appserver/tests/embedded/scatteredarchive/src/main/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTestServlet.java b/appserver/tests/embedded/scatteredarchive/src/main/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTestServlet.java deleted file mode 100644 index f2672e2ea41..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/main/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTestServlet.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.scatteredarchive; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author bhavanishankar@dev.java.net - */ -@WebServlet(name = "ScatteredArchiveTestServlet", - urlPatterns = "/ScatteredArchiveTestServlet") -public class ScatteredArchiveTestServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter out = httpServletResponse.getWriter(); - out.println("Hi from ScatteredArchiveTestServlet"); - out.flush(); - out.close(); - } -} - diff --git a/appserver/tests/embedded/scatteredarchive/src/main/resources/LocalStrings.properties b/appserver/tests/embedded/scatteredarchive/src/main/resources/LocalStrings.properties deleted file mode 100644 index 9c36532b997..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/main/resources/LocalStrings.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -greeting_message=Hi, my name is Bhavani. What's yours? -greeting_response=Hello diff --git a/appserver/tests/embedded/scatteredarchive/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/scatteredarchive/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 98627c634e1..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - /satest - diff --git a/appserver/tests/embedded/scatteredarchive/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/scatteredarchive/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d0042b99d7b..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - jsptest - - diff --git a/appserver/tests/embedded/scatteredarchive/src/main/webapp/images/duke.waving.gif b/appserver/tests/embedded/scatteredarchive/src/main/webapp/images/duke.waving.gif deleted file mode 100644 index 4336a2d05b9a165fa79f239cbfd347a792352c6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1305 zcmbV{>pRm60Dynn>|#TkI7a1cb277wOU`3moU;i@a@LYGDTGP4Nx56wG$Uj*H6m>; ztq^q*$z_vQad~M` zsZ4fx;CPlSvnVI$%t#bBH?<-+H8(YtpLyayT}W(dMFh8_QdaSEz4mwu zQjCc-5?n^k&*LMaykR&R6}K+sWaj1EOE@36g_w*J6Uidjb-sjV-sDZDQpprGH=~)a zAY;6fy85Z4w(djlDjFGCV%(A4?>KY<{)z2C*1I*q_CAuVr^S_hp%exLj9sL=4jY*r$>Z?qDcq>-1WY zH>@DocVai!m}!I}#6XAOL&)XceAqsLwMcJ-5_qJy*T`d(_7&Jd$KiN;Xg2z{%qr|T zhIbBvyZo z-n9h-GbIG7Sxk{(;@SF{ODsi4`s7Y5nh67&%!7~)@_7){NJRudx0>CJcxLkwjo5Om zn;~9U4xPbgVz#Kq69WX!R{#KaH39^2d!+=3NjOEU*%sZTc&#q+VA{Ir9!>tnk9#K} zwWRk@6ta~rFQl;rf#z&b9tWSk>_)BeUp?kn**=BnqTs*@70a!Mbk%B zWl0>(KI?U3UkD%)ORa|7nEFIkB(PuLGq=)gCJ<;GAiV7)k_u&Y0Xg`@<>${g5)y*x zBxo}&$XQfBln{F@ZTUOg(MPU%qlDPWLYx#!+Zn>s55Ej_RxFnocdBpN$NpOSwS7PY zH??x`grSdcCexegda%%Xw@#?;Nb!5`g1)C`Xu)23(4#W`ljDw;?l?zl(Q-OZ`Jypn zn;$j0RQ+TLTsH5rgkal)EFz_v$NuK}_%1)_ zSprZQmV_tyf!WM1ORol3f6+Z(bt`s}qcO^}e;onBjd^gDsSEE6trjyxC1i~BkpQ-J zIIrpp&(`e+*;0nq@NQ6fFFOX?XQOrDc`O0=ub?!6rxEULsj&WVO*#fL#V(nK - -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - - -Hello - - - - - - - -

    -
    - -

    - - -
    - - - <%@include file="response.jsp" %> - - - - diff --git a/appserver/tests/embedded/scatteredarchive/src/main/webapp/response.jsp b/appserver/tests/embedded/scatteredarchive/src/main/webapp/response.jsp deleted file mode 100644 index 1e35770dc87..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/main/webapp/response.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%-- - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. ---%> - -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - -<%@ page import="javax.servlet.http.*" %> - -<% - String user = (String)request.getParameter("username"); - HttpSession httpSession = request.getSession(); - String users = (String)httpSession.getAttribute("users"); - if ( users == null ) { - users = user; - } - else { - users = users + ", " + user; - } - httpSession.setAttribute("users", users); -%> - - -

    , <%= users %>!

    - - - - - - - - - - - - - diff --git a/appserver/tests/embedded/scatteredarchive/src/test/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTest.java b/appserver/tests/embedded/scatteredarchive/src/test/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTest.java deleted file mode 100644 index 82df82154a7..00000000000 --- a/appserver/tests/embedded/scatteredarchive/src/test/java/org/glassfish/tests/embedded/scatteredarchive/ScatteredArchiveTest.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.scatteredarchive; - -import junit.framework.Assert; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.archive.ScatteredArchive; -import org.glassfish.embeddable.archive.ScatteredEnterpriseArchive; -import org.glassfish.embeddable.web.HttpListener; -import org.glassfish.embeddable.web.WebContainer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class ScatteredArchiveTest { - - @Test - public void test() throws Exception { - - GlassFishProperties props = new GlassFishProperties(); - props.setPort("http-listener", 8080); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(props); - glassfish.start(); - - // Test Scattered Web Archive - ScatteredArchive sa = new ScatteredArchive("scatteredarchive", - ScatteredArchive.Type.WAR, new File("src/main/webapp")); - sa.addClassPath(new File("target/classes")); - sa.addClassPath(new File("src/main/resources")); - URI warURI = sa.toURI(); - printContents(warURI); - - // Deploy archive - Deployer deployer = glassfish.getDeployer(); - String appname = deployer.deploy(warURI); - System.out.println("Deployed [" + appname + "]"); - Assert.assertEquals(appname, "scatteredarchive"); - - // Now create a http listener and access the app. - WebContainer webcontainer = glassfish.getService(WebContainer.class); - HttpListener listener = new HttpListener(); - listener.setId("my-listener"); - listener.setPort(9090); - webcontainer.addWebListener(listener); - - get("http://localhost:9090/satest", "Hi, my name is Bhavani. What's yours?"); - get("http://localhost:9090/satest/ScatteredArchiveTestServlet", - "Hi from ScatteredArchiveTestServlet"); - get("http://localhost:8080/satest/ScatteredArchiveTestServlet", - "Hi from ScatteredArchiveTestServlet"); - - deployer.undeploy(appname); - - // Test Scattered RA - ScatteredArchive rar = new ScatteredArchive("scatteredra", - ScatteredArchive.Type.RAR); - rar.addClassPath(new File("target/classes")); - rar.addMetadata(new File("src/main/config/ra.xml")); - URI rarURI = rar.toURI(); - printContents(rarURI); - appname = deployer.deploy(rarURI); - System.out.println("Deployed RAR [" + appname + "]"); - Assert.assertEquals(appname, "scatteredra"); - - // Test Scattered Enterprise Archive. - ScatteredEnterpriseArchive ear = new ScatteredEnterpriseArchive("sear"); - ear.addArchive(warURI, "sa.war"); - ear.addArchive(rarURI); - ear.addMetadata(new File("src/main/config/application.xml")); - URI earURI = ear.toURI(); - printContents(earURI); - appname = deployer.deploy(earURI); - System.out.println("Deployed [" + appname + "]"); - Assert.assertEquals(appname, "sear"); - - get("http://localhost:9090/satest", "Hi, my name is Bhavani. What's yours?"); - get("http://localhost:9090/satest/ScatteredArchiveTestServlet", - "Hi from ScatteredArchiveTestServlet"); - get("http://localhost:8080/satest/ScatteredArchiveTestServlet", - "Hi from ScatteredArchiveTestServlet"); - - glassfish.dispose(); - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); - } - - void printContents(URI jarURI) throws IOException { - JarFile jarfile = new JarFile(new File(jarURI)); - System.out.println("\n\n[" + jarURI + "] contents : \n"); - Enumeration entries = jarfile.entries(); - while (entries.hasMoreElements()) { - JarEntry entry = entries.nextElement(); - System.out.println(entry.getSize() + "\t" + new Date(entry.getTime()) + - "\t" + entry.getName()); - } - System.out.println(); - } -} diff --git a/appserver/tests/embedded/servlet_runs_admin_cmds/pom.xml b/appserver/tests/embedded/servlet_runs_admin_cmds/pom.xml deleted file mode 100644 index df0c73d9392..00000000000 --- a/appserver/tests/embedded/servlet_runs_admin_cmds/pom.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.embedded.basic - servlet_runs_admin_cmds - 4.1-SNAPSHOT - - Servlet Running Admin Commands using org.glassfish.embeddable.CommandRunner - war - - - servlet_runs_admin_cmds - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - - - - - - - - - - run-with-3.1.1 - - true - - - - org.glassfish.main.extras - glassfish-embedded-all - 3.1.1 - test - - - - - - run-with-shell-jar - - - build - static-shell - - - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - - - - junit - junit - test - - - org.glassfish.main.common - simple-glassfish-api - 3.1.1 - provided - - - jakarta.servlet - jakarta.servlet-api - provided - - - - diff --git a/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/java/org/glassfish/tests/embedded/servlet_runs_admin_cmds/RunAdminCommandsServlet.java b/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/java/org/glassfish/tests/embedded/servlet_runs_admin_cmds/RunAdminCommandsServlet.java deleted file mode 100644 index 7e76525714c..00000000000 --- a/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/java/org/glassfish/tests/embedded/servlet_runs_admin_cmds/RunAdminCommandsServlet.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.servlet_runs_admin_cmds; - -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; - -import javax.annotation.Resource; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author bhavanishankar@dev.java.net - */ -@WebServlet(name = "RunAdminCommandsServlet", - urlPatterns = "/RunAdminCommandsServlet") -public class RunAdminCommandsServlet extends HttpServlet { - - @Resource(mappedName = "org.glassfish.embeddable.CommandRunner") - CommandRunner cr; - - @Override - protected void doGet(HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse) throws ServletException, IOException { - PrintWriter out = httpServletResponse.getWriter(); - out.println("Inside RunAdminCommandsServlet..."); - out.println("CommandRunner = " + cr); - if (cr != null) { - CommandResult result = cr.run("create-jdbc-connection-pool", - "--datasourceclassname=org.apache.derby.jdbc.ClientDataSource", - "--restype=javax.sql.XADataSource", - "--property=portNumber=1527:password=APP:user=APP:serverName=localhost:databaseName=sun-appserv-samples:connectionAttributes=create\\=true", - "sample_derby_pool"); - out.println("Ran create-jdbc-connection-pool command. Output = [ " + - result.getOutput() + "]"); - result = cr.run("version"); - out.println("Ran version command. Output = [" + result.getOutput() + "]"); - } - out.flush(); - out.close(); - } -} - diff --git a/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 4d42bc216b7..00000000000 --- a/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - /servlet_runs_admin_cmds - diff --git a/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 60365738bc3..00000000000 --- a/appserver/tests/embedded/servlet_runs_admin_cmds/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - servlet_runs_admin_cmds - - - RunAdminCommandsServlet - - diff --git a/appserver/tests/embedded/servlet_runs_admin_cmds/src/test/java/org/glassfish/tests/embedded/servlet_runs_admin_cmds/RunAdminCommandsTest.java b/appserver/tests/embedded/servlet_runs_admin_cmds/src/test/java/org/glassfish/tests/embedded/servlet_runs_admin_cmds/RunAdminCommandsTest.java deleted file mode 100644 index 41372757c45..00000000000 --- a/appserver/tests/embedded/servlet_runs_admin_cmds/src/test/java/org/glassfish/tests/embedded/servlet_runs_admin_cmds/RunAdminCommandsTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.servlet_runs_admin_cmds; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import javax.naming.InitialContext; -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class RunAdminCommandsTest { - - @Test - public void test() throws Exception { - - GlassFishProperties props = new GlassFishProperties(); - props.setPort("http-listener", 9090); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(props); - glassfish.start(); - - // Bind the command runner in JNDI tree with your own mapped-name. - CommandRunner cr = glassfish.getCommandRunner(); - new InitialContext().bind("org.glassfish.embeddable.CommandRunner", cr); - - // Deploy archive - Deployer deployer = glassfish.getDeployer(); - String appname = deployer.deploy(new File("target/servlet_runs_admin_cmds.war")); - System.out.println("Deployed [" + appname + "]"); - Assert.assertEquals(appname, "servlet_runs_admin_cmds"); - - get("http://localhost:9090/servlet_runs_admin_cmds", - "JDBC connection pool sample_derby_pool created successfully"); - - deployer.undeploy(appname); - glassfish.dispose(); - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); - } - -} diff --git a/appserver/tests/embedded/static/ejb/pom.xml b/appserver/tests/embedded/static/ejb/pom.xml deleted file mode 100755 index 19bd1642967..00000000000 --- a/appserver/tests/embedded/static/ejb/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.embedded - static - 4.1-SNAPSHOT - ../../pom.xml - - org.glassfish.tests.embedded.static - ejb - pom - GlassFish Static Embedded EJB Tests - - simple - - diff --git a/appserver/tests/embedded/static/ejb/simple/pom.xml b/appserver/tests/embedded/static/ejb/simple/pom.xml deleted file mode 100644 index 9086f670958..00000000000 --- a/appserver/tests/embedded/static/ejb/simple/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - org.glassfish.tests.embedded.static - ejb - 4.1-SNAPSHOT - ../pom.xml - - 4.0.0 - org.glassfish.tests.embedded.static.ejb - simple - EJB static simple test - - - jakarta.ejb - jakarta.ejb-api - 3.2-b01 - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-web - 4.1-SNAPSHOT - test - - - diff --git a/appserver/tests/embedded/static/ejb/simple/src/main/java/org/glassfish/tests/embedded/ejb/SampleEjb.java b/appserver/tests/embedded/static/ejb/simple/src/main/java/org/glassfish/tests/embedded/ejb/SampleEjb.java deleted file mode 100644 index 0808c94fe50..00000000000 --- a/appserver/tests/embedded/static/ejb/simple/src/main/java/org/glassfish/tests/embedded/ejb/SampleEjb.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb; - -import javax.ejb.Stateless; - -/** - * @author Jerome Dochez - */ -@Stateless -public class SampleEjb { - - public String saySomething() { - return "Hello World"; - } -} diff --git a/appserver/tests/embedded/static/ejb/simple/src/test/java/org/glassfish/tests/embedded/ejb/test/EmbeddedTest.java b/appserver/tests/embedded/static/ejb/simple/src/test/java/org/glassfish/tests/embedded/ejb/test/EmbeddedTest.java deleted file mode 100644 index 21145b913bf..00000000000 --- a/appserver/tests/embedded/static/ejb/simple/src/test/java/org/glassfish/tests/embedded/ejb/test/EmbeddedTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.ejb.test; - -import org.junit.Test; -import org.junit.Assert; -import org.glassfish.tests.embedded.ejb.SampleEjb; -import org.glassfish.internal.embedded.*; - -import javax.ejb.embeddable.EJBContainer; -import javax.naming.*; -import java.util.Map; -import java.util.HashMap; -import java.io.File; - -/** - * this test will use the ejb API testing. - * - * @author Jerome Dochez - */ -public class EmbeddedTest { - - @Test - public void test() throws Exception { - Server.Builder builder = new Server.Builder("simple"); - Server server = builder.build(); - File f = new File(System.getProperty("basedir"), "target"); - f = new File(f, "classes"); - - ScatteredArchive archive = new ScatteredArchive.Builder("simple",f).buildJar(); - server.addContainer(ContainerBuilder.Type.ejb); - try { - server.start(); - String appName = null; - try { - appName = server.getDeployer().deploy(archive, null); - } catch (Exception e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - assert(appName!=null); - try { - System.out.println("Looking up EJB..."); - SampleEjb ejb = (SampleEjb) (new InitialContext()).lookup("java:global/simple/SampleEjb"); - if (ejb!=null) { - System.out.println("Invoking EJB..."); - System.out.println(ejb.saySomething()); - Assert.assertEquals(ejb.saySomething(), "Hello World"); - } - } catch (Exception e) { - System.out.println("ERROR calling EJB:"); - e.printStackTrace(); - throw new RuntimeException(e); - } - - server.getDeployer().undeploy(appName, null); - } finally { - server.stop(); - } - } -} diff --git a/appserver/tests/embedded/static/pom.xml b/appserver/tests/embedded/static/pom.xml deleted file mode 100755 index 8ce605dda7c..00000000000 --- a/appserver/tests/embedded/static/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests - embedded - 4.1-SNAPSHOT - ../../pom.xml - - org.glassfish.tests.embedded - static - pom - GlassFish Static Embedded Tests - - ejb - web - - diff --git a/appserver/tests/embedded/static/web/pom.xml b/appserver/tests/embedded/static/web/pom.xml deleted file mode 100755 index 7b5f82cb0fe..00000000000 --- a/appserver/tests/embedded/static/web/pom.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - fish.payara - payara-parent - 5.194-SNAPSHOT - - - 4.0.0 - org.glassfish - static - 4.1-SNAPSHOT - Static embedded testing - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - process-resources - - unpack - - - - - org.glassfish.distributions - web - ${project.version} - zip - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - - - - - - - - org.glassfish.main.extras - glassfish-embedded-shell - ${project.version} - - - jakarta.servlet - jakarta.servlet-api - provided - - - org.glassfish.admin - config-api - ${project.version} - - - junit - junit - test - - - diff --git a/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/ExistingConfigurationTest.java b/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/ExistingConfigurationTest.java deleted file mode 100644 index 2d08ff43412..00000000000 --- a/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/ExistingConfigurationTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cooked; - -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.internal.embedded.Server; -import org.glassfish.internal.embedded.EmbeddedFileSystem; -import org.junit.Assert; -import org.junit.Test; - -import java.io.File; -import java.util.Collection; - -import com.sun.enterprise.config.serverbeans.VirtualServer; -import org.glassfish.grizzly.config.dom.NetworkListener; - -/** - * @author Jerome Dochez - */ -public class ExistingConfigurationTest { - - @Test - public void setupServer() throws Exception { - - Server server=null; - - System.out.println("setup started with gf installation " + System.getProperty("basedir")); - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "dependency"); - f = new File(f, "glassfish4"); - f = new File(f, "glassfish"); - if (f.exists()) { - System.out.println("Using gf at " + f.getAbsolutePath()); - } else { - System.out.println("GlassFish not found at " + f.getAbsolutePath()); - Assert.assertTrue(f.exists()); - } - try { - EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder(); - efsb.installRoot(f, false); - // find the domain root. - f = new File(f,"domains"); - f = new File(f, "domain1"); - f = new File(f, "config"); - f = new File(f, "domain.xml"); - Assert.assertTrue(f.exists()); - efsb.configurationFile(f); - - Server.Builder builder = new Server.Builder("inplanted"); - builder.embeddedFileSystem(efsb.build()); - server = builder.build(); - - ServiceLocator habitat = server.getHabitat(); - Collection vss = habitat.getAllServices(VirtualServer.class); - Assert.assertTrue(vss.size()>0); - for (VirtualServer vs : vss ) { - System.out.println("Virtual Server " + vs.getId()); - } - Collection nls = habitat.getAllServices(NetworkListener.class); - for (NetworkListener nl : nls) { - System.out.println("Network listener " + nl.getPort()); - } - } catch(Exception e) { - e.printStackTrace(); - throw e; - } finally { - if (server!=null) { - server.stop(); - } - } - } -} diff --git a/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/ExistingDomainTest.java b/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/ExistingDomainTest.java deleted file mode 100644 index 15eabc85e63..00000000000 --- a/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/ExistingDomainTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cooked; - -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.internal.embedded.*; -import org.glassfish.api.deployment.DeployCommandParameters; -import org.glassfish.api.admin.*; -import org.glassfish.api.container.Sniffer; -import org.junit.BeforeClass; -import org.junit.Assert; -import org.junit.Test; -import org.junit.AfterClass; - -import java.io.File; -import java.util.Enumeration; - -/** - * Test embedded API with an existing domain.xml - * - * @author Jerome Dochez - */ -public class ExistingDomainTest { - static Server server; - - @BeforeClass - public static void setupServer() throws Exception { - System.out.println("setup started with gf installation " + System.getProperty("basedir")); - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "dependency"); - f = new File(f, "glassfish4"); - f = new File(f, "glassfish"); - if (f.exists()) { - System.out.println("Using gf at " + f.getAbsolutePath()); - } else { - System.out.println("GlassFish not found at " + f.getAbsolutePath()); - Assert.assertTrue(f.exists()); - } - try { - EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder(); - efsb.installRoot(f, false); - // find the domain root. - f = new File(f,"domains"); - f = new File(f, "domain1"); - Assert.assertTrue(f.exists()); - efsb.instanceRoot(f); - - Server.Builder builder = new Server.Builder("inplanted"); - builder.embeddedFileSystem(efsb.build()); - server = builder.build(); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - - //@Test - public void testWeb() throws Exception { - System.out.println("test web"); - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "test-classes"); - ScatteredArchive.Builder builder = new ScatteredArchive.Builder("hello", f); - builder.addClassPath(f.toURI().toURL()); - builder.resources(f); - server.createPort(8080); - server.addContainer(server.createConfig(ContainerBuilder.Type.web)); - DeployCommandParameters dp = new DeployCommandParameters(f); - ScatteredArchive war = builder.buildWar(); - System.out.println("War content"); - Enumeration contents = war.entries(); - while(contents.hasMoreElements()) { - System.out.println(contents.nextElement()); - } - String appName = server.getDeployer().deploy(builder.buildWar(), dp); - server.getDeployer().undeploy(appName, null); - } - - @Test - public void Test() { - - ServiceLocator habitat = server.getHabitat(); - System.out.println("Process type is " + habitat.getService(ProcessEnvironment.class).getProcessType()); - for (Sniffer s : habitat.getAllServices(Sniffer.class)) { - System.out.println("Got sniffer " + s.getModuleType()); - } - } - - @AfterClass - public static void shutdownServer() throws Exception { - System.out.println("shutdown initiated for server " + server); - if (server!=null) { - try { - server.stop(); - } catch (LifecycleException e) { - e.printStackTrace(); - throw e; - } - } - - - } - -} diff --git a/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/InplantedTest.java b/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/InplantedTest.java deleted file mode 100644 index 4b51547b838..00000000000 --- a/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/cooked/InplantedTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.cooked; - -import org.junit.Test; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.AfterClass; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.internal.embedded.*; -import org.glassfish.api.container.Sniffer; -import org.glassfish.api.admin.*; -import org.glassfish.api.deployment.DeployCommandParameters; - -import java.io.*; -import java.util.Enumeration; - -/** - * @author Jerome Dochez - */ -public class InplantedTest { - - static Server server; - - @BeforeClass - public static void setupServer() throws Exception { - System.out.println("setup started with gf installation " + System.getProperty("basedir")); - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "dependency"); - f = new File(f, "glassfish4"); - f = new File(f, "glassfish"); - if (f.exists()) { - System.out.println("Using gf at " + f.getAbsolutePath()); - } else { - System.out.println("GlassFish not found at " + f.getAbsolutePath()); - Assert.assertTrue(f.exists()); - } - try { - EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder(); - efsb.installRoot(f, false); - Server.Builder builder = new Server.Builder("inplanted"); - builder.embeddedFileSystem(efsb.build()); - server = builder.build(); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } - - @Test - public void testWeb() throws Exception { - System.out.println("test web"); - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "test-classes"); - ScatteredArchive.Builder builder = new ScatteredArchive.Builder("hello", f); - builder.addClassPath(f.toURI().toURL()); - builder.resources(f); - ScatteredArchive war = builder.buildWar(); - System.out.println("War content"); - Enumeration contents = war.entries(); - while(contents.hasMoreElements()) { - System.out.println(contents.nextElement()); - } - try { - System.out.println("Port created " + server.createPort(14587)); - server.addContainer(ContainerBuilder.Type.web); - server.start(); - DeployCommandParameters dp = new DeployCommandParameters(f); - String appName = server.getDeployer().deploy(war, dp); - System.out.println("Application deployed under name = " + appName); - if (appName!=null) { - server.getDeployer().undeploy(appName, null); - } - } catch (IOException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } catch (LifecycleException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - } - - @Test - public void Test() { - - ServiceLocator habitat = server.getHabitat(); - System.out.println("Process type is " + habitat.getService(ProcessEnvironment.class).getProcessType()); - for (Sniffer s : habitat.getAllServices(Sniffer.class)) { - System.out.println("Got sniffer " + s.getModuleType()); - } - } - - @AfterClass - public static void shutdownServer() throws Exception { - System.out.println("shutdown initiated"); - if (server!=null) { - try { - server.stop(); - } catch (LifecycleException e) { - e.printStackTrace(); - throw e; - } - } - - - } -} diff --git a/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/web/HelloWeb.java b/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/web/HelloWeb.java deleted file mode 100644 index 0e7025c52ac..00000000000 --- a/appserver/tests/embedded/static/web/src/test/java/org/glassfish/tests/embedded/web/HelloWeb.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.annotation.WebServlet; -import javax.servlet.*; -import javax.servlet.http.*; - - -@WebServlet(urlPatterns={"/hello"}) -public class HelloWeb extends HttpServlet { - - public HelloWeb() { - System.out.println("Servlet WEB-HELLO initialized"); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World !"); - } catch(Exception e) { - e.printStackTrace(); - } - } -} diff --git a/appserver/tests/embedded/utils/pom.xml b/appserver/tests/embedded/utils/pom.xml deleted file mode 100644 index 48e326457a2..00000000000 --- a/appserver/tests/embedded/utils/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests - embedded - 4.1-SNAPSHOT - ../pom.xml - - org.glassfish.tests.embedded - utils - Utilities for embedded testing - - - org.glassfish.main.extras - glassfish-embedded-shell - 4.1-SNAPSHOT - - - junit - junit - - - diff --git a/appserver/tests/embedded/utils/src/main/java/org/glassfish/tests/embedded/utils/EmbeddedServerUtils.java b/appserver/tests/embedded/utils/src/main/java/org/glassfish/tests/embedded/utils/EmbeddedServerUtils.java deleted file mode 100644 index fbdd7ed14b0..00000000000 --- a/appserver/tests/embedded/utils/src/main/java/org/glassfish/tests/embedded/utils/EmbeddedServerUtils.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.utils; - -import org.junit.Assert; -import org.glassfish.internal.embedded.LifecycleException; -import org.glassfish.internal.embedded.EmbeddedFileSystem; -import org.glassfish.internal.embedded.Server; - -import java.io.File; - -public class EmbeddedServerUtils { - - public static File getServerLocation() { - System.out.println("setup started with gf installation " + System.getProperty("basedir")); - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "dependency"); - f = new File(f, "glassfish4"); - f = new File(f, "glassfish"); - if (f.exists()) { - System.out.println("Using gf at " + f.getAbsolutePath()); - } else { - System.out.println("GlassFish not found at " + f.getAbsolutePath()); - Assert.assertTrue(f.exists()); - } - return f; - } - public static File getDomainLocation(File serverLocation) { - return getDomainLocation(serverLocation, "domain1"); - } - - public static File getDomainLocation(File serverLocation, String domainName) { - - // find the domain root. - File f = new File(serverLocation,"domains"); - f = new File(f, domainName); - Assert.assertTrue(f.exists()); - return f; - } - - public static Server createServer(EmbeddedFileSystem fileSystem) throws Exception { - try { - Server.Builder builder = new Server.Builder("inplanted"); - builder.embeddedFileSystem(fileSystem); - return builder.build(); - } catch(Exception e) { - e.printStackTrace(); - if (fileSystem.autoDelete) { - fileSystem.preDestroy(); - } - throw e; - } - } - - public static void shutdownServer(Server server) throws Exception { - System.out.println("shutdown initiated"); - if (server!=null) { - try { - server.stop(); - } catch (LifecycleException e) { - e.printStackTrace(); - throw e; - } - } - - - } - -} diff --git a/appserver/tests/embedded/web/autodelete/pom.xml b/appserver/tests/embedded/web/autodelete/pom.xml deleted file mode 100644 index bcf27960bc8..00000000000 --- a/appserver/tests/embedded/web/autodelete/pom.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - web - 4.1-SNAPSHOT - ../../pom.xml - - - org.glassfish.tests.embedded.web - autodelete - war - Embedded file system deletion test - - ${project.artifactId} - - - true - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-war-plugin - - - org.codehaus.mojo - exec-maven-plugin - 1.1.1 - - - test - - exec - - - - - java - - - -classpath - - org.glassfish.tests.embedded.web.autodelete.ServletMain - - test - true - - - - - - - org.glassfish.extras - glassfish-embedded-web - ${project.version} - test - - - jakarta.servlet - jakarta.servlet-api - provided - - - net.sourceforge.htmlunit - htmlunit - 1.14 - test - - - org.glassfish.tests.embedded - utils - ${project.version} - test - - - diff --git a/appserver/tests/embedded/web/autodelete/src/main/java/HelloWorld.java b/appserver/tests/embedded/web/autodelete/src/main/java/HelloWorld.java deleted file mode 100644 index d0da249f454..00000000000 --- a/appserver/tests/embedded/web/autodelete/src/main/java/HelloWorld.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.annotation.WebServlet; -import javax.servlet.*; -import javax.servlet.http.*; - -@WebServlet(urlPatterns={"/hello"}) -public class HelloWorld extends HttpServlet { - - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World !
    "); - } catch(Exception e) { - e.printStackTrace(); - } - } -} - diff --git a/appserver/tests/embedded/web/autodelete/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/web/autodelete/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 7f9af843a3f..00000000000 --- a/appserver/tests/embedded/web/autodelete/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - diff --git a/appserver/tests/embedded/web/autodelete/src/test/java/org/glassfish/tests/embedded/web/autodelete/ServletMain.java b/appserver/tests/embedded/web/autodelete/src/test/java/org/glassfish/tests/embedded/web/autodelete/ServletMain.java deleted file mode 100644 index 46ec7f61886..00000000000 --- a/appserver/tests/embedded/web/autodelete/src/test/java/org/glassfish/tests/embedded/web/autodelete/ServletMain.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web.autodelete; - -import org.junit.*; -import org.junit.Assert; -import org.glassfish.internal.embedded.*; -import org.glassfish.api.deployment.*; - -import javax.naming.*; -import java.io.*; -import java.util.*; - -import com.gargoylesoftware.htmlunit.*; - -/** - * Created by IntelliJ IDEA. - * User: dochez - * Date: Nov 4, 2009 - * Time: 1:44:28 PM - * To change this template use File | Settings | File Templates. - */ -public class ServletMain { - - public static void main(String[] args) { - ServletMain test = new ServletMain(); - System.setProperty("basedir", System.getProperty("user.dir")); - try { - test.test(); - } catch (Exception e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - } - - @Test - public void test() throws Exception { - - EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder(); - File instanceRoot = new File(System.getProperty("user.dir"), "embeddedMain"); - System.out.println("Using instanceRoot " + instanceRoot.getAbsolutePath()); - efsb.instanceRoot(instanceRoot).autoDelete(true); - - Server server = new Server.Builder("web").embeddedFileSystem(efsb.build()).build(); - try { - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "classes"); - ScatteredArchive.Builder builder = new ScatteredArchive.Builder("hello", f); - builder.addClassPath(f.toURI().toURL()); - builder.resources(f); - ScatteredArchive war = builder.buildWar(); - System.out.println("War content"); - Enumeration contents = war.entries(); - while(contents.hasMoreElements()) { - System.out.println(contents.nextElement()); - } - Port port = server.createPort(8080); - server.addContainer(server.createConfig(ContainerBuilder.Type.web)); - DeployCommandParameters dp = new DeployCommandParameters(f); - String appName = server.getDeployer().deploy(war, dp); - WebClient webClient = new WebClient(); - try { - Page page = webClient.getPage("http://localhost:8080/classes/hello"); - System.out.println("Got response " + page.getWebResponse().getContentAsString()); - Assert.assertTrue("Servlet returned wrong content", page.getWebResponse().getContentAsString().startsWith("Hello World")); - } finally { - System.out.println("Undeploying"); - server.getDeployer().undeploy(appName, null); - port.close(); - } - listDir(instanceRoot); - - } finally { - System.out.println("Stopping the server !"); - try { - server.stop(); - } catch (LifecycleException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - } - if (instanceRoot.listFiles()!=null) { - listDir(instanceRoot); - throw new RuntimeException("some files were not cleaned"); - } - } - - private void listDir(File dir) { - if (!dir.exists()) { - System.out.println("Directory " + dir + " does not exist"); - return; - } - for (File f : dir.listFiles()) { - if (f.isDirectory()) { - listDir(f); - } else { - System.out.println(f.getAbsolutePath()); - } - } - } -} diff --git a/appserver/tests/embedded/web/pom.xml b/appserver/tests/embedded/web/pom.xml deleted file mode 100755 index 731b3359a0a..00000000000 --- a/appserver/tests/embedded/web/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests.embedded - web - pom - 4.1-SNAPSHOT - GlassFish Web Embedded Tests - - web-api - - diff --git a/appserver/tests/embedded/web/servlet/pom.xml b/appserver/tests/embedded/web/servlet/pom.xml deleted file mode 100644 index 08a42809582..00000000000 --- a/appserver/tests/embedded/web/servlet/pom.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.embedded - web - 4.1-SNAPSHOT - ../../pom.xml - - - org.glassfish.tests.embedded.web - servlet - war - Simple embedded servlet project - - ${project.artifactId} - - - true - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-war-plugin - - - org.codehaus.mojo - exec-maven-plugin - 1.1.1 - - - test - - exec - - - - - java - - - -classpath - - org.glassfish.tests.embedded.web.servlet.ServletMain - - test - true - - - - - - - org.glassfish.extras - glassfish-embedded-web - ${project.version} - test - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - net.sourceforge.htmlunit - htmlunit - 1.14 - test - - - org.glassfish.tests.embedded - utils - ${project.version} - test - - - diff --git a/appserver/tests/embedded/web/servlet/src/main/java/HelloWorld.java b/appserver/tests/embedded/web/servlet/src/main/java/HelloWorld.java deleted file mode 100644 index d0da249f454..00000000000 --- a/appserver/tests/embedded/web/servlet/src/main/java/HelloWorld.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.annotation.WebServlet; -import javax.servlet.*; -import javax.servlet.http.*; - -@WebServlet(urlPatterns={"/hello"}) -public class HelloWorld extends HttpServlet { - - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World !
    "); - } catch(Exception e) { - e.printStackTrace(); - } - } -} - diff --git a/appserver/tests/embedded/web/servlet/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/web/servlet/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 7f9af843a3f..00000000000 --- a/appserver/tests/embedded/web/servlet/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - diff --git a/appserver/tests/embedded/web/servlet/src/test/java/org/glassfish/tests/embedded/web/servlet/ServletMain.java b/appserver/tests/embedded/web/servlet/src/test/java/org/glassfish/tests/embedded/web/servlet/ServletMain.java deleted file mode 100644 index e77ccb395e8..00000000000 --- a/appserver/tests/embedded/web/servlet/src/test/java/org/glassfish/tests/embedded/web/servlet/ServletMain.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web.servlet; - -import org.junit.*; -import org.junit.Assert; -import org.glassfish.internal.embedded.*; -import org.glassfish.api.deployment.*; - -import javax.naming.*; -import java.io.*; -import java.util.*; - -import com.gargoylesoftware.htmlunit.*; - -/** - * Created by IntelliJ IDEA. - * User: dochez - * Date: Nov 4, 2009 - * Time: 1:44:28 PM - * To change this template use File | Settings | File Templates. - */ -public class ServletMain { - - public static void main(String[] args) { - ServletMain test = new ServletMain(); - System.setProperty("basedir", System.getProperty("user.dir")); - try { - test.test(); - } catch (Exception e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - } - - @Test - public void test() throws Exception { - - Server server = new Server.Builder("web").build(); - try { - File f = new File(System.getProperty("basedir")); - f = new File(f, "target"); - f = new File(f, "classes"); - ScatteredArchive.Builder builder = new ScatteredArchive.Builder("hello", f); - builder.addClassPath(f.toURI().toURL()); - builder.resources(f); - ScatteredArchive war = builder.buildWar(); - System.out.println("War content"); - Enumeration contents = war.entries(); - while(contents.hasMoreElements()) { - System.out.println(contents.nextElement()); - } - Port port = server.createPort(8882); - - server.addContainer(server.createConfig(ContainerBuilder.Type.web)); - DeployCommandParameters dp = new DeployCommandParameters(f); - String appName = server.getDeployer().deploy(war, dp); - WebClient webClient = new WebClient(); - try { - Page page = webClient.getPage("http://localhost:8882/classes/hello"); - System.out.println("Got response " + page.getWebResponse().getContentAsString()); - Assert.assertTrue("Servlet returne wrong content", page.getWebResponse().getContentAsString().startsWith("Hello World")); - String hostName = System.getProperty("com.sun.aas.hostName"); - assert hostName!=null; - page = webClient.getPage("http://"+hostName+":8882/classes/hello"); - System.out.println("Got response " + page.getWebResponse().getContentAsString()); - Assert.assertTrue("Servlet returned wrong content", page.getWebResponse().getContentAsString().startsWith("Hello World")); - } finally { - System.out.println("Undeploying"); - server.getDeployer().undeploy(appName, null); - port.close(); - } - - } finally { - System.out.println("Stopping the server !"); - try { - server.stop(); - } catch (LifecycleException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - } - } -} diff --git a/appserver/tests/embedded/web/web-all/pom.xml b/appserver/tests/embedded/web/web-all/pom.xml deleted file mode 100644 index 979793a2868..00000000000 --- a/appserver/tests/embedded/web/web-all/pom.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - - - - - 4.0.0 - org.glassfish.tests - web-all-embedded-test - 4.1-SNAPSHOT - Test for glassfish-embedded-web - - - 4.1-SNAPSHOT - - - - - org.glassfish.extras - glassfish-embedded-web - ${project.version} - system - ${project.build.directory}/glassfish-embedded-web.jar - - - junit - junit - test - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - buildDir - ${project.build.outputDirectory} - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - generate-resources - - copy - - - - - - org.glassfish.extras - glassfish-embedded-web - ${project.version} - - - ${project.build.directory} - true - - - - - - - - - run-with-uber-jar - - true - - - - org.glassfish.extras - glassfish-embedded-all - 4.1-SNAPSHOT - - - - - run-with-shell-jar - - - build - static-shell - - - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - - - junit - junit - - - - - repo - CDDL and GPLv2 w/ classpath execption dual license - https://glassfish.dev.java.net/public/CDDL+GPL.html - - - diff --git a/appserver/tests/embedded/web/web-all/src/main/java/org/glassfish/tests/weball/WebHello.java b/appserver/tests/embedded/web/web-all/src/main/java/org/glassfish/tests/weball/WebHello.java deleted file mode 100644 index 17c1b641f89..00000000000 --- a/appserver/tests/embedded/web/web-all/src/main/java/org/glassfish/tests/weball/WebHello.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.weball; - -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.annotation.WebServlet; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.annotation.Resource; - -/** - * @author Vivek Pandey - */ -@WebServlet(urlPatterns={"/hello"}) -public class WebHello extends HttpServlet { - - public WebHello() { - System.out.println("Servlet WEB-HELLO initialized"); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World!"); - } catch(Exception e) { - e.printStackTrace(); - } - } -} diff --git a/appserver/tests/embedded/web/web-all/src/test/java/org/glassfish/tests/weball/WebAllTest.java b/appserver/tests/embedded/web/web-all/src/test/java/org/glassfish/tests/weball/WebAllTest.java deleted file mode 100644 index c0da40677a8..00000000000 --- a/appserver/tests/embedded/web/web-all/src/test/java/org/glassfish/tests/weball/WebAllTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.weball; - -import org.glassfish.grizzly.config.dom.NetworkConfig; -import org.glassfish.api.deployment.DeployCommandParameters; -import org.glassfish.internal.embedded.*; -import org.glassfish.api.embedded.web.*; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; -import org.glassfish.api.admin.ServerEnvironment; - -/** - * @author Vivek Pandey - */ -public class WebAllTest { - private static Server server = null; - private static Port http=null; - - @BeforeClass - public static void setup() throws IOException { - - //create directory 'glassfish' inside target so that it gets cleaned by itself - EmbeddedFileSystem.Builder fsBuilder = new EmbeddedFileSystem.Builder(); - String p = System.getProperty("buildDir"); - File root = new File(p).getParentFile(); - root =new File(root, "glassfish"); - //If web container requires docroot to be there may be it should be automatically created by embedded API - new File(root, "docroot").mkdirs(); - - EmbeddedFileSystem fs = fsBuilder.instanceRoot(root).build(); - Server.Builder builder = new Server.Builder("WebAllTest"); - builder.embeddedFileSystem(fs); - server = builder.build(); - server.getHabitat().getService(NetworkConfig.class, - ServerEnvironment.DEFAULT_INSTANCE_NAME); - http = server.createPort(8080); - Assert.assertNotNull("Failed to create port 8080!", http); - ContainerBuilder b = server.createConfig(ContainerBuilder.Type.web); - EmbeddedWebContainer embedded = (EmbeddedWebContainer) b.create(server); - embedded.setConfiguration((WebBuilder)b); - embedded.bind(http, "http"); - - } - - @Test - public void testWeb() throws Exception { - System.out.println("Starting Web " + server); - ContainerBuilder b = server.createConfig(ContainerBuilder.Type.web); - - System.out.println("builder is " + b); - server.addContainer(b); - EmbeddedDeployer deployer = server.getDeployer(); - System.out.println("Added Web"); - - String p = System.getProperty("buildDir"); - System.out.println("Root is " + p); - ScatteredArchive.Builder builder = new ScatteredArchive.Builder("sampleweb", new File(p)); - builder.resources(new File(p)); - builder.addClassPath((new File(p)).toURL()); - DeployCommandParameters dp = new DeployCommandParameters(new File(p)); - - System.out.println("Deploying " + p); - String appName = deployer.deploy(builder.buildWar(), dp); - Assert.assertNotNull("Deployment failed!", appName); - - URL servlet = new URL("http://localhost:8080/classes/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - - Assert.assertEquals("Hello World!", sb.toString()); - - deployer.undeploy(appName, null); - } -} diff --git a/appserver/tests/embedded/web/web-api/pom.xml b/appserver/tests/embedded/web/web-api/pom.xml deleted file mode 100755 index 4dc4cece8ad..00000000000 --- a/appserver/tests/embedded/web/web-api/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - 4.0.0 - org.glassfish.tests.embedded - web-api-embedded-test - war - 4.1-SNAPSHOT - Test for glassfish-embedded-web - - - src/test/java - target/classes/WEB-INF/classes - embedded-webapi-tests - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - false - false - - - buildDir - ${project.build.outputDirectory} - - - targetDir - ${project.build.directory} - - - - - - - - - run-with-web-jar - - true - - - - org.glassfish.main.extras - glassfish-embedded-web - 4.1-SNAPSHOT - - - junit - junit - - - - - run-with-shell-jar - - - build - static-shell - - - - - junit - junit - - - org.glassfish.main.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - - - diff --git a/appserver/tests/embedded/web/web-api/src/main/java/org/glassfish/tests/webapi/HelloWeb.java b/appserver/tests/embedded/web/web-api/src/main/java/org/glassfish/tests/webapi/HelloWeb.java deleted file mode 100644 index d6da6c37d1a..00000000000 --- a/appserver/tests/embedded/web/web-api/src/main/java/org/glassfish/tests/webapi/HelloWeb.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.webapi; - -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.annotation.WebServlet; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.annotation.Resource; - -@WebServlet(urlPatterns={"/hello"}) -public class HelloWeb extends HttpServlet { - - public HelloWeb() { - System.out.println("Servlet WEB-HELLO initialized"); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World!"); - } catch(Exception e) { - e.printStackTrace(); - } - } -} diff --git a/appserver/tests/embedded/web/web-api/src/main/resources/cacerts.jks b/appserver/tests/embedded/web/web-api/src/main/resources/cacerts.jks deleted file mode 100644 index 51a1b77a9d66bf0eaac27531b9d6f22bd2dfc745..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 80547 zcmdqK2Urx@wl+-8IcFM>AhDYaO3ngGmJAIv(1a#um7GO#6p)MrK@bT7A`%1O%ZXt(mv(NNLQ zNC;Num#8O{5960C_vtsl5@13sTGO{$G{>-)7OPig2|Bs zJaPg>U`7RCMvxl98bS-EMjpl|C-L#|;s3rEerp$J$Qdvz@)SBb{g2;}J63i%VzFyTBhsSM zpD()W7&vlQT)LgUyk7z!o=UMeFoD(W{33_y?~z{JQgIdY5%MhAX?8IcEwFsLvnlvWF>KPUBtK=`y{ zOG{aDHl2Hj!OY0hY#20Ps-Qo=;8!^WUIQvh0a44`!iSC5?jHU&DQ(;CwiAMj@?KU| zk*l9ZCtn)eyY*~9+Z zlep#FS?Jj9$kcA&!NwWjU)HKE{feg~P_XgoNYyDl-Mu_KtzigHn7g$Tpzng#P&oWZ z(c@k_{ZMp_DsTu!IiT!G$BItG?|_1eg2p_q!@^5ydhWE8Bh}pdl$t9lK^VYv!21Ez zoLo-w>Amx_3RY`7 z9ZFMgUgcT5;I4g_Y(H1mGp6vi)5|Du{}tm7#FdRcDwne<;6QSyx9ly2K*B?Gop!bU zF9(Y_w)mH03gq(|M+4!e34*ohgikNbC`+U1N9(?(Gwu`Z#x~f#{+#r)Ml;wIBenR8 z#PtJ@V4SPb=7LPDWvoi-cWwE>&u+mE_WOd%KF*)3E{u2){jO8VPs^<8EsJN8W~@<2 ze9G&$7e212-KBWF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#sIe~`oy~$as{51Z zFpQMOYwC>O4L(F$SS3ioT!L>O^oeg;Qh$68y*Xs)SkiK1@j>yD$G%#@2laNO z$(<)wUV*)7QrXs?`iDtbq7HQ#Lw&LBV{*=NYc8}B-`cUcjkb>F*48n(QX=6A-(O)H OwzT8Fk+xR7`hNf!Tp20= diff --git a/appserver/tests/embedded/web/web-api/src/main/resources/embedded-webapi-tests.war b/appserver/tests/embedded/web/web-api/src/main/resources/embedded-webapi-tests.war deleted file mode 100644 index d18fd580d0c6a1a0c0dd4da851df66787db0a7dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 79893 zcma&M1F$GTuqAkH+qP}nwr!j5+P3X?ZQHhO+urvl{-2qR+5Nj6QQaL;C$mmxRG-YM zCRQZr*T(zHSl;77%3$!OGl zBp&VAQA)_tO3E%dRMjXr&`3$lN~k`_lS+^OdZd`0r3en%QxNPTYt*IK#%!2*gFJ|l z_2~5I0RD^A|H&QvA1O;)LvvH-|H=IS1VQ`*sf!Bz-@fnvL?QfdC}SH#XXpRc=YK@w zzkL1|+TO|hzhQy*|6*bOA7hzWI$QiVwj}?bwl1d5F8^H&sQ-U@a5ptFbg=xNR3HHM zLfQDg2?TWDK>+|T|24FKj{Y;^Ca%_|bnb?3mUiZJ=9XqTahKeS&;b5^n^#7{SsY@= zHqK0qQPMNUy4j78l1?j$ER?~Lt&;89n=Hg8EUZMfbkzv1NaLnSp^>2|r;eI@5`TpY zT#uJ}9d=HAcW!T6uK8SE?*RIMHGuq6PzNVQ?ZF05+uPeSGS0{EBlh55lADHEF!lQWI4>Z2`qo={)?*d<)BG0Bcky$2BF`Os!ve>T;INCYp*$`H_45p`L zWn}z+L66P<^Z?YEK5ORE50mwlJ(%3i%T~_5hAl2~KKIwhy`XFwiDTD|KXiUN>IE;d zz2ZxG!Hv!{PtjC6@qJ+jHWVT5qabd@N@)(yK5rb-N-&ZwNH}0}^2f!6KZNdEsBCp4 zCuO8L)9?H2p&2pB$&f@Dti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_Cn0KeYM`1cqPv8=pxd02SLmTD}Gpu&;C!!-s%?f_Q*|uzocI{LS^N z01TZ!j}-$w1Him?c$LHb{VBWx{aH%)SFBt=hlRfa{a#r2_eg)I4)+sjfAgBBzoPhKf%)%gUa#cOHMu`&%5VP_&0i~Y ze^2#y559g<)nWkuW!(HjC%wkj|M(c}&s2X7-2bG~!THxze+c9Mp6T`X`*U>dClfK@ zUzvW5wf!FD??N>{QE-TVqWluL`Dy&uZQ?a{@PFIu>N`jR{BxuEHIne(H@DYV!cXJt zzZ(BPA`AZ=`8Bri6Pb_nFQ@g7$p0dHDJ3|Ghi(lh%>; ie{q?wv_G9ASqU(}V`Ct|x{C#r3Rv(B=l~lK(EkDF%qnpJ diff --git a/appserver/tests/embedded/web/web-api/src/main/resources/keystore.jks b/appserver/tests/embedded/web/web-api/src/main/resources/keystore.jks deleted file mode 100644 index bd88aab1f8e9f2315e3246d4dad02b23054c3456..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2865 zcmd6nc{mj68o+0>%nZU5|K#i-~sm5hW0i{H2(i+Ju{_;=%ic(smKW`4H<= z<&ux!LYfl(p>=}g6%Uu&&tNW!VG*u9&t0I>mMdO0ExpPo&1C_F?Gc$!pFv_rDBZGxqz|9pxCY|Dr~^=puHzC3hDHlK@`wMWLpF zJo}n}OnDaaUGCaZpRom!(;70b33B4V4L$#)>sC3vm%qZEZhB;`QxX$EKL!qA_rIcb z#HFRC8!GfM{6=bNDhX$vpEhm81E9Cs4U@-4Ui-@B70d%02yw}p^&b%TH_wh-O!ICq zH@P5^s44rJqN+a`+h1e|Yu($$?6w-bq=&&bl+L9Xn!lzUn@R(6U&pI0mEWJs+|$Ck zzPAaIoNeATY2r)CJ@vJM74F#weO^dei5@_lLbgs_Dd6l|?APD}iWv#(N^OOxJ+X%e zp7G;eE_^Fn8=uvicqpnqTNEQ_s$nHIgbuM{7Z^;EbE6CO@6 zC_ULBi}x$7N_A#0(o=5A(<51)VZj?+zdW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Ik2Iz2t{AE)w5r`5-dedzD!_5#iUh!4BVM7{8A_LZ2c|o n&Bk%s4Ht$|hL#RK|JNS$;@i&YpC9Q5A0L#D$gQaZPf`93e>;ig diff --git a/appserver/tests/embedded/web/web-api/src/main/resources/keystore0 b/appserver/tests/embedded/web/web-api/src/main/resources/keystore0 deleted file mode 100644 index 6d88ec36f4681001ed77b41260cc094183e72b3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1382 zcmezO_TO6u1_mY|W&~r-?9|HQlKi4n1E7e>jWvu-K-t{}O-$Pj_}I9#*%(*uR%pV^xhnYS@Uf?ZN;F3;OM2(wFn;{H?2ZtCZ!9)ehcYu8VdGpZ4@A zIdJG)lF^m2xglIzviz^E)R@)w@b=>eP0a^*zw^Z#{?41JukM$=pG}|bfZn^L8`saT z%dcd-_dEVY&#?@nIX&}EDl_;nzO#G%ioe~*cXj1ftyQaM6v8fkpV+_cxt(+D zZZ!+g{MgDTIdb2cAuKD4YO>u$j9n&XGV_RQ6|`hN{~iyvR| zB9(lT3vZNCbJBWzmxMp^h)ommyS}VecW-p^-kO)M%VVCgYa5nX@JV+IZa*aZzv^%3 za+hywF7j4#NnDv*^5cHGd$JaT@Xn=gm-n9dsqR+mqOc_{Z{G<$jU!7}BpWdo<;={s zihAiDVmfzi_Lf>bMwSBcqbAjr(>;GMhr21T`0?KQGw-*Q>BNt>k3a0Xk+Y%Y+2!m# zt7@3$@`~~_#4S3l&wc0$|zViZ;H7kQbu_3nsCmVAp3!5-gXfTY! zAh=nHzf<3>rI`8XFnbI0|RB&UX6ar0Jm$$6RL-Z8F86QigrY3@M+SaMl;Q zU+^{aZ7>U+Wqx#b>L+jDtaH4`%< z10%BYfKkT`beF1ro#U1r+tiPpx<5ntmP7J8g9X`=bl_G~_AkfM8fCS^rQufY z?oI;f?>|lZb)!q+OSbc0gE+O^;{g&W8-9cwzR>3P z|GxiSdh2iCDTP-LqNd$CB$K4{-Y=t8_0-o<9z5vy=|ouew3rZH52dH~kqW+-}?a{eJ59 z%Dz|gf|s|N>Kr+e<8kLj=j2U>>W?~pPACe<uSUnpPD>ja%r#R%B#f+&4rsC{1>R5 z)$Gr7kmY)K=+#003ycpZ`f&E0(D3?Ez4n0fhK(hkGWK`bS%_X${Tn|;Upw-BXX2*a zPxecHSHBwiE8|H?nS%GRUtbF?H@)+y5jK1`z2U*cJD2`NpW<(~VDVWOxAh9=-kn^k zIUHuO8Q1n(N?Y^2T^Th&XQA9n?&I$APU|jhbCgQ%D6^7bVDs7i&)LPJIX=N6pJCzD zi=KMrCl}1~eYv3JsQP;r$Ledd7=H@ATg!UFl~d?wRPWoj*?Z?6;(YFVGJQ?s$Lsfh zyM2AWXX}~e?^a6RD}2+GU#am*cS%dd))LjVLdpVlM{2`wdVLf9CX)VLW9xoam7k0` zRX%1n7an})P;yk{p4szbhr2o?uE}jSuM|F`d(^#X{yeFhFP=gYbcCL%fh8~@Cjt|4 ztU(jwu?5Ubj7&@{{sMi?2E1&XT5TR}-+6(lnw7zz*pS9lb@WJlaXIsVjw5ZYiML(XlQI?U|?!w90lf@7#cyj z1LLU1`N&}d%<{~Qy$lA8olK353>!9FI=nXho6+ggEw!yN@09jPER6YAJ89>$@QL;N zR{A|qyV9T|(-O{t?Q73Zip49%x~ARuckO=Is>u6pcQlqnUt3o0w9Bw$gY{x2 zZIg41d}<%`ZuouOmpd!)i-<>H$$54@U5%^Cwn@|cnRX>9?&+P`H0c4u*GB0@pLX|0 zGBGnUFd{n-7!tGNrd(0r=RmDrubkjM zo1daej#|9s+Q#cs9{HYMSL9h|_n$Z9M7FG~NS#qwNQu!NbpruEQ=@xv`%jn7=9_cD Qu48&q*+E@#Q{HFc0O+zXAOHXW diff --git a/appserver/tests/embedded/web/web-api/src/main/resources/org/glassfish/tests/webapi/domain.xml b/appserver/tests/embedded/web/web-api/src/main/resources/org/glassfish/tests/webapi/domain.xml deleted file mode 100644 index ca3104710f2..00000000000 --- a/appserver/tests/embedded/web/web-api/src/main/resources/org/glassfish/tests/webapi/domain.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/embedded/web/web-api/src/main/resources/org/glassfish/tests/webapi/my-default-web.xml b/appserver/tests/embedded/web/web-api/src/main/resources/org/glassfish/tests/webapi/my-default-web.xml deleted file mode 100644 index 2902963b0a9..00000000000 --- a/appserver/tests/embedded/web/web-api/src/main/resources/org/glassfish/tests/webapi/my-default-web.xml +++ /dev/null @@ -1,1155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - com.sun.faces.validateXml - true - - - - - - - - com.sun.faces.forceLoadConfiguration - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - default - org.apache.catalina.servlets.DefaultServlet - - debug - 0 - - - listings - true - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jsp - org.apache.jasper.servlet.JspServlet - - xpoweredBy - true - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - default - / - - - - - jsp - *.jsp - *.jspx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 30 - - - - - - - - - - - - - - abs - audio/x-mpeg - - - ai - application/postscript - - - aif - audio/x-aiff - - - aifc - audio/x-aiff - - - aiff - audio/x-aiff - - - aim - application/x-aim - - - art - image/x-jg - - - asf - video/x-ms-asf - - - asx - video/x-ms-asf - - - au - audio/basic - - - avi - video/x-msvideo - - - avx - video/x-rad-screenplay - - - bcpio - application/x-bcpio - - - bin - application/octet-stream - - - bmp - image/bmp - - - body - text/html - - - cdf - application/x-cdf - - - cer - application/x-x509-ca-cert - - - class - application/java - - - cpio - application/x-cpio - - - csh - application/x-csh - - - css - text/css - - - dib - image/bmp - - - doc - application/msword - - - dtd - application/xml-dtd - - - dv - video/x-dv - - - dvi - application/x-dvi - - - eps - application/postscript - - - etx - text/x-setext - - - exe - application/octet-stream - - - gif - image/gif - - - gk - application/octet-stream - - - gtar - application/x-gtar - - - gz - application/x-gzip - - - hdf - application/x-hdf - - - hqx - application/mac-binhex40 - - - htc - text/x-component - - - htm - text/html - - - html - text/html - - - hqx - application/mac-binhex40 - - - ico - image/x-icon - - - ief - image/ief - - - jad - text/vnd.sun.j2me.app-descriptor - - - jar - application/java-archive - - - java - text/plain - - - jnlp - application/x-java-jnlp-file - - - jpe - image/jpeg - - - jpeg - image/jpeg - - - jpg - image/jpeg - - - js - text/javascript - - - kar - audio/x-midi - - - latex - application/x-latex - - - m3u - audio/x-mpegurl - - - mac - image/x-macpaint - - - man - application/x-troff-man - - - mathml - application/mathml+xml - - - me - application/x-troff-me - - - mid - audio/x-midi - - - midi - audio/x-midi - - - mif - application/x-mif - - - mov - video/quicktime - - - movie - video/x-sgi-movie - - - mp1 - audio/x-mpeg - - - mp2 - audio/x-mpeg - - - mp3 - audio/x-mpeg - - - mpa - audio/x-mpeg - - - mpe - video/mpeg - - - mpeg - video/mpeg - - - mpega - audio/x-mpeg - - - mpg - video/mpeg - - - mpv2 - video/mpeg2 - - - ms - application/x-wais-source - - - nc - application/x-netcdf - - - oda - application/oda - - - ogg - application/ogg - - - pbm - image/x-portable-bitmap - - - pct - image/pict - - - pdf - application/pdf - - - pgm - image/x-portable-graymap - - - pic - image/pict - - - pict - image/pict - - - pls - audio/x-scpls - - - png - image/png - - - pnm - image/x-portable-anymap - - - pnt - image/x-macpaint - - - ppm - image/x-portable-pixmap - - - ppt - application/powerpoint - - - ps - application/postscript - - - psd - image/x-photoshop - - - qt - video/quicktime - - - qti - image/x-quicktime - - - qtif - image/x-quicktime - - - ras - image/x-cmu-raster - - - rdf - application/rdf+xml - - - rgb - image/x-rgb - - - rm - application/vnd.rn-realmedia - - - roff - application/x-troff - - - rtf - application/rtf - - - rtx - text/richtext - - - sh - application/x-sh - - - shar - application/x-shar - - - - sit - application/x-stuffit - - - smf - audio/x-midi - - - snd - audio/basic - - - src - application/x-wais-source - - - sv4cpio - application/x-sv4cpio - - - sv4crc - application/x-sv4crc - - - svg - image/svg+xml - - - svgz - image/svg+xml - - - swf - application/x-shockwave-flash - - - t - application/x-troff - - - tar - application/x-tar - - - tcl - application/x-tcl - - - tex - application/x-tex - - - texi - application/x-texinfo - - - texinfo - application/x-texinfo - - - tif - image/tiff - - - tiff - image/tiff - - - tr - application/x-troff - - - tsv - text/tab-separated-values - - - txt - text/plain - - - ulw - audio/basic - - - ustar - application/x-ustar - - - xbm - image/x-xbitmap - - - xml - application/xml - - - xpm - image/x-xpixmap - - - xsl - application/xml - - - xslt - application/xslt+xml - - - xwd - image/x-xwindowdump - - - vsd - application/x-visio - - - vxml - application/voicexml+xml - - - wav - audio/x-wav - - - wbmp - image/vnd.wap.wbmp - - - wml - text/vnd.wap.wml - - - wmlc - application/vnd.wap.wmlc - - - wmls - text/vnd.wap.wmls - - - wmlscriptc - application/vnd.wap.wmlscriptc - - - wrl - x-world/x-vrml - - - xht - application/xhtml+xml - - - xhtml - application/xhtml+xml - - - xls - application/vnd.ms-excel - - - xul - application/vnd.mozilla.xul+xml - - - Z - application/x-compress - - - z - application/x-compress - - - zip - application/zip - - - odp - application/x-vnd.oasis.opendocument.presentation - - - odt - application/x-vnd.oasis.opendocument.text - - - ods - application/x-vnd.oasis.opendocument.spreadsheet - - - odg - application/x-vnd.oasis.opendocument.graphics - - - - - - - - - - - - - - - - - - - index.html - index.htm - index.jsp - - - - BASIC - - - - diff --git a/appserver/tests/embedded/web/web-api/src/main/resources/toto.jar b/appserver/tests/embedded/web/web-api/src/main/resources/toto.jar deleted file mode 100755 index 67a09d17dc937ed00a612751e7916f9089a681b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 670 zcmWIWW@Zs#-~hsqP8)j$B*4kQ!r%MB z$s^J;H8NPHKhyk?rY8PWJX~!0l4oMt70*;(XMQUBSi}f+NWSGHR(GH^AdGN`HkvPl zfwCc~#U;*($%*+snZ+e~$vKI|#i4#@`3^b={Bv8q^p*O(1H9}?eMej$T`5p_cl*`` z->sgz_e`IB(Y$Ye}BxG(A3Ay?JKS;p4(&`zVZ@x(^dI5oZpPB zJ)EoqR>s7iTX?2i$!Eq(wn&vpdrwR~Xn*ONdZ@&AKd~xJrHQPoE*Lj$KdV=%622@c88aSpn%s=VVOr`_BxDjL;Q_o*xGKkcSZz28>K145)DlizrZBq5^p2fMOP1 zD{|0+ViEytflRnoq - - - - toto - this a dummy web app - - - org.glassfish.tests.webapi.TestListener - - - - TestGF - Test GF root servlet - org.glassfish.tests.webapi.TestServlet - - - - TestGF2 - Test GF secondary servlet - org.glassfish.tests.webapi.TestServlet - - - - TestGF - /testgf - - - - TestGF2 - /toto/testgf2 - - - diff --git a/appserver/tests/embedded/web/web-api/src/main/webapp/images/duke.waving.gif b/appserver/tests/embedded/web/web-api/src/main/webapp/images/duke.waving.gif deleted file mode 100644 index 4336a2d05b9a165fa79f239cbfd347a792352c6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1305 zcmbV{>pRm60Dynn>|#TkI7a1cb277wOU`3moU;i@a@LYGDTGP4Nx56wG$Uj*H6m>; ztq^q*$z_vQad~M` zsZ4fx;CPlSvnVI$%t#bBH?<-+H8(YtpLyayT}W(dMFh8_QdaSEz4mwu zQjCc-5?n^k&*LMaykR&R6}K+sWaj1EOE@36g_w*J6Uidjb-sjV-sDZDQpprGH=~)a zAY;6fy85Z4w(djlDjFGCV%(A4?>KY<{)z2C*1I*q_CAuVr^S_hp%exLj9sL=4jY*r$>Z?qDcq>-1WY zH>@DocVai!m}!I}#6XAOL&)XceAqsLwMcJ-5_qJy*T`d(_7&Jd$KiN;Xg2z{%qr|T zhIbBvyZo z-n9h-GbIG7Sxk{(;@SF{ODsi4`s7Y5nh67&%!7~)@_7){NJRudx0>CJcxLkwjo5Om zn;~9U4xPbgVz#Kq69WX!R{#KaH39^2d!+=3NjOEU*%sZTc&#q+VA{Ir9!>tnk9#K} zwWRk@6ta~rFQl;rf#z&b9tWSk>_)BeUp?kn**=BnqTs*@70a!Mbk%B zWl0>(KI?U3UkD%)ORa|7nEFIkB(PuLGq=)gCJ<;GAiV7)k_u&Y0Xg`@<>${g5)y*x zBxo}&$XQfBln{F@ZTUOg(MPU%qlDPWLYx#!+Zn>s55Ej_RxFnocdBpN$NpOSwS7PY zH??x`grSdcCexegda%%Xw@#?;Nb!5`g1)C`Xu)23(4#W`ljDw;?l?zl(Q-OZ`Jypn zn;$j0RQ+TLTsH5rgkal)EFz_v$NuK}_%1)_ zSprZQmV_tyf!WM1ORol3f6+Z(bt`s}qcO^}e;onBjd^gDsSEE6trjyxC1i~BkpQ-J zIIrpp&(`e+*;0nq@NQ6fFFOX?XQOrDc`O0=ub?!6rxEULsj&WVO*#fL#V(nK - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> - - Simple jsp page - Place your content here - - diff --git a/appserver/tests/embedded/web/web-api/src/main/webapp/response.jsp b/appserver/tests/embedded/web/web-api/src/main/webapp/response.jsp deleted file mode 100644 index 1e35770dc87..00000000000 --- a/appserver/tests/embedded/web/web-api/src/main/webapp/response.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%-- - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. ---%> - -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - -<%@ page import="javax.servlet.http.*" %> - -<% - String user = (String)request.getParameter("username"); - HttpSession httpSession = request.getSession(); - String users = (String)httpSession.getAttribute("users"); - if ( users == null ) { - users = user; - } - else { - users = users + ", " + user; - } - httpSession.setAttribute("users", users); -%> - - -

    , <%= users %>!

    - - - - - - - - - - - - - diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddContextTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddContextTest.java deleted file mode 100644 index d74ae55d8a1..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddContextTest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer#createContext - * - * @author Amy Roh - */ -public class EmbeddedAddContextTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddContext Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setListings(true); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void test() throws Exception { - - Context context = embedded.createContext(root); - embedded.addContext(context, contextRoot); - - VirtualServer vs = embedded.getVirtualServer("server"); - Assert.assertEquals("server", vs.getID()); - Assert.assertEquals("/"+contextRoot, vs.getContext(contextRoot).getPath()); - boolean containsContext = false; - for (Context ctx : vs.getContexts()) { - System.out.println("Context found "+ctx.getPath()); - if (ctx.getPath().endsWith(contextRoot)) { - containsContext = true; - } - } - Assert.assertTrue(containsContext); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - embedded.removeContext(context); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddHttpsListenerTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddHttpsListenerTest.java deleted file mode 100644 index e60c05a8243..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddHttpsListenerTest.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.*; -import java.net.*; -import java.security.*; -import java.security.cert.X509Certificate; -import javax.net.ssl.*; - -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; - -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; - -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer#addWebListener(HttpsListener) - * - * @author Amy Roh - */ -public class EmbeddedAddHttpsListenerTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddHttpsListener Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setListings(true); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - private void createHttpsListener(int port, - String name, - String keystore, - String password, - String certname) throws Exception { - - HttpsListener listener = new HttpsListener(); - listener.setPort(port); - listener.setId(name); - - String keyStorePath = root.getAbsolutePath() + keystore; - String trustStorePath = root.getAbsolutePath() + "/cacerts.jks"; - SslConfig sslConfig = new SslConfig(keyStorePath, trustStorePath); - sslConfig.setKeyPassword(password.toCharArray()); - String trustPassword = "changeit"; - sslConfig.setTrustPassword(trustPassword.toCharArray()); - if (certname != null) { - sslConfig.setCertNickname(certname); - } - listener.setSslConfig(sslConfig); - - embedded.addWebListener(listener); - } - - private void verify(int port) throws Exception { - - URL servlet = new URL("https://localhost:"+port+"/classes/hello"); - HttpsURLConnection uc = (HttpsURLConnection) servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(sb); - Assert.assertEquals("Hello World!", sb.toString()); - } - - @Test - public void test() throws Exception { - - createHttpsListener(9191, "default-ssl-listener", "/keystore.jks", "changeit", "s1as"); - //createHttpsListener(9292, "ssl-listener0", "/keystore0", "password0", "keystore0"); - //createHttpsListener(9393, "ssl-listener1", "/keystore1", "password1", null); - - Deployer deployer = glassfish.getDeployer(); - - URL source = WebHello.class.getClassLoader().getResource( - "org/glassfish/tests/embedded/web/WebHello.class"); - String p = source.getPath().substring(0, source.getPath().length() - - "org/glassfish/tests/embedded/web/WebHello.class".length()); - File path = new File(p).getParentFile().getParentFile(); - - String name = null; - if (path.getName().lastIndexOf('.') != -1) { - name = path.getName().substring(0, path.getName().lastIndexOf('.')); - } else { - name = path.getName(); - } - - System.out.println("Deploying " + path + ", name = " + name); - String appName = deployer.deploy(path.toURI(), "--name=" + name); - System.out.println("Deployed " + appName); - Assert.assertTrue(appName != null); - - disableCertValidation(); - verify(9191); - //verify(9292); - //verify(9393); - - if (appName!=null) - deployer.undeploy(appName); - - } - - public static void disableCertValidation() { - // Create a trust manager that does not validate certificate chains - TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) { - return; - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) { - return; - } - }}; - - try { - SSLContext sc = SSLContext.getInstance("TLS"); - sc.init(null, trustAllCerts, new SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); - } catch (Exception e) { - return; - } - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddListenerDefaultVSTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddListenerDefaultVSTest.java deleted file mode 100644 index 73eb5b81198..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddListenerDefaultVSTest.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import javax.servlet.Servlet; -import javax.servlet.ServletRegistration; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests for Context#addListener to default virtual server - * - * @author Amy Roh - */ -public class EmbeddedAddListenerDefaultVSTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String vsname = "test-server"; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddListenerDefaultVS Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - config.setListings(true); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedAddServletDefaultVS() throws Exception { - - VirtualServer vs = embedded.getVirtualServer("server"); - System.out.println("Default virtual server "+vs); - Context context = (Context) embedded.createContext(root); - context.addListener("org.glassfish.tests.embedded.web.MyServletContextListener"); - ServletRegistration sr = context.addServlet("MyServlet", "org.glassfish.tests.embedded.web.MyServlet"); - sr.addMapping(new String[] {"/myservlet"}); - vs.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/myservlet"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - vs.removeContext(context); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletAndFilterByClassNameTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletAndFilterByClassNameTest.java deleted file mode 100644 index 48b4b37b574..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletAndFilterByClassNameTest.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; -import javax.servlet.FilterRegistration; -import javax.servlet.DispatcherType; -import javax.servlet.Servlet; -import javax.servlet.ServletRegistration; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests for Context addServlet & addFilter using class name to default virtual server - * - * @author Amy Roh - */ -public class EmbeddedAddServletAndFilterByClassNameTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String vsname = "test-server"; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddServletAndFilterByClassNameTest Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - config.setListings(true); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedAddServletDefaultVS() throws Exception { - - VirtualServer vs = embedded.getVirtualServer("server"); - System.out.println("Default virtual server "+vs); - Context context = (Context) embedded.createContext(root); - - ServletRegistration sr = context.addServlet("NewFilterServlet", "org.glassfish.tests.embedded.web.NewFilterServlet"); - sr.setInitParameter("servletInitName", "servletInitValue"); - sr.addMapping("/newFilterServlet"); - - FilterRegistration fr = context.addFilter("NewFilter", "org.glassfish.tests.embedded.web.NewFilter"); - fr.setInitParameter("filterInitName", "filterInitValue"); - fr.addMappingForServletNames(EnumSet.of(DispatcherType.REQUEST), - true, "NewFilterServlet"); - - vs.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/newFilterServlet"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - vs.removeContext(context); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletAndFilterByClassTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletAndFilterByClassTest.java deleted file mode 100644 index d528725b19c..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletAndFilterByClassTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; -import javax.servlet.Filter; -import javax.servlet.FilterRegistration; -import javax.servlet.DispatcherType; -import javax.servlet.Servlet; -import javax.servlet.ServletRegistration; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests for Context addServlet & addFilter using class to default virtual server - * - * @author Amy Roh - */ -public class EmbeddedAddServletAndFilterByClassTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String vsname = "test-server"; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddServletAndFilterByClassNameTest Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - config.setListings(true); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedAddServletDefaultVS() throws Exception { - - VirtualServer vs = embedded.getVirtualServer("server"); - System.out.println("Default virtual server "+vs); - Context context = (Context) embedded.createContext(root); - - ServletRegistration sr = context.addServlet("NewFilterServlet", - (Class ) getClass().getClassLoader().loadClass( - "org.glassfish.tests.embedded.web.NewFilterServlet")); - sr.setInitParameter("servletInitName", "servletInitValue"); - sr.addMapping("/newFilterServlet"); - - FilterRegistration fr = context.addFilter("NewFilter", - (Class ) getClass().getClassLoader().loadClass( - "org.glassfish.tests.embedded.web.NewFilter")); - fr.setInitParameter("filterInitName", "filterInitValue"); - fr.addMappingForServletNames(EnumSet.of(DispatcherType.REQUEST), - true, "NewFilterServlet"); - - vs.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/newFilterServlet"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - vs.removeContext(context); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletDefaultVSTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletDefaultVSTest.java deleted file mode 100644 index df50ee7f090..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletDefaultVSTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import javax.servlet.Servlet; -import javax.servlet.ServletRegistration; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests for Context#addServlet to default virtual server - * - * @author Amy Roh - */ -public class EmbeddedAddServletDefaultVSTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String vsname = "test-server"; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddServletDefaultVS Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - config.setListings(true); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedAddServletDefaultVS() throws Exception { - - VirtualServer vs = embedded.getVirtualServer("server"); - System.out.println("Default virtual server "+vs); - Context context = (Context) embedded.createContext(root); - ServletRegistration sr = context.addServlet("NewServlet", "org.glassfish.tests.embedded.web.NewServlet"); - sr.addMapping(new String[] {"/newservlet"}); - vs.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/newservlet"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - vs.removeContext(context); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletTest.java deleted file mode 100644 index 8a349291f4c..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddServletTest.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import javax.servlet.Servlet; -import javax.servlet.ServletRegistration; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests for Context#addServlet, embedded.createVirtualServer - * - * @author Amy Roh - */ -public class EmbeddedAddServletTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String vsname = "test-server"; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddServlet Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - config.setListings(true); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedWebAPIConfig() throws Exception { - WebListener testListener = embedded.createWebListener("test-listener", HttpListener.class); - testListener.setPort(9090); - WebListener[] webListeners = new HttpListener[1]; - webListeners[0] = testListener; - - VirtualServerConfig config = new VirtualServerConfig(); - config.setHostNames("localhost"); - VirtualServer vs = (VirtualServer) - embedded.createVirtualServer(vsname, root, webListeners); - vs.setConfig(config); - embedded.addVirtualServer(vs); - boolean testvs = false; - for (VirtualServer avs : embedded.getVirtualServers()) { - System.out.println("virtual server "+avs.getID()); - if (avs.getID().equals(vsname)) { - testvs=true; - } - } - Assert.assertTrue(testvs); - Context context = (Context) embedded.createContext(root); - ServletRegistration sr = context.addServlet("NewServlet", "org.glassfish.tests.embedded.web.NewServlet"); - sr.addMapping(new String[] {"/newservlet"}); - vs.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:9090/"+contextRoot+"/newservlet"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - vs.removeContext(context); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddWebListenerTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddWebListenerTest.java deleted file mode 100644 index f8f3f22a9c8..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedAddWebListenerTest.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URLConnection; -import java.net.URL; -import java.security.KeyStore; -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSession; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.TrustManager; -import javax.net.ssl.TrustManagerFactory; - -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer#addWebListener(HttpListener) & HttpListener.setConfig - * - * @author Amy Roh - */ -public class EmbeddedAddWebListenerTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "test"; - static int port = 9090; - static int newPort = 9292; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddWebListener Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - } - - @Test - public void test() throws Exception { - - HttpListener testListener = new HttpListener("test-listener", port); - embedded.addWebListener(testListener); - - WebListenerConfig config = new WebListenerConfig("test-listener", newPort); - config.setProtocol("http"); - testListener.setConfig(config); - - List listenerList = new ArrayList(embedded.getWebListeners()); - Assert.assertTrue(listenerList.size()==1); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - Deployer deployer = glassfish.getDeployer(); - - URL source = WebHello.class.getClassLoader().getResource( - "org/glassfish/tests/embedded/web/WebHello.class"); - String p = source.getPath().substring(0, source.getPath().length() - - "org/glassfish/tests/embedded/web/WebHello.class".length()); - File path = new File(p).getParentFile().getParentFile(); - - String name = null; - - if (path.getName().lastIndexOf('.') != -1) { - name = path.getName().substring(0, path.getName().lastIndexOf('.')); - } else { - name = path.getName(); - } - - System.out.println("Deploying " + path + ", name = " + name); - - String appName = deployer.deploy(path.toURI(), "--contextroot", contextRoot, "--name=" + name); - - System.out.println("Deployed " + appName); - - Assert.assertTrue(appName != null); - - URL servlet = new URL("http://localhost:"+newPort+"/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - Assert.assertEquals("Hello World!", sb.toString()); - - if (appName!=null) - deployer.undeploy(appName); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedClassLoaderTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedClassLoaderTest.java deleted file mode 100644 index fe27e500c1e..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedClassLoaderTest.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.*; -import java.net.URL; -import java.net.URLClassLoader; -import java.net.URLConnection; -import java.util.logging.Level; - -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; - -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -public class EmbeddedClassLoaderTest { - - static GlassFish glassfish; - static String contextRoot = "test"; - static WebContainer wc; - static File root; - - @BeforeClass - public static void setupServer() throws GlassFishException { - - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - root = new File("target/classes"); - - wc = glassfish.getService(WebContainer.class); - wc.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setListings(true); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - wc.setConfiguration(config); - } - - private static void loadA(ClassLoader cl) { - String className = "TestCacaoList"; - try { - System.out.println("---> Loading " + className + " with " + cl); - cl.loadClass(className); - System.out.println("---> Finish to load " + className + " with " + cl); - } catch(Exception ex) { - System.out.println("---> Cannot load " + className + " with " + cl + ": " + ex); - throw new IllegalStateException(); - } - } - - @Test - public void test() throws Exception { - URL[] urls = new URL[1]; - urls[0] = (new File("src/main/resources/toto.jar")).toURI().toURL(); - URLClassLoader classLoader = new URLClassLoader(urls, EmbeddedClassLoaderTest.class.getClassLoader()); - loadA(classLoader); - - Thread.currentThread().setContextClassLoader(classLoader); - - File path = new File("src/main/resources/embedded-webapi-tests.war"); - - Context context = wc.createContext(path, classLoader); - wc.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:8080/test/testgf"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - - boolean success = sb.toString().contains("Class TestCacaoList loaded successfully from listener"); - if (success) { - success = sb.toString().contains("Class TestCacaoList loaded successfully from servlet"); - } - Assert.assertTrue(success); - in.close(); - - wc.removeContext(context); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateContextTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateContextTest.java deleted file mode 100644 index 60f920cca8a..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateContextTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer#createContext - * - * @author Amy Roh - */ -public class EmbeddedCreateContextTest { - - static GlassFish glassfish; - static WebContainer embedded; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedCreateContext Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - } - - @Test - public void test() throws Exception { - - HttpListener listener = new HttpListener(); - listener.setPort(8080); - listener.setId("embedded-listener-1"); - embedded.addWebListener(listener); - - File docRoot = new File("target/classes"); - Context context = (Context) embedded.createContext(docRoot, contextRoot, null); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateServletAndFilterTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateServletAndFilterTest.java deleted file mode 100644 index 751e18630b8..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateServletAndFilterTest.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; -import javax.servlet.Filter; -import javax.servlet.FilterRegistration; -import javax.servlet.DispatcherType; -import javax.servlet.Servlet; -import javax.servlet.ServletRegistration; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests for Context createServlet & createFilter using class to default virtual server - * - * @author Amy Roh - */ -public class EmbeddedCreateServletAndFilterTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String vsname = "test-server"; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedAddServletAndFilterByClassNameTest Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - config.setListings(true); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedAddServletDefaultVS() throws Exception { - - VirtualServer vs = embedded.getVirtualServer("server"); - System.out.println("Default virtual server "+vs); - Context context = (Context) embedded.createContext(root); - - Class servletCl = (Class) - Class.forName("org.glassfish.tests.embedded.web.NewFilterServlet"); - NewFilterServlet filterServlet = context.createServlet(servletCl); - ServletRegistration sr = context.addServlet("NewFilterServlet", filterServlet); - sr.setInitParameter("servletInitName", "servletInitValue"); - sr.addMapping("/newFilterServlet"); - - Class filterCl = (Class) - Class.forName("org.glassfish.tests.embedded.web.NewFilter"); - NewFilter filter = context.createFilter(filterCl); - FilterRegistration fr = context.addFilter("NewFilter", filter); - fr.setInitParameter("filterInitName", "filterInitValue"); - fr.addMappingForServletNames(EnumSet.of(DispatcherType.REQUEST), - true, "NewFilterServlet"); - - vs.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/newFilterServlet"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - vs.removeContext(context); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateVirtualServerTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateVirtualServerTest.java deleted file mode 100644 index 51409b5d1a3..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedCreateVirtualServerTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer#createVirtualServerTest - * - * @author Amy Roh - */ -public class EmbeddedCreateVirtualServerTest { - - static GlassFish glassfish; - static WebContainer embedded; - static int newPort = 9090; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedCreateVirtualServer Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - } - - @Test - public void test() throws Exception { - - HttpListener httpListener = new HttpListener(); - httpListener.setPort(8080); - httpListener.setId("embedded-listener-1"); - embedded.addWebListener(httpListener); - - List listenerList = new ArrayList(embedded.getWebListeners()); - Assert.assertTrue(listenerList.size()==1); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - WebListener testListener = embedded.createWebListener("test-listener", HttpListener.class); - testListener.setPort(newPort); - WebListener[] webListeners = new HttpListener[1]; - webListeners[0] = testListener; - - File f = new File("target/classes"); - String virtualServerId = "embedded-server"; - VirtualServer virtualServer = (VirtualServer) - embedded.createVirtualServer(virtualServerId, f, webListeners); - VirtualServerConfig config = new VirtualServerConfig(); - config.setHostNames("localhost"); - virtualServer.setConfig(config); - embedded.addVirtualServer(virtualServer); - - listenerList = new ArrayList(embedded.getWebListeners()); - System.out.println("Network listener size after creation " + listenerList.size()); - Assert.assertTrue(listenerList.size()==2); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - VirtualServer vs = embedded.getVirtualServer(virtualServerId); - Assert.assertEquals(virtualServerId,vs.getID()); - - File docRoot = new File("target/classes"); - Context context = (Context) embedded.createContext(docRoot); - vs.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:"+newPort+"/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - Assert.assertEquals("Hello World!", sb.toString()); - - vs.removeContext(context); - System.out.println("Removing web listener "+testListener.getId()); - embedded.removeWebListener(testListener); - - listenerList = new ArrayList(embedded.getWebListeners()); - System.out.println("Network listener size after deletion " + listenerList.size()); - Assert.assertTrue(listenerList.size()==1); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedGetContextsTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedGetContextsTest.java deleted file mode 100644 index 06eda6742dd..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedGetContextsTest.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests VirtualServer#getContexts after deploy - * - * @author Amy Roh - */ -public class EmbeddedGetContextsTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedGetContexts Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - } - - @Test - public void test() throws Exception { - - HttpListener httpListener = new HttpListener(); - httpListener.setPort(8080); - httpListener.setId("embedded-listener-1"); - embedded.addWebListener(httpListener); - - List listenerList = new ArrayList(embedded.getWebListeners()); - Assert.assertTrue(listenerList.size()==1); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - Deployer deployer = glassfish.getDeployer(); - - URL source = WebHello.class.getClassLoader().getResource( - "org/glassfish/tests/embedded/web/WebHello.class"); - String p = source.getPath().substring(0, source.getPath().length() - - "org/glassfish/tests/embedded/web/WebHello.class".length()); - File path = new File(p).getParentFile().getParentFile(); - - String name = null; - - if (path.getName().lastIndexOf('.') != -1) { - name = path.getName().substring(0, path.getName().lastIndexOf('.')); - } else { - name = path.getName(); - } - - System.out.println("Deploying " + path + ", name = " + name); - - String appName = deployer.deploy(path.toURI(), "--contextroot", contextRoot, "--name=" + name); - - System.out.println("Deployed " + appName); - - Assert.assertTrue(appName != null); - - VirtualServer vs = embedded.getVirtualServer("server"); - Assert.assertEquals("server", vs.getID()); - Assert.assertEquals("/"+contextRoot, vs.getContext(contextRoot).getPath()); - boolean containsContext = false; - for (Context ctx : vs.getContexts()) { - System.out.println("Context found "+ctx.getPath()); - if (ctx.getPath().endsWith(contextRoot)) { - containsContext = true; - } - } - Assert.assertTrue(containsContext); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - Assert.assertEquals("Hello World!", sb.toString()); - - if (appName!=null) - deployer.undeploy(appName); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedJSPTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedJSPTest.java deleted file mode 100644 index 6841ddcf444..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedJSPTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import java.net.URL; -import java.net.URLConnection; -import org.apache.catalina.logger.SystemOutLogger; -import org.glassfish.api.deployment.DeployCommandParameters; -import org.glassfish.embeddable.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - * @author Amy Roh - */ -public class EmbeddedJSPTest { - - static GlassFish glassfish; - static File path; - - @BeforeClass - public static void setupServer() throws GlassFishException { - GlassFishProperties gp = new GlassFishProperties(); - gp.setPort("http-listener", 8080); - glassfish = GlassFishRuntime.bootstrap().newGlassFish(gp); - glassfish.start(); - System.out.println("================ Embedded JSP Test"); - } - - @Test - public void testDefaultStart() throws Exception { - - Deployer deployer = glassfish.getDeployer(); - - path = new File("src/main/resources/embedded-webapi-tests.war"); - - String name = null; - - if (path.getName().lastIndexOf('.') != -1) { - name = path.getName().substring(0, path.getName().lastIndexOf('.')); - } else { - name = path.getName(); - } - - System.out.println("Deploying " + path + ", name = " + name); - - String appName = deployer.deploy(path.toURI(), "--name=" + name); - - System.out.println("Deployed " + appName); - - Assert.assertTrue(appName != null); - - /* - URL servlet = new URL("http://localhost:8080/hellojsp/index.jsp"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - */ - - if (appName!=null) - deployer.undeploy(appName); - - System.out.println("Undeployed "+appName); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRedeployTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRedeployTest.java deleted file mode 100644 index 6dcaf7a8669..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRedeployTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests redeploy scenario - * - * @author Amy Roh - */ -public class EmbeddedRedeployTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "/embedded-redeploy"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedRemoveContext Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setListings(true); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void test() throws Exception { - - Context context = embedded.createContext(root); - embedded.addContext(context, contextRoot); - - VirtualServer vs = embedded.getVirtualServer("server"); - String path = vs.getContext(contextRoot).getPath(); - Assert.assertEquals(path, contextRoot); - invoke(); - - embedded.removeContext(context); - Assert.assertNull(vs.getContext(contextRoot)); - - embedded.addContext(context, contextRoot); - Assert.assertEquals(path, contextRoot); - - invoke(); - - embedded.removeContext(context); - Assert.assertNull(vs.getContext(contextRoot)); - - } - - private void invoke() throws Exception { - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - System.out.println(sb); - in.close(); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRemoveContextTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRemoveContextTest.java deleted file mode 100644 index 61fe3dd4757..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRemoveContextTest.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer#removeContext - * - * @author Amy Roh - */ -public class EmbeddedRemoveContextTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedRemoveContext Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setListings(true); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void test() throws Exception { - - Context context = embedded.createContext(root); - embedded.addContext(context, contextRoot); - - VirtualServer vs = embedded.getVirtualServer("server"); - Assert.assertEquals("server", vs.getID()); - Assert.assertEquals("/"+contextRoot, vs.getContext(contextRoot).getPath()); - boolean containsContext = false; - for (Context ctx : vs.getContexts()) { - System.out.println("Context found "+ctx.getPath()); - if (ctx.getPath().endsWith(contextRoot)) { - containsContext = true; - } - } - Assert.assertTrue(containsContext); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - embedded.removeContext(context); - - Assert.assertNull(vs.getContext(contextRoot)); - - containsContext = false; - for (Context ctx : vs.getContexts()) { - System.out.println("Context found "+ctx.getPath()); - if (ctx.getPath().endsWith(contextRoot)) { - containsContext = true; - } - } - Assert.assertTrue(!containsContext); - - embedded.addContext(context, contextRoot); - - Assert.assertEquals("/"+contextRoot, vs.getContext(contextRoot).getPath()); - for (Context ctx : vs.getContexts()) { - System.out.println("Context found "+ctx.getPath()); - if (ctx.getPath().endsWith(contextRoot)) { - containsContext = true; - } - } - Assert.assertTrue(containsContext); - yc = servlet.openConnection(); - in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - - sb = new StringBuilder(); - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - embedded.removeContext(context); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRestartTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRestartTest.java deleted file mode 100644 index 7f0c2d5359c..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedRestartTest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import org.glassfish.embeddable.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests GlassFish restart - * - * @author Amy Roh - */ -public class EmbeddedRestartTest { - - static GlassFish glassfish; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - GlassFishProperties gp = new GlassFishProperties(); - gp.setPort("http-listener", 8080); - glassfish = GlassFishRuntime.bootstrap().newGlassFish(gp); - glassfish.start(); - System.out.println("================ Embedded Restart Test"); - } - - @Test - public void testEmbeddedWebAPI() throws Exception { - - // Restart is not working. Uncomment this to see the issue. - //glassfish.stop(); - //glassfish.start(); - - Deployer deployer = glassfish.getDeployer(); - - URL source = WebHello.class.getClassLoader().getResource( - "org/glassfish/tests/embedded/web/WebHello.class"); - String p = source.getPath().substring(0, source.getPath().length() - - "org/glassfish/tests/embedded/web/WebHello.class".length()); - File path = new File(p).getParentFile().getParentFile(); - - String name = null; - - if (path.getName().lastIndexOf('.') != -1) { - name = path.getName().substring(0, path.getName().lastIndexOf('.')); - } else { - name = path.getName(); - } - - System.out.println("Deploying " + path + ", contextroot = " + contextRoot); - - String appName = deployer.deploy(path.toURI(), "--contextroot", contextRoot); - - System.out.println("Deployed " + appName); - - Assert.assertTrue(appName != null); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - Assert.assertEquals("Hello World!", sb.toString()); - - System.out.println("Undeploying "+appName); - if (appName!=null) - deployer.undeploy(appName); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetConfigurationTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetConfigurationTest.java deleted file mode 100644 index 570d33dfc0a..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetConfigurationTest.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import javax.servlet.Servlet; -import javax.servlet.ServletRegistration; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer#setConfiguration(WebContainerConfig) - * - * @author Amy Roh - */ -public class EmbeddedSetConfigurationTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedSetConfiguration Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - config.setListings(true); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setPort(8080); - config.setHostNames("localhost"); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedWebAPIConfig() throws Exception { - Context context = embedded.createContext(root); - embedded.addContext(context, "/"); - - URL servlet = new URL("http://localhost:8080"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetDefaultWebXmlTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetDefaultWebXmlTest.java deleted file mode 100644 index 6e0a89bf005..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetDefaultWebXmlTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests EmbeddedFileSystem.configurationFile and WebBuilder.setDefaultWebXml - * Checks if directory listings is correctly getting picked up from the default-web.xml - * - * @author Amy Roh - */ -public class EmbeddedSetDefaultWebXmlTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws Exception { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedSetDefaultWebXml Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - root = new File("target/classes"); - File defaultWebXml = new File(root+"/org/glassfish/tests/webapi/my-default-web.xml"); - config.setDefaultWebXml(defaultWebXml.toURL()); - System.out.println("Using default-web.xml "+defaultWebXml.getAbsolutePath()); - config.setDocRootDir(root); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedWebAPIConfig() throws Exception { - - Context context = embedded.createContext(root); - embedded.addContext(context, contextRoot); - - // test if dir listing is getting picked up from default-web.xml - URL servlet = new URL("http://localhost:8080/"+contextRoot); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - embedded.removeContext(context); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetDocRootTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetDocRootTest.java deleted file mode 100644 index 002a02c0c6e..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetDocRootTest.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import javax.servlet.Servlet; -import javax.servlet.ServletRegistration; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebBuilding#setListings for directory listing feature - * - * @author Amy Roh - */ -public class EmbeddedSetDocRootTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedSetDocRoot Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - config.setListings(true); - root = new File("target/classes"); - config.setDocRootDir(root); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void testEmbeddedWebAPIConfig() throws Exception { - VirtualServer vs = (VirtualServer) - embedded.createVirtualServer("test-server", root); - VirtualServerConfig config = new VirtualServerConfig(); - config.setHostNames("localhost"); - vs.setConfig(config); - embedded.addVirtualServer(vs); - Context context = (Context) embedded.createContext(root, contextRoot, null); - - URL servlet = new URL("http://localhost:8080/"+contextRoot); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetSecurityTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetSecurityTest.java deleted file mode 100644 index 3726c21bf82..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedSetSecurityTest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests Context#setSecurity - * - * @author Amy Roh - */ -public class EmbeddedSetSecurityTest { - - static GlassFish glassfish; - static WebContainer embedded; - static File root; - static String contextRoot = "security"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedSetSecurity Test"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - WebContainerConfig config = new WebContainerConfig(); - root = new File("target/classes"); - //root = new File("/tests/security"); - config.setDocRootDir(root); - config.setListings(true); - config.setPort(8080); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - embedded.setConfiguration(config); - } - - @Test - public void test() throws Exception { - - try { - - Context context = embedded.createContext(root); - embedded.addContext(context, contextRoot); - - FormLoginConfig form = new FormLoginConfig("/login.html", "/error.html"); - - LoginConfig loginConfig = new LoginConfig(); - loginConfig.setAuthMethod(AuthMethod.FORM); - loginConfig.setRealmName("default"); - loginConfig.setFormLoginConfig(form); - - WebResourceCollection webResource = new WebResourceCollection(); - webResource.setName("ServletTest"); - Set urlPatterns = new HashSet(); - urlPatterns.add("/*"); - webResource.setUrlPatterns(urlPatterns); - Set httpMethods = new HashSet(); - httpMethods.add("GET"); - httpMethods.add("POST"); - webResource.setHttpMethods(httpMethods); - // This should throw Exception if uncommented - //webResource.setHttpMethodOmissions(httpMethods); - - SecurityConstraint securityConstraint = new SecurityConstraint(); - Set webResources = new HashSet(); - webResources.add(webResource); - securityConstraint.setWebResourceCollection(webResources); - securityConstraint.setAuthConstraint("administrator"); - //securityConstraint.setUserDataConstraint(TransportGuarantee.NONE); - - SecurityConfig securityConfig = new SecurityConfig(); - securityConfig.setLoginConfig(loginConfig); - Set securityConstraints = new HashSet(); - securityConstraints.add(securityConstraint); - securityConfig.setSecurityConstraints(securityConstraints); - - context.setSecurityConfig(securityConfig); - - /* - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/ServletTest"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); */ - - embedded.removeContext(context); - - } catch (Exception ex) { - //ignore for now - //ex.printStackTrace(); - } - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedVirtualServerHostNameTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedVirtualServerHostNameTest.java deleted file mode 100644 index cf3897741e4..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedVirtualServerHostNameTest.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Test for VirtualServerConfig#setHostNames - * - * @author Amy Roh - */ -public class EmbeddedVirtualServerHostNameTest { - - static GlassFish glassfish; - static WebContainer embedded; - static String contextRoot = "host"; - static int newPort = 9090; - - @BeforeClass - public static void setupServer() throws GlassFishException { - - GlassFishRuntime runtime = GlassFishRuntime.bootstrap(); - GlassFishProperties props = new GlassFishProperties(); - props.setPort("http-listener", 8080); - GlassFish glassfish = runtime.newGlassFish(props); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - - } - - @Test - public void test() throws Exception { - - String virtualServerId = "example"; - File root = new File("target/classes"); - VirtualServer virtualServer = embedded.createVirtualServer(virtualServerId, root); - - VirtualServerConfig config = new VirtualServerConfig(); - config.setHostNames("example.com"); - virtualServer.setConfig(config); - embedded.addVirtualServer(virtualServer); - - VirtualServer vs = embedded.getVirtualServer(virtualServerId); - Assert.assertEquals(virtualServerId,vs.getID()); - - Context context = (Context) embedded.createContext(root); - embedded.addContext(context, contextRoot); - - // curl -i -H 'Host: example.com' http://localhost:8080/ - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - Assert.assertEquals("Hello World!", sb.toString()); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebAPIDefaultStartTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebAPIDefaultStartTest.java deleted file mode 100644 index 42793effe28..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebAPIDefaultStartTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import java.net.URL; -import java.net.URLConnection; -import org.apache.catalina.logger.SystemOutLogger; -import org.glassfish.api.deployment.DeployCommandParameters; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer#start correctly starts the server with default 8080 port - * if no port is previously defined. - * - * @author Amy Roh - */ -public class EmbeddedWebAPIDefaultStartTest { - - static GlassFish glassfish; - static WebContainer embedded; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ Test Embedded Web API Default Start "); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - } - - @Test - public void testDefaultStart() throws Exception { - - HttpListener httpListener = new HttpListener(); - httpListener.setPort(8080); - httpListener.setId("embedded-listener-1"); - embedded.addWebListener(httpListener); - - List listenerList = new ArrayList(embedded.getWebListeners()); - Assert.assertTrue(listenerList.size()==1); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - Deployer deployer = glassfish.getDeployer(); - - URL source = WebHello.class.getClassLoader().getResource( - "org/glassfish/tests/embedded/web/WebHello.class"); - String p = source.getPath().substring(0, source.getPath().length() - - "org/glassfish/tests/embedded/web/WebHello.class".length()); - File path = new File(p).getParentFile().getParentFile(); - - String name = null; - - if (path.getName().lastIndexOf('.') != -1) { - name = path.getName().substring(0, path.getName().lastIndexOf('.')); - } else { - name = path.getName(); - } - - System.out.println("Deploying " + path + ", name = " + name); - - String appName = deployer.deploy(path.toURI(), "--name=" + name); - - System.out.println("Deployed " + appName); - - Assert.assertTrue(appName != null); - - URL servlet = new URL("http://localhost:8080/classes/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - Assert.assertEquals("Hello World!", sb.toString()); - - Thread.sleep(1000); - - if (appName!=null) - deployer.undeploy(appName); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebAPITest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebAPITest.java deleted file mode 100644 index 753180415ca..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebAPITest.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import org.apache.catalina.logger.SystemOutLogger; -import org.glassfish.api.deployment.DeployCommandParameters; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests creating a port using WebContainer#createWeblistener & WebListener#setPort. - * Checks if network listener is correctly added and deployment suceeds on the port specified. - * - * @author Amy Roh - */ -public class EmbeddedWebAPITest { - - static GlassFish glassfish; - static WebContainer embedded; - static String contextRoot = "test"; - - @BeforeClass - public static void setupServer() throws GlassFishException { - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ Test Embedded Web API"); - System.out.println("Starting Web "+embedded); - embedded.setLogLevel(Level.INFO); - } - - @Test - public void testEmbeddedWebAPI() throws Exception { - - HttpListener httpListener = new HttpListener(); - httpListener.setPort(8080); - httpListener.setId("embedded-listener-1"); - embedded.addWebListener(httpListener); - - List listenerList = new ArrayList(embedded.getWebListeners()); - Assert.assertTrue(listenerList.size()==1); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - WebListener testListener = embedded.createWebListener("test-listener", HttpListener.class); - testListener.setPort(9090); - embedded.addWebListener(testListener); - - listenerList = new ArrayList(embedded.getWebListeners()); - System.out.println("Network listener size after creation " + listenerList.size()); - Assert.assertTrue(listenerList.size()==2); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - File f = new File("target/classes"); - String virtualServerId = "embedded-server"; - VirtualServer vs = (VirtualServer) - embedded.createVirtualServer(virtualServerId, f); - VirtualServerConfig config = new VirtualServerConfig(); - config.setHostNames("localhost"); - vs.setConfig(config); - embedded.addVirtualServer(vs); - - vs = embedded.getVirtualServer(virtualServerId); - Assert.assertEquals(virtualServerId,vs.getID()); - - //Context context = (Context) embedded.createContext(root, null); - //defaultVirtualServer.addContext(context, ""); - - Deployer deployer = glassfish.getDeployer(); - - URL source = WebHello.class.getClassLoader().getResource( - "org/glassfish/tests/embedded/web/WebHello.class"); - String p = source.getPath().substring(0, source.getPath().length() - - "org/glassfish/tests/embedded/web/WebHello.class".length()); - File path = new File(p).getParentFile().getParentFile(); - - String name = null; - - if (path.getName().lastIndexOf('.') != -1) { - name = path.getName().substring(0, path.getName().lastIndexOf('.')); - } else { - name = path.getName(); - } - - System.out.println("Deploying " + path + ", name = " + name); - - String appName = deployer.deploy(path.toURI(), "--contextroot", contextRoot, "--name=" + name); - - System.out.println("Deployed " + appName); - - Assert.assertTrue(appName != null); - - URL servlet = new URL("http://localhost:8080/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - Assert.assertEquals("Hello World!", sb.toString()); - - embedded.removeWebListener(testListener); - - listenerList = new ArrayList(embedded.getWebListeners()); - System.out.println("Network listener size after creation " + listenerList.size()); - Assert.assertTrue(listenerList.size()==1); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - Thread.sleep(1000); - - if (appName!=null) - deployer.undeploy(appName); - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebTest.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebTest.java deleted file mode 100644 index 10276c78625..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/EmbeddedWebTest.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.util.logging.Level; -import java.util.ArrayList; -import java.util.List; -import org.glassfish.embeddable.*; -import org.glassfish.embeddable.web.*; -import org.glassfish.embeddable.web.config.*; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests WebContainer - * - * @author Amy Roh - */ -public class EmbeddedWebTest { - - static GlassFish glassfish; - static WebContainer embedded; - static int newPort = 9090; - static String contextRoot = "test"; - static File root; - static WebContainerConfig config; - - @BeforeClass - public static void setupServer() throws Exception { - - glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); - embedded = glassfish.getService(WebContainer.class); - System.out.println("================ EmbeddedWeb Test"); - System.out.println("Starting Web "+embedded); - root = new File("target/classes"); - configure(); - - } - - private static void configure() throws Exception { - - config = new WebContainerConfig(); - embedded.setLogLevel(Level.INFO); - config.setDocRootDir(root); - System.out.println("Added Web with base directory "+root.getAbsolutePath()); - config.setListenerName("embedded-listener"); - config.setPort(8080); - File defaultWebXml = new File(root+"/org/glassfish/tests/webapi/my-default-web.xml"); - config.setDefaultWebXml(defaultWebXml.toURL()); - System.out.println("Using default-web.xml "+defaultWebXml.getAbsolutePath()); - config.setVirtualServerId("server"); - embedded.setConfiguration(config); - - } - - @Test - public void test() throws Exception { - - WebListener testListener = embedded.createWebListener("test-listener", HttpListener.class); - testListener.setPort(newPort); - WebListener[] webListeners = new HttpListener[1]; - webListeners[0] = testListener; - - String virtualServerId = "embedded-server"; - VirtualServer virtualServer = (VirtualServer) - embedded.createVirtualServer(virtualServerId, root, webListeners); - embedded.addVirtualServer(virtualServer); - - config.setVirtualServerId(virtualServerId); - config.setHostNames("localhost"); - embedded.setConfiguration(config); - - ArrayList listenerList = new ArrayList(embedded.getWebListeners()); - System.out.println("Network listener size after creation " + listenerList.size()); - Assert.assertTrue(listenerList.size()==2); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - VirtualServer vs = embedded.getVirtualServer(virtualServerId); - Assert.assertEquals(virtualServerId,vs.getID()); - - Context context = (Context) embedded.createContext(root); - //embedded.addContext(context, contextRoot); - virtualServer.addContext(context, contextRoot); - - URL servlet = new URL("http://localhost:"+newPort+"/"+contextRoot+"/hello"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); - StringBuilder sb = new StringBuilder(); - String inputLine; - while ((inputLine = in.readLine()) != null){ - sb.append(inputLine); - } - in.close(); - System.out.println(inputLine); - Assert.assertEquals("Hello World!", sb.toString()); - - System.out.println("Removing web listener "+testListener.getId()); - embedded.removeWebListener(testListener); - - listenerList = new ArrayList(embedded.getWebListeners()); - System.out.println("Network listener size after deletion " + listenerList.size()); - Assert.assertTrue(listenerList.size()==1); - for (WebListener listener : embedded.getWebListeners()) - System.out.println("Web listener "+listener.getId()+" "+listener.getPort()); - - virtualServer.removeContext(context); - - } - - @AfterClass - public static void shutdownServer() throws GlassFishException { - System.out.println("Stopping server " + glassfish); - if (glassfish != null) { - glassfish.stop(); - glassfish.dispose(); - glassfish = null; - } - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/MyServlet.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/MyServlet.java deleted file mode 100644 index 80eac4192aa..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/MyServlet.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.*; - -public class MyServlet extends HttpServlet { - - public MyServlet() { - System.out.println("Servlet MyServlet initialized"); - } - - public void service(ServletRequest req, ServletResponse res) - throws IOException, ServletException { - if (!"def".equals(req.getAttribute("abc"))) { - throw new ServletException("Missing ServletRequest parameter"); - } else { - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World!"); - } catch(Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/MyServletContextListener.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/MyServletContextListener.java deleted file mode 100755 index 8703ee47f43..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/MyServletContextListener.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.*; -import java.util.*; -import javax.servlet.*; - -public class MyServletContextListener implements ServletContextListener { - - /** - * Receives notification that the web application initialization - * process is starting. - * - * @param sce The servlet context event - */ - public void contextInitialized(ServletContextEvent sce) { - sce.getServletContext().addListener("org.glassfish.tests.embedded.web.NewServletRequestListener"); - } - - /** - * Receives notification that the servlet context is about to be shut down. - * - * @param sce The servlet context event - */ - public void contextDestroyed(ServletContextEvent sce) { - // Do nothing - } - -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewFilter.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewFilter.java deleted file mode 100644 index 24bfc868cb0..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewFilter.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.*; -import javax.servlet.*; - -public class NewFilter implements Filter { - - String filterInitParam; - - public void init(FilterConfig filterConfig) throws ServletException { - filterInitParam = filterConfig.getInitParameter("filterInitName"); - } - - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) - throws IOException, ServletException { - request.setAttribute("filterInitName", filterInitParam); - chain.doFilter(request, response); - } - - public void destroy() { - // do nothing - } -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewFilterServlet.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewFilterServlet.java deleted file mode 100644 index 9992393a294..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewFilterServlet.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; - -public class NewFilterServlet extends HttpServlet { - - public void service(ServletRequest req, ServletResponse res) - throws IOException, ServletException { - if (!"servletInitValue".equals(getServletConfig().getInitParameter( - "servletInitName"))) { - throw new ServletException("Missing servlet init param"); - } - - if (!"filterInitValue".equals(req.getAttribute("filterInitName"))) { - throw new ServletException("Missing filter init param"); - } - - } -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewServlet.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewServlet.java deleted file mode 100644 index 952ea0ad70c..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewServlet.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.*; -import javax.servlet.*; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.*; - -//@WebServlet(urlPatterns={"/new"}) -public class NewServlet extends HttpServlet { - - private String initParamValue; - private String myParamValue; - - - public NewServlet() { - System.out.println("Servlet NewServlet initialized"); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World!"); - } catch(Exception e) { - e.printStackTrace(); - } - } - - /*public void setMyParameter(String value) { - myParamValue = value; - } - - public void init(ServletConfig config) throws ServletException { - super.init(config); - initParamValue = config.getInitParameter("servletInitParamName"); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World!"); - } catch(Exception e) { - e.printStackTrace(); - } - } - - public void service(ServletRequest req, ServletResponse res) - throws IOException, ServletException { - if (!"myServletParamValue".equals(myParamValue)) { - throw new ServletException("Wrong servlet instance"); - } - - if (!"servletInitParamValue".equals(initParamValue)) { - throw new ServletException("Missing servlet init param"); - } - - if (!"myFilterParamValue".equals( - req.getAttribute("myFilterParamName"))) { - throw new ServletException("Wrong filter instance"); - } - - if (!"filterInitParamValue".equals( - req.getAttribute("filterInitParamName"))) { - throw new ServletException("Missing filter init param"); - } - }*/ -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewServletRequestListener.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewServletRequestListener.java deleted file mode 100644 index d029f02c0b2..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/NewServletRequestListener.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.*; -import javax.servlet.*; - -public class NewServletRequestListener implements ServletRequestListener { - - public void requestInitialized(ServletRequestEvent sre) { - sre.getServletRequest().setAttribute("abc", "def"); - } - - public void requestDestroyed(ServletRequestEvent sre) { - // Do nothing - } -} diff --git a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/WebHello.java b/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/WebHello.java deleted file mode 100644 index e162bf9ab46..00000000000 --- a/appserver/tests/embedded/web/web-api/src/test/java/org/glassfish/tests/embedded/web/WebHello.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.web; - -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.annotation.WebServlet; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.annotation.Resource; - -@WebServlet(urlPatterns={"/hello"}) -public class WebHello extends HttpServlet { - - public WebHello() { - System.out.println("Servlet WEB-HELLO initialized"); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - PrintWriter pw = res.getWriter(); - try { - pw.println("Hello World!"); - } catch(Exception e) { - e.printStackTrace(); - } - } -} diff --git a/appserver/tests/embedded/web/web-war/pom.xml b/appserver/tests/embedded/web/web-war/pom.xml deleted file mode 100644 index 341c6aa092e..00000000000 --- a/appserver/tests/embedded/web/web-war/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests - embedded - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests - embedded-web-war - pom - GlassFish Embedded Web war test - - - web-fragment1 - web-fragment2 - web-fragment3 - war - test - - diff --git a/appserver/tests/embedded/web/web-war/test/pom.xml b/appserver/tests/embedded/web/web-war/test/pom.xml deleted file mode 100644 index d7378e007bd..00000000000 --- a/appserver/tests/embedded/web/web-war/test/pom.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests - embedded-web-war - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.embedded-web-war - test - GlassFish Embedded Web war test: test - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - buildDir - ${project.build.outputDirectory} - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - process-resources - - unpack - - - - - org.glassfish.distributions - web - ${project.version} - zip - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - - - - - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - org.glassfish.extras - glassfish-embedded-web - ${project.version} - test - - - org.glassfish.extras - glassfish-embedded-shell - ${project.version} - provided - - - org.glassfish.core - kernel - ${project.version} - provided - - - org.glassfish.security - jacc.provider.inmemory - ${project.version} - test - - - org.glassfish.admin - config-api - ${project.version} - provided - - - junit - junit - test - - - org.glassfish.web - webtier-all - pom - ${project.version} - test - - - org.glassfish.transaction - jta - 4.1-SNAPSHOT - test - - - org.glassfish.web - web-embed-impl - ${project.version} - test - - - - org.glassfish - jakarta.faces - 2.1.6 - test - - - - diff --git a/appserver/tests/embedded/web/web-war/test/src/test/java/org/glassfish/tests/embedded/webwar/EmbeddedTest.java b/appserver/tests/embedded/web/web-war/test/src/test/java/org/glassfish/tests/embedded/webwar/EmbeddedTest.java deleted file mode 100644 index 7cbde1d740e..00000000000 --- a/appserver/tests/embedded/web/web-war/test/src/test/java/org/glassfish/tests/embedded/webwar/EmbeddedTest.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.webwar; - -import java.util.*; -import org.junit.Test; -import org.junit.Assert; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.glassfish.grizzly.config.dom.NetworkConfig; -import org.glassfish.grizzly.config.dom.NetworkListener; -import org.glassfish.internal.embedded.Server; -import org.glassfish.internal.embedded.LifecycleException; -import org.glassfish.internal.embedded.EmbeddedContainer; -import org.glassfish.api.deployment.DeployCommandParameters; -import org.glassfish.internal.embedded.EmbeddedDeployer; -import org.glassfish.internal.embedded.Port; -import org.glassfish.internal.embedded.ScatteredArchive; -import org.glassfish.internal.embedded.ScatteredArchive.Builder; -import org.glassfish.internal.embedded.ContainerBuilder; -import org.glassfish.internal.embedded.admin.AdminInfo; -import org.glassfish.internal.embedded.admin.EmbeddedAdminContainer; -import org.glassfish.internal.embedded.admin.CommandExecution; -import org.glassfish.internal.embedded.admin.CommandParameters; -import org.glassfish.api.embedded.web.EmbeddedWebContainer; -import org.glassfish.api.ActionReport.MessagePart; -import org.glassfish.api.container.Sniffer; - -import javax.naming.InitialContext; -import javax.naming.NamingException; -import java.io.File; -import java.net.URL; -import java.net.URLConnection; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.IOException; -import org.glassfish.api.admin.ServerEnvironment; - -public class EmbeddedTest { - - private static Port http=null; - private static Server server = null; - - @BeforeClass - public static void setup() { - Server.Builder builder = new Server.Builder("build"); - - server = builder.build(); - NetworkConfig nc = server.getHabitat().getService(NetworkConfig.class, - ServerEnvironment.DEFAULT_INSTANCE_NAME); - List listeners = nc.getNetworkListeners().getNetworkListener(); - System.out.println("Network listener size before creation " + listeners.size()); - for (NetworkListener nl : listeners) { - System.out.println("Network listener " + nl.getPort()); - } - try { - http = server.createPort(8080); - ContainerBuilder b = server.createConfig(ContainerBuilder.Type.web); - server.addContainer(b); - EmbeddedWebContainer embedded = (EmbeddedWebContainer) b.create(server); - embedded.bind(http, "http"); - } catch(IOException e) { - throw new RuntimeException(e); - } - listeners = nc.getNetworkListeners().getNetworkListener(); - System.out.println("Network listener size after creation " + listeners.size()); - Assert.assertTrue(listeners.size() == 1); - for (NetworkListener nl : listeners) { - System.out.println("Network listener " + nl.getPort()); - } - Collection cnl = server.getHabitat().getAllServices(NetworkListener.class); - System.out.println("Network listener size after creation " + cnl.size()); - for (NetworkListener nl : cnl) { - System.out.println("Network listener " + nl.getPort()); - } - - server.addContainer(ContainerBuilder.Type.all); - } - - @Test - public void testWeb() throws Exception { - System.out.println("Starting Web " + server); - ContainerBuilder b = server.createConfig(ContainerBuilder.Type.web); - System.out.println("builder is " + b); - server.addContainer(b); - EmbeddedDeployer deployer = server.getDeployer(); - System.out.println("Added Web"); - - String testClass = "org/glassfish/tests/embedded/webwar/EmbeddedTest.class"; - URL source = this.getClass().getClassLoader().getResource(testClass); - String p = source.getPath().substring(0, source.getPath().length()-testClass.length()) + - "../../../war/target/test-war.war"; - - System.out.println("Root is " + p); - DeployCommandParameters dp = new DeployCommandParameters(new File(p)); - - System.out.println("Deploying " + p); - String appName = null; - try { - appName = deployer.deploy(new File(p), dp); - System.out.println("Deployed " + appName); - Assert.assertTrue(appName != null); - try { - URL servlet = new URL("http://localhost:8080/test-war/"); - URLConnection yc = servlet.openConnection(); - BufferedReader in = new BufferedReader( - new InputStreamReader( - yc.getInputStream())); - String inputLine = in.readLine(); - if (inputLine != null) - System.out.println(inputLine); - Assert.assertEquals(inputLine.trim(), "filterMessage=213"); - in.close(); - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - } catch(Exception e) { - e.printStackTrace(); - throw e; - } - if (appName!=null) - deployer.undeploy(appName, null); - - } - - public static void close() throws LifecycleException { - if (http!=null) { - http.close(); - http=null; - } - System.out.println("Stopping server " + server); - if (server!=null) { - server.stop(); - server=null; - } - } -} diff --git a/appserver/tests/embedded/web/web-war/war/pom.xml b/appserver/tests/embedded/web/web-war/war/pom.xml deleted file mode 100644 index b7918b07197..00000000000 --- a/appserver/tests/embedded/web/web-war/war/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests - embedded-web-war - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.embedded-web-war - test-war - war - GlassFish Embedded Web war test: war - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - - org.glassfish.tests.embedded-web-war - web-fragment1 - ${project.version} - - - org.glassfish.tests.embedded-web-war - web-fragment2 - ${project.version} - - - org.glassfish.tests.embedded-web-war - web-fragment3 - ${project.version} - - - diff --git a/appserver/tests/embedded/web/web-war/war/src/main/java/org/glassfish/tests/embedded/webwar/TestServlet.java b/appserver/tests/embedded/web/web-war/war/src/main/java/org/glassfish/tests/embedded/webwar/TestServlet.java deleted file mode 100644 index 0df11aa9328..00000000000 --- a/appserver/tests/embedded/web/web-war/war/src/main/java/org/glassfish/tests/embedded/webwar/TestServlet.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.webwar; - -import java.io.*; -import java.util.Enumeration; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.servlet.annotation.WebServlet; - -@WebServlet("/") -public class TestServlet extends HttpServlet { - protected void doGet(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - String message = "filterMessage=" + req.getAttribute("filterMessage"); - res.getWriter().println(message); - } -} diff --git a/appserver/tests/embedded/web/web-war/war/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/web/web-war/war/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 3d3de799540..00000000000 --- a/appserver/tests/embedded/web/web-war/war/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - A - - B - - diff --git a/appserver/tests/embedded/web/web-war/web-fragment1/pom.xml b/appserver/tests/embedded/web/web-war/web-fragment1/pom.xml deleted file mode 100644 index f7cce35b861..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment1/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests - embedded-web-war - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.embedded-web-war - web-fragment1 - GlassFish Embedded Web war test: web-fragment1 - - - - jakarta.servlet - jakarta.servlet-api - provided - - - diff --git a/appserver/tests/embedded/web/web-war/web-fragment1/src/main/java/org/glassfish/tests/embedded/webwar/webfragment1/WFTestFilter.java b/appserver/tests/embedded/web/web-war/web-fragment1/src/main/java/org/glassfish/tests/embedded/webwar/webfragment1/WFTestFilter.java deleted file mode 100644 index 47eaec4e379..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment1/src/main/java/org/glassfish/tests/embedded/webwar/webfragment1/WFTestFilter.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.webwar.webfragment1; - -import java.io.IOException; - -import javax.servlet.DispatcherType; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.annotation.WebFilter; - -@WebFilter(urlPatterns={ "/" }, dispatcherTypes= { DispatcherType.REQUEST }) -public class WFTestFilter implements Filter { - public void init(FilterConfig filterConfig) throws ServletException { - System.out.println(">>> WFTestFilter.init"); - } - - public void doFilter(ServletRequest req, ServletResponse res, - FilterChain chain) throws IOException, ServletException { - - System.out.println(">>> WFTestFilter.doFilter"); - String filterMessage = (String)req.getAttribute("filterMessage"); - if (filterMessage == null) { - filterMessage = ""; - } - filterMessage += "1"; - - req.setAttribute("filterMessage", filterMessage); - chain.doFilter(req, res); - } - - public void destroy() { - System.out.println(">>> WFTestFilter.destroy"); - } -} diff --git a/appserver/tests/embedded/web/web-war/web-fragment2/pom.xml b/appserver/tests/embedded/web/web-war/web-fragment2/pom.xml deleted file mode 100644 index 6885735a3f3..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment2/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests - embedded-web-war - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.embedded-web-war - web-fragment2 - GlassFish Embedded Web war test: web-fragment2 - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - diff --git a/appserver/tests/embedded/web/web-war/web-fragment2/src/main/java/org/glassfish/tests/embedded/webwar/webfragment2/WFTestFilter2.java b/appserver/tests/embedded/web/web-war/web-fragment2/src/main/java/org/glassfish/tests/embedded/webwar/webfragment2/WFTestFilter2.java deleted file mode 100644 index fd62827d9c4..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment2/src/main/java/org/glassfish/tests/embedded/webwar/webfragment2/WFTestFilter2.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.webwar.webfragment2; - -import java.io.IOException; - -import javax.servlet.DispatcherType; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.annotation.WebFilter; - -@WebFilter(urlPatterns={ "/abc" }, dispatcherTypes= { DispatcherType.REQUEST }) -public class WFTestFilter2 implements Filter { - public void init(FilterConfig filterConfig) throws ServletException { - System.out.println(">>> WFTestFilter2.init"); - } - - public void doFilter(ServletRequest req, ServletResponse res, - FilterChain chain) throws IOException, ServletException { - - System.out.println(">>> WFTestFilter2.doFilter"); - String filterMessage = (String)req.getAttribute("filterMessage"); - if (filterMessage == null) { - filterMessage = ""; - } - filterMessage += "2"; - - req.setAttribute("filterMessage", filterMessage); - chain.doFilter(req, res); - } - - public void destroy() { - System.out.println(">>> WFTestFilter2.destroy"); - } -} diff --git a/appserver/tests/embedded/web/web-war/web-fragment2/src/main/java/org/glassfish/tests/embedded/webwar/webfragment2/WFTestFilter2B.java b/appserver/tests/embedded/web/web-war/web-fragment2/src/main/java/org/glassfish/tests/embedded/webwar/webfragment2/WFTestFilter2B.java deleted file mode 100644 index 6b3c8c88707..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment2/src/main/java/org/glassfish/tests/embedded/webwar/webfragment2/WFTestFilter2B.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.webwar.webfragment2; - -import java.io.IOException; - -import javax.servlet.DispatcherType; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.annotation.WebFilter; - -@WebFilter(urlPatterns={ "/" }, dispatcherTypes= { DispatcherType.REQUEST }) -public class WFTestFilter2B implements Filter { - public void init(FilterConfig filterConfig) throws ServletException { - System.out.println(">>> WFTestFilter2B.init"); - } - - public void doFilter(ServletRequest req, ServletResponse res, - FilterChain chain) throws IOException, ServletException { - - System.out.println(">>> WFTestFilter2B.doFilter"); - String filterMessage = (String)req.getAttribute("filterMessage"); - if (filterMessage == null) { - filterMessage = ""; - } - filterMessage += "B"; - - req.setAttribute("filterMessage", filterMessage); - chain.doFilter(req, res); - } - - public void destroy() { - System.out.println(">>> WFTestFilter2B.destroy"); - } -} diff --git a/appserver/tests/embedded/web/web-war/web-fragment2/src/main/resources/META-INF/web-fragment.xml b/appserver/tests/embedded/web/web-war/web-fragment2/src/main/resources/META-INF/web-fragment.xml deleted file mode 100644 index 8a60fd77c4d..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment2/src/main/resources/META-INF/web-fragment.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - A - - - wftest2.WFTestFilter2 - org.glassfish.tests.embedded.webwar.webfragment2.WFTestFilter2 - - - wftest2.WFTestFilter2 - / - - diff --git a/appserver/tests/embedded/web/web-war/web-fragment3/pom.xml b/appserver/tests/embedded/web/web-war/web-fragment3/pom.xml deleted file mode 100644 index b6085141ac8..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment3/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests - embedded-web-war - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.embedded-web-war - web-fragment3 - GlassFish Embedded Web war test: web-fragment3 - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - diff --git a/appserver/tests/embedded/web/web-war/web-fragment3/src/main/java/org/glassfish/tests/embedded/webwar/webfragment3/WFTestFilter3.java b/appserver/tests/embedded/web/web-war/web-fragment3/src/main/java/org/glassfish/tests/embedded/webwar/webfragment3/WFTestFilter3.java deleted file mode 100644 index 3b81c70a668..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment3/src/main/java/org/glassfish/tests/embedded/webwar/webfragment3/WFTestFilter3.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded.webwar.webfragment3; - -import java.io.IOException; - -import javax.servlet.DispatcherType; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.annotation.WebFilter; - -@WebFilter(urlPatterns={ "/" }, dispatcherTypes= { DispatcherType.REQUEST }) -public class WFTestFilter3 implements Filter { - public void init(FilterConfig filterConfig) throws ServletException { - System.out.println(">>> WFTestFilter3.init"); - } - - public void doFilter(ServletRequest req, ServletResponse res, - FilterChain chain) throws IOException, ServletException { - - System.out.println(">>> WFTestFilter3.doFilter"); - String filterMessage = (String)req.getAttribute("filterMessage"); - if (filterMessage == null) { - filterMessage = ""; - } - filterMessage += "3"; - - req.setAttribute("filterMessage", filterMessage); - chain.doFilter(req, res); - } - - public void destroy() { - System.out.println(">>> WFTestFilter3.destroy"); - } -} diff --git a/appserver/tests/embedded/web/web-war/web-fragment3/src/main/resources/META-INF/web-fragment.xml b/appserver/tests/embedded/web/web-war/web-fragment3/src/main/resources/META-INF/web-fragment.xml deleted file mode 100644 index 372ac866908..00000000000 --- a/appserver/tests/embedded/web/web-war/web-fragment3/src/main/resources/META-INF/web-fragment.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - B - diff --git a/appserver/tests/embedded/wrapper/pom.xml b/appserver/tests/embedded/wrapper/pom.xml deleted file mode 100644 index eacdc4661ff..00000000000 --- a/appserver/tests/embedded/wrapper/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - 4.0.0 - org.glassfish.test - test-wrapper - 4.1-SNAPSHOT - Embedded GlassFish Wrapper - - - - org.glassfish.common - glassfish-api - ${project.version} - - - diff --git a/appserver/tests/embedded/wrapper/src/main/java/org/glassfish/tests/embedded/EmbeddedMain.java b/appserver/tests/embedded/wrapper/src/main/java/org/glassfish/tests/embedded/EmbeddedMain.java deleted file mode 100644 index 98a5714ef37..00000000000 --- a/appserver/tests/embedded/wrapper/src/main/java/org/glassfish/tests/embedded/EmbeddedMain.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.embedded; - -import org.glassfish.internal.embedded.*; - -import java.io.File; - - -/** A 'wrapper' class that is used by QA to run tests on embedded. This class is used to start the domain - * in embedded mode from asadmin cli - * - */ - -public class EmbeddedMain { - public static void main(String[] args) { - - String installRoot = System.getenv("S1AS_HOME"); - if (installRoot == null) { - System.out.println("Environment variable S1AS_HOME not defined - it must point to the glassfish install root"); - return; - } - String instanceRoot = installRoot + "/domains/domain1"; - String domainXml = instanceRoot + "/config/domain.xml"; - - System.setProperty("com.sun.aas.instanceRootURI", "file:" + instanceRoot); - //System.setProperty("com.sun.aas.installRoot", installRoot ); -// System.setProperty("com.sun.aas.instanceRoot", instanceRoot ); - - EmbeddedFileSystem efs = - new EmbeddedFileSystem.Builder(). - installRoot(new File(installRoot), true). - instanceRoot(new File(instanceRoot)). - configurationFile(new File(domainXml), false).autoDelete(false).build(); - - Server.Builder builder = new Server.Builder("asadmin"); - - Server server = builder.embeddedFileSystem(efs).build(); - server.addContainer(ContainerBuilder.Type.all); - } -} - - diff --git a/appserver/tests/hk2/README.txt b/appserver/tests/hk2/README.txt deleted file mode 100644 index f319f7bd58f..00000000000 --- a/appserver/tests/hk2/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - -This is a set of integrations tests for hk2 and GlassFish. - -They currently require two parameters to be specified: -glassfish.home= The directory where glassfish is installed -source.home= The directory where the glassfish source is located - -To run the tests something like this line should be run: - -mvn -Dglassfish.home=/scratch/jwells/bg/installs/gf/glassfish4/glassfish \ - -Dsource.home=/scratch/jwells/bg/all/main \ - clean install 2>&1 | tee t.out - -UNDER CONSTRUCTION: We would like to get rid of the need for source.home - diff --git a/appserver/tests/hk2/cdi/basic/ejb1/pom.xml b/appserver/tests/hk2/cdi/basic/ejb1/pom.xml deleted file mode 100644 index 2b5d02c8da3..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/pom.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - basic - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.basic - ejb1 - - HK2 CDI Basic Test EJB1 - - - - - org.glassfish.hk2 - hk2-inhabitant-generator - - - - application - - - generate-inhabitants - - - - - - - - - - javax.annotation - javax.annotation-api - 1.2-b02 - provided - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - org.glassfish.hk2 - hk2 - provided - - - jakarta.ejb - jakarta.ejb-api - - - diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/BasicEjb.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/BasicEjb.java deleted file mode 100644 index 3ddbf618bcb..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/BasicEjb.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1; - -import org.jvnet.hk2.annotations.Contract; - -/** - * This is a simple EJB interface that has methods used by the client - * to ensure that each test has passed - * - * @author jwells - * - */ -@Contract -public interface BasicEjb { - /** - * Returns true if the CDI manager was properly injected - * into the EJB that implements this interface - * - * @return true if the CDI bean manager was injected into this EJB - */ - public boolean cdiManagerInjected(); - - /** - * Returns true if an HK2 serviceLocator was properly injected - * into the EJB that implements this interface - *

    - * This demonstrates that HK2 services are being injected into - * CDI created beans - * - * @return true if the EJB was injected with an HK2 service locator - */ - public boolean serviceLocatorInjected(); - - /** - * This uses the HK2 ServiceLocator to install the - * BasicService descriptor into the injected HK2 - * ServiceLocator - */ - public void installHK2Service(); - - /** - * This method ensures that the HK2 service installed with - * {@link #installHK2Service()} can be injected with - * CDI bean instances - *

    - * This demonstrates that services created with HK2 can be - * injected with beans created with CDI - * - * @return true if the BasicService HK2 service was injected - * with a CDI bean instance - */ - public boolean hk2ServiceInjectedWithEjb(); - - /** - * Returns without throwing an error if all of the CDI extension - * events had proper access to the ServiceLocator in JNDI - * - * @throws AssertionError if any of the extension points did not have - * access to the ServiceLocator - */ - public void isServiceLocatorAvailableInAllCDIExtensionEvents(); - - /** - * This method ensures that the CustomScopedEJB gets properly injected - * with the HK2 service - */ - public void isEJBWithCustomHK2ScopeProperlyInjected(); - - /** - * Tests that an implementation of PopulatorPostProcessor put into - * META-INF/services runs properly - */ - public void doesApplicationDefinedPopulatorPostProcessorRun(); - - /** - * Tests that a service added via an HK2 {@link JustInTimeResolver} - * is properly added to the CDI bridge - */ - public void isServiceAddedWithJITResolverAdded(); - - /** - * Checks that an ApplicationScoped CDI service can be injected into - * an HK2 service - */ - public void checkApplicationScopedServiceInjectedIntoHk2Service(); - - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/EjbInjectedWithServiceLocator.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/EjbInjectedWithServiceLocator.java deleted file mode 100644 index 5748a112361..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/EjbInjectedWithServiceLocator.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1; - -import java.util.List; -import java.util.Map; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.enterprise.inject.spi.BeanManager; -import javax.inject.Inject; - -import org.glassfish.hk2.api.ActiveDescriptor; -import org.glassfish.hk2.api.DynamicConfiguration; -import org.glassfish.hk2.api.DynamicConfigurationService; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.hk2.utilities.BuilderHelper; - -import com.oracle.hk2.devtest.cdi.ejb1.ppp.ApplicationPopulatorPostProcessor; -import com.oracle.hk2.devtest.cdi.ejb1.scoped.CountingApplicationScopedCDIService; -import com.oracle.hk2.devtest.cdi.ejb1.scoped.CustomScopedEjb; -import com.oracle.hk2.devtest.cdi.ejb1.scoped.HK2PerLookupInjectedWithCDIApplicationScoped; -import com.oracle.hk2.devtest.cdi.ejb1.scoped.HK2Service; -import com.oracle.hk2.devtest.cdi.extension.HK2ExtensionVerifier; -import com.oracle.hk2.devtest.cdi.jit.CDIServiceInjectedWithHK2Service; -import com.oracle.hk2.devtest.cdi.locator.BasicService; - -/** - * Simple EJB created by CDI that injects a HK2 ServiceLocator! - * - * @author jwells - */ -@Stateless -@Remote(BasicEjb.class) -public class EjbInjectedWithServiceLocator implements BasicEjb { - @Inject - private BeanManager beanManager; - - @Inject - private ServiceLocator locator; - - @Inject - private CustomScopedEjb customScopedEjb; - - @Inject - private CDIServiceInjectedWithHK2Service cdiInjectedWithHK2Service; - - @Override - public boolean cdiManagerInjected() { - return (beanManager != null); - } - - @Override - public boolean serviceLocatorInjected() { - return (locator != null); - } - - @Override - public void installHK2Service() { - DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class); - DynamicConfiguration config = dcs.createDynamicConfiguration(); - - config.addActiveDescriptor(BasicService.class); - - config.commit(); - } - - @Override - public boolean hk2ServiceInjectedWithEjb() { - BasicService bs = locator.getService(BasicService.class); - if (bs == null) { - throw new RuntimeException("Could not find BasicService in locator " + locator); - } - - boolean retVal = bs.gotInjectedWithBeanManager(); - return retVal; - } - - @Override - public void isServiceLocatorAvailableInAllCDIExtensionEvents() { - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - - verifier.validate(); - } - - @Override - public void isEJBWithCustomHK2ScopeProperlyInjected() { - customScopedEjb.checkMe(); - - } - - @Override - public void doesApplicationDefinedPopulatorPostProcessorRun() { - ActiveDescriptor descriptor = locator.getBestDescriptor(BuilderHelper.createContractFilter(HK2Service.class.getName())); - Map> metadata = descriptor.getMetadata(); // An NPE means we don't have the descriptor - - List values = metadata.get(ApplicationPopulatorPostProcessor.KEY); - if (!values.get(0).equals(ApplicationPopulatorPostProcessor.VALUE)) { - throw new AssertionError("Incorrect value 0: " + values.get(0)); - } - } - - @Override - public void isServiceAddedWithJITResolverAdded() { - if (!cdiInjectedWithHK2Service.hasHK2Service()) { - throw new AssertionError("cdiInjectedWithHK2Service is not valid: " + cdiInjectedWithHK2Service.hasHK2Service()); - } - } - - @Override - public void checkApplicationScopedServiceInjectedIntoHk2Service() { - HK2PerLookupInjectedWithCDIApplicationScoped hk2Service1 = locator.getService( - HK2PerLookupInjectedWithCDIApplicationScoped.class); - HK2PerLookupInjectedWithCDIApplicationScoped hk2Service2 = locator.getService( - HK2PerLookupInjectedWithCDIApplicationScoped.class); - HK2PerLookupInjectedWithCDIApplicationScoped hk2Service3 = locator.getService( - HK2PerLookupInjectedWithCDIApplicationScoped.class); - - CountingApplicationScopedCDIService cdiService1 = hk2Service1.getCountingCDIService(); - CountingApplicationScopedCDIService cdiService2 = hk2Service2.getCountingCDIService(); - CountingApplicationScopedCDIService cdiService3 = hk2Service3.getCountingCDIService(); - - if (1 != cdiService1.getNumberOfTimesMethodCalled()) { - throw new AssertionError("Did not get 1 for first call"); - } - - if (2 != cdiService2.getNumberOfTimesMethodCalled()) { - throw new AssertionError("Did not get 2 for second call (not the same instance) " + cdiService1 + "/" + cdiService2 + "/" + cdiService3); - } - - if (3 != cdiService3.getNumberOfTimesMethodCalled()) { - throw new AssertionError("Did not get 3 for second call (not the same instance) " + cdiService1 + "/" + cdiService2 + "/" + cdiService3); - } - - int constructorCount1 = cdiService1.getConstructedCount(); - if (constructorCount1 > 2) { // One for the proxy, one for the true object - throw new AssertionError("counstructorCount1=" + constructorCount1 + " it should less than 2"); - } - - int constructorCount2 = cdiService2.getConstructedCount(); - if (constructorCount1 > 2) { // One for the proxy, one for the true object - throw new AssertionError("counstructorCount2=" + constructorCount2 + " it should be less than 2"); - } - - int constructorCount3 = cdiService3.getConstructedCount(); - if (constructorCount1 > 2) { // One for the proxy, one for the true object - throw new AssertionError("counstructorCount3=" + constructorCount3 + " it should be less than 2"); - } - } -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/ppp/ApplicationPopulatorPostProcessor.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/ppp/ApplicationPopulatorPostProcessor.java deleted file mode 100644 index c510ce9e14d..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/ppp/ApplicationPopulatorPostProcessor.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.ppp; - -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.hk2.bootstrap.PopulatorPostProcessor; -import org.glassfish.hk2.utilities.DescriptorImpl; - -import com.oracle.hk2.devtest.cdi.ejb1.scoped.HK2Service; - -/** - * This post-processor will be placed into the META-INF/services - * of the application. The test will ensure that it has - * been properly run - * - * @author jwells - * - */ -public class ApplicationPopulatorPostProcessor implements - PopulatorPostProcessor { - public static final String KEY = "key"; - public static final String VALUE = "value"; - - /* (non-Javadoc) - * @see org.glassfish.hk2.bootstrap.PopulatorPostProcessor#process(org.glassfish.hk2.api.ServiceLocator, org.glassfish.hk2.utilities.DescriptorImpl) - */ - @Override - public DescriptorImpl process(ServiceLocator serviceLocator, - DescriptorImpl descriptorImpl) { - if (!descriptorImpl.getAdvertisedContracts().contains(HK2Service.class.getName())) return descriptorImpl; - - descriptorImpl.addMetadata(KEY, VALUE); - return descriptorImpl; - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CountingApplicationScopedCDIService.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CountingApplicationScopedCDIService.java deleted file mode 100644 index 22758ea465a..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CountingApplicationScopedCDIService.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import javax.annotation.ManagedBean; -import javax.enterprise.context.ApplicationScoped; - -/** - * This is a CDI ApplicationScoped (a NormalScope) class that will be injected - * into an HK2 service - * - * @author jwells - * - */ -@ApplicationScoped -@ManagedBean -public class CountingApplicationScopedCDIService { - private static int constructedCount; // static to be class wide - - private int methodCalledCount; // not static, to be instance wide - - public CountingApplicationScopedCDIService() { - synchronized (CountingApplicationScopedCDIService.class) { - constructedCount++; - } - } - - public int getConstructedCount() { - synchronized (CountingApplicationScopedCDIService.class) { - return constructedCount; - } - } - - public int getNumberOfTimesMethodCalled() { - return ++methodCalledCount; - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScope.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScope.java deleted file mode 100644 index 6c23ec73b6b..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScope.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import javax.inject.Scope; - -import org.glassfish.hk2.api.Proxiable; - -/** - * @author jwells - * - */ -@Scope -@Proxiable -@Retention(RUNTIME) -@Target( { TYPE, METHOD }) -public @interface CustomScope { - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScopeContext.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScopeContext.java deleted file mode 100644 index 6737c5fe731..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScopeContext.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import java.lang.annotation.Annotation; -import java.util.HashMap; -import java.util.Map; - -import javax.inject.Singleton; - -import org.glassfish.hk2.api.ActiveDescriptor; -import org.glassfish.hk2.api.Context; -import org.glassfish.hk2.api.ServiceHandle; -import org.jvnet.hk2.annotations.Service; - -/** - * The context implementation for CustomScope. Does allow null value - * returns. Works more like Singleton than anything else, though it - * does keep its own map, and hence can do better at shutdown - * - * @author jwells - * - */ -@Service -@Singleton -public class CustomScopeContext implements Context { - private final Map values = - new HashMap(); - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Context#getScope() - */ - @Override - public Class getScope() { - return CustomScope.class; - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Context#findOrCreate(org.glassfish.hk2.api.ActiveDescriptor, org.glassfish.hk2.api.ServiceHandle) - */ - @Override - public U findOrCreate(ActiveDescriptor activeDescriptor, - ServiceHandle root) { - if (values.containsKey(activeDescriptor)) { - return (U) values.get(activeDescriptor); - } - - - U retVal = activeDescriptor.create(root); - values.put(activeDescriptor, retVal); - return retVal; - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Context#containsKey(org.glassfish.hk2.api.ActiveDescriptor) - */ - @Override - public boolean containsKey(ActiveDescriptor descriptor) { - return values.containsKey(descriptor); - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Context#destroyOne(org.glassfish.hk2.api.ActiveDescriptor) - */ - @Override - public void destroyOne(ActiveDescriptor descriptor) { - if (!values.containsKey(descriptor)) return; - - Object u = values.get(descriptor); - descriptor.dispose(u); - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Context#supportsNullCreation() - */ - @Override - public boolean supportsNullCreation() { - return true; - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Context#isActive() - */ - @Override - public boolean isActive() { - return true; - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Context#shutdown() - */ - @Override - public void shutdown() { - for (Map.Entry entry : values.entrySet()) { - ActiveDescriptor ad = entry.getKey(); - Object value = entry.getValue(); - - ad.dispose(value); - } - - values.clear(); - - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScopedEjb.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScopedEjb.java deleted file mode 100644 index 6a3991818ac..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/CustomScopedEjb.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.inject.Named; - -/** - * @author jwells - * - */ -@RequestScoped -public class CustomScopedEjb { - @Inject - private HK2Service hk2Service; - - @Inject @Named - private HK2NamedService rumplestiltskin; - - @Inject @Named(HK2NamedServiceFactory2.NAME) - private HK2NamedService carol; - - public void checkMe() { - int jobValue = hk2Service.doAJob(); - - if (jobValue != HK2Service.RETURN_VALUE) { - throw new AssertionError("The doAJob method should have returned " + HK2Service.RETURN_VALUE + - " but returned " + jobValue); - } - - if (!rumplestiltskin.getName().equals(HK2NamedServiceFactory.NAMED_SERVICE_NAME)) { - throw new AssertionError("The naked @Named HK2NamedService was not set or had the wrong name: " + rumplestiltskin.getName()); - } - - if (!carol.getName().equals(HK2NamedServiceFactory2.NAME)) { - throw new AssertionError("The specific @Named HK2NamedService was not set or had the wrong name: " + carol.getName()); - } - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedService.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedService.java deleted file mode 100644 index 0ec1393a550..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedService.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import org.jvnet.hk2.annotations.Contract; - -/** - * This service will be named and injected into a field with a naked Named annotation - * - * @author jwells - */ -@Contract -public interface HK2NamedService { - public String getName(); - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedServiceFactory.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedServiceFactory.java deleted file mode 100644 index cd9f66b06cd..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedServiceFactory.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import javax.inject.Named; - -import org.glassfish.hk2.api.Factory; -import org.glassfish.hk2.api.PerLookup; -import org.jvnet.hk2.annotations.Service; - -/** - * There are two factories producing this type, both with different names - * - * @author jwells - * - */ -@Service -public class HK2NamedServiceFactory implements Factory { - public final static String NAMED_SERVICE_NAME = "rumplestiltskin"; - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Factory#provide() - */ - @Override - @Named(NAMED_SERVICE_NAME) @PerLookup - public HK2NamedService provide() { - return new HK2NamedService() { - - @Override - public String getName() { - return NAMED_SERVICE_NAME; - } - - }; - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Factory#dispose(java.lang.Object) - */ - @Override - public void dispose(HK2NamedService instance) { - // Do nothing - - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedServiceFactory2.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedServiceFactory2.java deleted file mode 100644 index 93e7ef8bda9..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2NamedServiceFactory2.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import javax.inject.Named; - -import org.glassfish.hk2.api.Factory; -import org.jvnet.hk2.annotations.Service; - -/** - * @author jwells - * - */ -@Service -public class HK2NamedServiceFactory2 implements Factory { - public final static String NAME = "Alice"; - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Factory#provide() - */ - @Override - @Named(NAME) - public HK2NamedService provide() { - return new HK2NamedService() { - - @Override - public String getName() { - return NAME; - } - - }; - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Factory#dispose(java.lang.Object) - */ - @Override - public void dispose(HK2NamedService instance) { - // TODO Auto-generated method stub - - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2PerLookupInjectedWithCDIApplicationScoped.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2PerLookupInjectedWithCDIApplicationScoped.java deleted file mode 100644 index efd63f29eaa..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2PerLookupInjectedWithCDIApplicationScoped.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import javax.inject.Inject; - -import org.glassfish.hk2.api.PerLookup; -import org.jvnet.hk2.annotations.Service; - -/** - * This is a per-lookup hk2 cdi service injected with an application scoped CDI - * service, in order to test whether or not a normal scoped CDI service can - * properly be injected into an hk2 service - * - * @author jwells - * - */ -@Service @PerLookup -public class HK2PerLookupInjectedWithCDIApplicationScoped { - @Inject - private CountingApplicationScopedCDIService cdiApplicationScopedService; - - public CountingApplicationScopedCDIService getCountingCDIService() { - return cdiApplicationScopedService; - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2Service.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2Service.java deleted file mode 100644 index 57e5452da78..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2Service.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import org.jvnet.hk2.annotations.Contract; - -/** - * This service is created by hk2 and the implemetation - * will be in a customized scope - * - * @author jwells - * - */ -@Contract -public interface HK2Service { - public static final int RETURN_VALUE = 381; - - /** - * This method should always return RETURN_VALUE - * - * @return This method will always return RETURN_VALUE - */ - public int doAJob(); - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2ServiceFactory.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2ServiceFactory.java deleted file mode 100644 index b2fe3c59af0..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2ServiceFactory.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -import javax.inject.Singleton; - -import org.glassfish.hk2.api.Factory; -import org.jvnet.hk2.annotations.Service; - -/** - * This is an HK2 factory for an HK2Service. A Factory is used - * for the HK2Service so that we can FORCE HK2Service to NOT - * be a recognizable bean to CDI - * - * @author jwells - * - */ -@Service @Singleton -public class HK2ServiceFactory implements Factory { - - @Override - @CustomScope - public HK2Service provide() { - return new HK2ServiceImpl(HK2Service.RETURN_VALUE); - } - - @Override - public void dispose(HK2Service instance) { - - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2ServiceImpl.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2ServiceImpl.java deleted file mode 100644 index c4c30febe5e..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ejb1/scoped/HK2ServiceImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ejb1.scoped; - -/** - * Since this service does NOT have a constructor marked - * with {@link Inject} and does NOT have a zero-arg constructor - * CDI will NOT consider this to be one of its own beans - * - * @author jwells - * - */ -public class HK2ServiceImpl implements HK2Service { - private final int jobValue; - - /** - * Doing THIS makes this NOT a CDI service! - * - * @param jobValue - */ - public HK2ServiceImpl(int jobValue) { - this.jobValue = jobValue; - } - - @Override - public int doAJob() { - return jobValue; - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/AnEvent.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/AnEvent.java deleted file mode 100644 index a8c960081e6..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/AnEvent.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.extension; - -/** - * This is an event which will be observed by someone, in order to show - * that the ProcessObserver event has access to the ServiceLocator - * @author jwells - * - */ -public class AnEvent { - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/CDIExtension.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/CDIExtension.java deleted file mode 100644 index 4adb97eabe6..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/CDIExtension.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.extension; - -import java.io.File; -import java.io.IOException; - -import javax.enterprise.event.Observes; -import javax.enterprise.inject.spi.AfterBeanDiscovery; -import javax.enterprise.inject.spi.AfterDeploymentValidation; -import javax.enterprise.inject.spi.BeforeBeanDiscovery; -import javax.enterprise.inject.spi.BeforeShutdown; -import javax.enterprise.inject.spi.Extension; -import javax.enterprise.inject.spi.ProcessAnnotatedType; -import javax.enterprise.inject.spi.ProcessInjectionTarget; -import javax.enterprise.inject.spi.ProcessManagedBean; -import javax.enterprise.inject.spi.ProcessObserverMethod; -import javax.enterprise.inject.spi.ProcessProducer; -import javax.enterprise.inject.spi.ProcessProducerField; -import javax.enterprise.inject.spi.ProcessProducerMethod; -import javax.enterprise.inject.spi.ProcessSessionBean; -import javax.inject.Singleton; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.glassfish.hk2.api.Descriptor; -import org.glassfish.hk2.api.HK2Loader; -import org.glassfish.hk2.api.MultiException; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.hk2.utilities.BuilderHelper; -import org.glassfish.hk2.utilities.ServiceLocatorUtilities; - -/** - * This extension is used to ensure that the ServiceLocator - * is availble via JNDI in all of the extension callbacks - * - * @author jwells - * - */ -public class CDIExtension implements Extension { - private final static String FILE_PREFIX = "destroyed-"; - private final static String FILE_POSTFIX = ".txt"; - private final static String JNDI_APP_NAME = "java:app/AppName"; - private final static String JNDI_LOCATOR_NAME = "java:app/hk2/ServiceLocator"; - - private File createDestructionFileObject() { - try { - Context context = new InitialContext(); - - String appName = (String) context.lookup(JNDI_APP_NAME); - - return new File(FILE_PREFIX + appName + FILE_POSTFIX); - } - catch (NamingException ne) { - return null; - } - } - - private ServiceLocator getServiceLocator() { - try { - Context context = new InitialContext(); - - return (ServiceLocator) context.lookup(JNDI_LOCATOR_NAME); - } - catch (NamingException ne) { - return null; - } - - } - - /** - * This method will ensure that the file which indicates that the - * application has shut down properly has been removed and then - * adds the HK2 service to the system - * - * @param beforeBeanDiscovery - */ - @SuppressWarnings("unused") - private void beforeBeanDiscovery(@Observes BeforeBeanDiscovery beforeBeanDiscovery) { - File destructoFile = createDestructionFileObject(); - if (destructoFile == null) return; - - if (destructoFile.exists()) { - if (destructoFile.delete() == false) return; - } - - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - Descriptor d = BuilderHelper.link(HK2ExtensionVerifier.class). - in(Singleton.class.getName()). - andLoadWith(new HK2LoaderImpl()). - build(); - - // Just having the service present is enough for the first callback - ServiceLocatorUtilities.addOneDescriptor(locator, d); - } - - /** - * This method will ensure that the file which indicates that the - * application has shut down properly has been removed and then - * adds the HK2 service to the system - * - * @param beforeBeanDiscovery - */ - @SuppressWarnings("unused") - private void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.afterBeanDiscoveryCalled(); - } - - @SuppressWarnings("unused") - private void afterDeploymentValidation(@Observes AfterDeploymentValidation afterDeploymentValidation) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.afterDeploymentValidationCalled(); - } - - /** - * This one is a little different, as it cannot use the application to - * communicate success or failure. Instead it writes out a file that - * the test will look for after the application has been undeployed - * - * @param beforeShutdown - */ - @SuppressWarnings("unused") - private void beforeShutdown(@Observes BeforeShutdown beforeShutdown) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - File destructoFile = createDestructionFileObject(); - try { - destructoFile.createNewFile(); - } - catch (IOException ioe) { - System.err.println("ERROR: Failed to create file " + destructoFile.getAbsolutePath()); - ioe.printStackTrace(); - } - } - - @SuppressWarnings("unused") - private void processAnnotatedType(@Observes ProcessAnnotatedType processAnnotatedType) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.processAnnotatedTypeCalled(); - } - - @SuppressWarnings("unused") - private void processInjectionTarget(@Observes ProcessInjectionTarget processInjectionTarget) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.processInjectionTargetCalled(); - } - - @SuppressWarnings("unused") - private void processProducer(@Observes ProcessProducer processProducer) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.processProducerCalled(); - } - - @SuppressWarnings("unused") - private void processManagedBean(@Observes ProcessManagedBean processManagedBean) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.processManagedBeanCalled(); - } - - @SuppressWarnings("unused") - private void processSessionBean(@Observes ProcessSessionBean processSessionBean) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.processSessionBeanCalled(); - } - - @SuppressWarnings("unused") - private void processProducerMethod(@Observes ProcessProducerMethod processProducerMethod) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.processProducerMethodCalled(); - } - - @SuppressWarnings("unused") - private void processProducerField(@Observes ProcessProducerField processProducerField) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.processProducerFieldCalled(); - } - - @SuppressWarnings("unused") - private void processObserverMethod(@Observes ProcessObserverMethod processObserverMethod) { - ServiceLocator locator = getServiceLocator(); - if (locator == null) return; - - HK2ExtensionVerifier verifier = locator.getService(HK2ExtensionVerifier.class); - verifier.processObserverMethodCalled(); - } - - private class HK2LoaderImpl implements HK2Loader { - private final ClassLoader loader = getClass().getClassLoader(); - - @Override - public Class loadClass(String className) throws MultiException { - try { - return loader.loadClass(className); - } - catch (Throwable th) { - throw new MultiException(th); - } - } - - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/EventObserver.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/EventObserver.java deleted file mode 100644 index 32b6a4b26f2..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/EventObserver.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.extension; - -import javax.enterprise.event.Observes; - -/** - * This is a CDI bean which observes an event - * @author jwells - * - */ -public class EventObserver { - - public void iObserve(@Observes AnEvent event) { - - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/FieldProducer.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/FieldProducer.java deleted file mode 100644 index f56ebe4350f..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/FieldProducer.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.extension; - -import javax.enterprise.inject.Produces; - -/** - * This produces a service with a field - * - * @author jwells - * - */ -public class FieldProducer { - @Produces - public ProducedServiceB produceMe = new ProducedServiceB() {}; - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/HK2ExtensionVerifier.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/HK2ExtensionVerifier.java deleted file mode 100644 index 8d850df340e..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/HK2ExtensionVerifier.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.extension; - -import javax.inject.Singleton; - -/** - * This is a service that has fields indicating whether or not - * the various CDI extension points were properly reached - * - * @author jwells - * - */ -@Singleton -public class HK2ExtensionVerifier { - private boolean afterBeanDiscoveryCalled = false; - private boolean afterDeploymentValidationCalled = false; - private boolean processAnnotatedTypeCalled = false; - private boolean processInjectionTargetCalled = false; - private boolean processProducerCalled = false; - private boolean processManagedBeanCalled = false; - private boolean processSessionBeanCalled = false; - private boolean processProducerMethodCalled = false; - private boolean processProducerFieldCalled = false; - private boolean processObserverMethodCalled = false; - - public void afterBeanDiscoveryCalled() { - afterBeanDiscoveryCalled = true; - } - - public void afterDeploymentValidationCalled() { - afterDeploymentValidationCalled = true; - } - - public void processAnnotatedTypeCalled() { - processAnnotatedTypeCalled = true; - } - - public void processInjectionTargetCalled() { - processInjectionTargetCalled = true; - } - - public void processProducerCalled() { - processProducerCalled = true; - } - - public void processManagedBeanCalled() { - processManagedBeanCalled = true; - } - - public void processSessionBeanCalled() { - processSessionBeanCalled = true; - } - - public void processProducerMethodCalled() { - processProducerMethodCalled = true; - } - - public void processProducerFieldCalled() { - processProducerFieldCalled = true; - } - - public void processObserverMethodCalled() { - processObserverMethodCalled = true; - } - - public void validate() { - if (!afterBeanDiscoveryCalled) { - throw new AssertionError("AfterBeanDiscovery was not able to get the ServiceLocator"); - } - - if (!afterDeploymentValidationCalled) { - throw new AssertionError("AfterDeploymentValidation was not able to get the ServiceLocator"); - } - - if (!processAnnotatedTypeCalled) { - throw new AssertionError("ProcessAnnotatedType was not able to get the ServiceLocator"); - } - - if (!processInjectionTargetCalled) { - throw new AssertionError("ProcessInjectionTarget was not able to get the ServiceLocator"); - } - - if (!processProducerCalled) { - throw new AssertionError("ProcessProducer was not able to get the ServiceLocator"); - } - - if (!processManagedBeanCalled) { - throw new AssertionError("ProcessManagedBean was not able to get the ServiceLocator"); - } - - if (!processSessionBeanCalled) { - throw new AssertionError("ProcessSessionBean was not able to get the ServiceLocator"); - } - - if (!processProducerMethodCalled) { - throw new AssertionError("ProcessProducerMethod was not able to get the ServiceLocator"); - } - - if (!processProducerFieldCalled) { - throw new AssertionError("ProcessProducerField was not able to get the ServiceLocator"); - } - - if (!processObserverMethodCalled) { - throw new AssertionError("ProcessObserverMethod was not able to get the ServiceLocator"); - } - } -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/MethodProducer.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/MethodProducer.java deleted file mode 100644 index 810335ce014..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/MethodProducer.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.extension; - -import javax.enterprise.inject.Produces; - -/** - * This produces a service with a producer method - * - * @author jwells - * - */ -public class MethodProducer { - @Produces - public ProducedServiceA produceMe() { - return new ProducedServiceA() {}; - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/ProducedServiceA.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/ProducedServiceA.java deleted file mode 100644 index bd74ab4c297..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/ProducedServiceA.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.extension; - -/** - * This is a service that is produced, in order to test that the - * extension methods for producers have access to the ServiceLocator - * - * @author jwells - * - */ -public interface ProducedServiceA { - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/ProducedServiceB.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/ProducedServiceB.java deleted file mode 100644 index 496e5f80993..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/extension/ProducedServiceB.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.extension; - -/** - * This is a service that is produces to test that producer - * events have access to the ServiceLocator - * - * @author jwells - * - */ -public interface ProducedServiceB { - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/CDIServiceInjectedWithHK2Service.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/CDIServiceInjectedWithHK2Service.java deleted file mode 100644 index ed09e9786dd..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/CDIServiceInjectedWithHK2Service.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.jit; - -import javax.inject.Inject; - -/** - * This is a CDI service injected with the HK2Service - * that is generated by the JIT resolver - * - * @author jwells - * - */ -public class CDIServiceInjectedWithHK2Service { - @Inject - private HK2Service hk2Service; - - public boolean hasHK2Service() { - return hk2Service != null; - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/HK2Service.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/HK2Service.java deleted file mode 100644 index 497cd4f2b84..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/HK2Service.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.jit; - -import org.jvnet.hk2.annotations.Contract; - -/** - * This will be an HK2 service that is generated with the - * JIT resolver - * - * @author jwells - * - */ -@Contract -public interface HK2Service { - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/JITResolver.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/JITResolver.java deleted file mode 100644 index 856bd7234f4..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/jit/JITResolver.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.jit; - -import javax.inject.Inject; - -import org.glassfish.hk2.api.Injectee; -import org.glassfish.hk2.api.JustInTimeInjectionResolver; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.hk2.utilities.ServiceLocatorUtilities; -import org.jvnet.hk2.annotations.Service; - -/** - * This is the JIT resolver that creates implementations - * of HK2Service - * - * @author jwells - * - */ -@Service -public class JITResolver implements JustInTimeInjectionResolver { - @Inject - private ServiceLocator locator; - - @Override - public boolean justInTimeResolution(Injectee failedInjectionPoint) { - if (!failedInjectionPoint.getRequiredType().equals(HK2Service.class)) return false; - - HK2Service hk2Service = new HK2Service() {}; - ServiceLocatorUtilities.addOneConstant(locator, hk2Service); - - return true; - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/locator/BasicService.java b/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/locator/BasicService.java deleted file mode 100644 index c0623172f3d..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/locator/BasicService.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.locator; - -import javax.enterprise.inject.spi.BeanManager; -import javax.inject.Inject; -import javax.inject.Singleton; - -/** - * This service will be created with HK2 but will - * have the CDI BeanManager injected into it - * - * @author jwells - * - */ -@Singleton -public class BasicService { - @Inject - private BeanManager beanManager; - - /** - * This method returns true if the BeanManager was injected. This service - * is created with HK2 but still has the CDI created object injected into - * it - * - * @return true if this HK2 created service was injected with a CDI bean - */ - public boolean gotInjectedWithBeanManager() { - return (beanManager != null); - } - -} diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/beans.xml b/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 094e6e8ebe9..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension deleted file mode 100644 index f6a721b8dda..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension +++ /dev/null @@ -1 +0,0 @@ -com.oracle.hk2.devtest.cdi.extension.CDIExtension \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/services/org.glassfish.hk2.bootstrap.PopulatorPostProcessor b/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/services/org.glassfish.hk2.bootstrap.PopulatorPostProcessor deleted file mode 100644 index e07f60e53da..00000000000 --- a/appserver/tests/hk2/cdi/basic/ejb1/src/main/resources/META-INF/services/org.glassfish.hk2.bootstrap.PopulatorPostProcessor +++ /dev/null @@ -1 +0,0 @@ -com.oracle.hk2.devtest.cdi.ejb1.ppp.ApplicationPopulatorPostProcessor \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/basic/pom.xml b/appserver/tests/hk2/cdi/basic/pom.xml deleted file mode 100755 index 7cf9970d358..00000000000 --- a/appserver/tests/hk2/cdi/basic/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2 - cdi - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi - basic - pom - - GlassFish HK2 Basic CDI test - - ejb1 - runner - - diff --git a/appserver/tests/hk2/cdi/basic/runner/pom.xml b/appserver/tests/hk2/cdi/basic/runner/pom.xml deleted file mode 100644 index 6dc5cbe1d45..00000000000 --- a/appserver/tests/hk2/cdi/basic/runner/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - basic - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.basic - runner - - HK2 CDI Basic Test Runner - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${glassfish.home} - ${source.home} - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - true - com.oracle.hk2.devtest.Main - - - - - - - - - - org.glassfish.tests.hk2.cdi.basic - ejb1 - ${project.version} - - - org.testng - testng - 6.5.2 - test - - - org.glassfish.main.tests - utils-ng - ${project.version} - test - - - org.glassfish.main.appclient - gf-client - ${project.version} - - - diff --git a/appserver/tests/hk2/cdi/basic/runner/src/main/java/com/oracle/hk2/devtest/Main.java b/appserver/tests/hk2/cdi/basic/runner/src/main/java/com/oracle/hk2/devtest/Main.java deleted file mode 100644 index 3f658b69f4d..00000000000 --- a/appserver/tests/hk2/cdi/basic/runner/src/main/java/com/oracle/hk2/devtest/Main.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import com.oracle.hk2.devtest.cdi.ejb1.BasicEjb; - -/** - * Has a main so it can be used to invoke the EJB from a client - * - * @author jwells - * - */ -public class Main { - private final static String BASIC_EJB_JNDI_NAME = "java:global/ejb1/EjbInjectedWithServiceLocator!" + - BasicEjb.class.getName(); - - private static int go() throws NamingException { - Context context = new InitialContext(); - - BasicEjb basic = (BasicEjb) context.lookup(BASIC_EJB_JNDI_NAME); - - boolean ret = basic.cdiManagerInjected(); - - System.out.println("EJB#cdiManagerInjected invoked with result " + ret); - - return 0; - } - - public static void main(String argc[]) { - try { - go(); - System.exit(0); - } - catch (Throwable th) { - th.printStackTrace(); - System.exit(1); - } - - } -} diff --git a/appserver/tests/hk2/cdi/basic/runner/src/test/java/com/oracle/hk2/devtest/cdi/runner/BasicCDITest.java b/appserver/tests/hk2/cdi/basic/runner/src/test/java/com/oracle/hk2/devtest/cdi/runner/BasicCDITest.java deleted file mode 100644 index 2000dd2a3e9..00000000000 --- a/appserver/tests/hk2/cdi/basic/runner/src/test/java/com/oracle/hk2/devtest/cdi/runner/BasicCDITest.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.runner; - -import java.io.File; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.glassfish.tests.utils.NucleusStartStopTest; -import org.glassfish.tests.utils.NucleusTestUtils; -import org.testng.Assert; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import com.oracle.hk2.devtest.cdi.ejb1.BasicEjb; - -/** - * - * @author jwells - * - */ -public class BasicCDITest extends NucleusStartStopTest { - private final static String EJB1_JAR = "cdi/basic/ejb1/target/ejb1.jar"; - private final static String EJB1_APP_NAME = "ejb1"; - private final static String BASIC_EJB_JNDI_NAME = "java:global/ejb1/EjbInjectedWithServiceLocator!" + - BasicEjb.class.getName(); - private final static String SOURCE_HOME = System.getProperty("source.home", "$"); - private final static String SOURCE_HOME_EJB = "/appserver/tests/hk2/" + EJB1_JAR; - private final static String GLASSFISH_HOME = System.getProperty("glassfish.home"); - private final static String RELATIVE_FILE_PATH = "domains/domain1/config/destroyed-ejb1.txt"; - - private boolean deployed1; - private Context context; - - @BeforeTest - public void beforeTest() throws NamingException { - context = new InitialContext(); - - String ejb1Jar = EJB1_JAR; - if (!SOURCE_HOME.startsWith("$")) { - ejb1Jar = SOURCE_HOME + SOURCE_HOME_EJB; - } - - deployed1 = NucleusTestUtils.nadmin("deploy", ejb1Jar); - Assert.assertTrue(deployed1); - - File destroyedFile = new File(GLASSFISH_HOME); - destroyedFile = new File(destroyedFile, RELATIVE_FILE_PATH); - - if (destroyedFile.exists()) { - Assert.assertTrue(destroyedFile.delete()); - } - } - - @AfterTest - public void afterTest() throws NamingException { - if (deployed1) { - NucleusTestUtils.nadmin("undeploy", EJB1_APP_NAME); - deployed1 = false; - } - - if (context != null) { - context.close(); - context = null; - } - - // After the undeployment the file indicating the proper destruction should be there - File destroyedFile = new File(GLASSFISH_HOME); - destroyedFile = new File(destroyedFile, RELATIVE_FILE_PATH); - - Assert.assertTrue(destroyedFile.exists()); - } - - /** - * Ensures that a ServiceLocator can be injected into a CDI bean - * @throws NamingException - */ - @Test - public void testBasicHK2CDIInjection() throws NamingException { - BasicEjb basic = (BasicEjb) context.lookup(BASIC_EJB_JNDI_NAME); - Assert.assertNotNull(basic); - - Assert.assertTrue(basic.cdiManagerInjected()); - Assert.assertTrue(basic.serviceLocatorInjected()); - - basic.installHK2Service(); - - Assert.assertTrue(basic.hk2ServiceInjectedWithEjb()); - } - - /** - * Ensures that the ServiceLocator is available in all CDI events - * - * @throws NamingException - */ - @Test - public void testCDIExtensionHasAccessToServiceLocatorViaJNDI() throws NamingException { - BasicEjb basic = (BasicEjb) context.lookup(BASIC_EJB_JNDI_NAME); - Assert.assertNotNull(basic); - - basic.isServiceLocatorAvailableInAllCDIExtensionEvents(); - } - - /** - * Tests that an HK2 service with its own scope works properly - * - * @throws NamingException - */ - @Test - public void testCustomScopedHK2ServiceWorks() throws NamingException { - BasicEjb basic = (BasicEjb) context.lookup(BASIC_EJB_JNDI_NAME); - Assert.assertNotNull(basic); - - basic.isEJBWithCustomHK2ScopeProperlyInjected(); - } - - /** - * Tests that an application created post processor works - * - * @throws NamingException - */ - @Test - public void testApplicationDefinedPostProcessorRuns() throws NamingException { - BasicEjb basic = (BasicEjb) context.lookup(BASIC_EJB_JNDI_NAME); - Assert.assertNotNull(basic); - - basic.doesApplicationDefinedPopulatorPostProcessorRun(); - } - - /** - * Tests that a service added via JIT resolution works - * - * @throws NamingException - */ - @Test - public void testJITResolution() throws NamingException { - BasicEjb basic = (BasicEjb) context.lookup(BASIC_EJB_JNDI_NAME); - Assert.assertNotNull(basic); - - basic.isServiceAddedWithJITResolverAdded(); - } - - /** - * Tests that a service added via JIT resolution works - * - * @throws NamingException - */ - @Test - public void testApplicationScopedCDIServiceIntoHK2Service() throws NamingException { - BasicEjb basic = (BasicEjb) context.lookup(BASIC_EJB_JNDI_NAME); - Assert.assertNotNull(basic); - - basic.checkApplicationScopedServiceInjectedIntoHk2Service(); - } -} diff --git a/appserver/tests/hk2/cdi/ear/app/pom.xml b/appserver/tests/hk2/cdi/ear/app/pom.xml deleted file mode 100644 index be55aa38b40..00000000000 --- a/appserver/tests/hk2/cdi/ear/app/pom.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - ear - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.ear - app - ear - - HK2 CDI EAR Test EAR - - - - - org.apache.maven.plugins - maven-ear-plugin - - - - org.glassfish.tests.hk2.cdi.ear - war1 - war1.war - - - org.glassfish.tests.hk2.cdi.ear - war2 - war2.war - - - org.glassfish.tests.hk2.cdi.ear - ejb1 - ejb1.jar - - - org.glassfish.tests.hk2.cdi.ear - ejb2 - ejb2.jar - - - org.glassfish.tests.hk2.cdi.ear - lib1 - lib - lib1.jar - - - - - - - - - - org.glassfish.tests.hk2.cdi.ear - lib1 - ${project.version} - - - org.glassfish.tests.hk2.cdi.ear - ejb1 - ejb - ${project.version} - - - org.glassfish.tests.hk2.cdi.ear - ejb2 - ejb - ${project.version} - - - org.glassfish.tests.hk2.cdi.ear - war1 - war - ${project.version} - - - org.glassfish.tests.hk2.cdi.ear - war2 - war - ${project.version} - - - jakarta.ejb - jakarta.ejb-api - provided - - - javax.xml.rpc - javax.xml.rpc-api - provided - - - jakarta.transaction - jakarta.transaction-api - provided - - - diff --git a/appserver/tests/hk2/cdi/ear/ejb1/pom.xml b/appserver/tests/hk2/cdi/ear/ejb1/pom.xml deleted file mode 100644 index 912d1aff5b0..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb1/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - ear - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.ear - ejb1 - - HK2 CDI EAR Test Ejb1 - - - - - org.glassfish.hk2 - hk2-inhabitant-generator - - - - application - - - generate-inhabitants - - - - - - org.apache.felix - maven-bundle-plugin - - - - - - - - - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - org.glassfish.hk2 - hk2 - provided - - - jakarta.ejb - jakarta.ejb-api - provided - - - org.glassfish.tests.hk2.cdi.ear - lib1 - ${project.version} - provided - - - diff --git a/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1.java b/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1.java deleted file mode 100644 index 1e1938deb03..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.ejb1; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.inject.Inject; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; -import com.oracle.hk2.devtest.cdi.ear.lib1.Lib1HK2Service; - -/** - * - * @author jwells - * - */ -@Stateless -@Remote(Ejb1Remote.class) -public class Ejb1 implements Ejb1Remote { - @Inject - private Ejb1HK2Service ejb1Service; - - @Inject - private Lib1HK2Service lib1Service; - - @Override - public boolean isEjb1HK2ServiceAvailable() { - return (ejb1Service != null) && HK2Service.EJB1.equals(ejb1Service.getComponentName()) ; - } - - @Override - public boolean isLib1HK2ServiceAvailable() { - return (lib1Service != null) && HK2Service.LIB1.equals(lib1Service.getComponentName()) ; - } -} diff --git a/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1HK2Service.java b/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1HK2Service.java deleted file mode 100644 index 540271cb75b..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1HK2Service.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.ejb1; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; - -/** - * @author jwells - * - */ -public interface Ejb1HK2Service extends HK2Service { - -} diff --git a/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1HK2ServiceFactory.java b/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1HK2ServiceFactory.java deleted file mode 100644 index 1f9f08be77c..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1HK2ServiceFactory.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.ejb1; - -import org.glassfish.hk2.api.Factory; -import org.jvnet.hk2.annotations.Service; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; - -/** - * @author jwells - * - */ -@Service -public class Ejb1HK2ServiceFactory implements Factory { - - @Override - public Ejb1HK2Service provide() { - return new Ejb1HK2Service() { - - @Override - public String getComponentName() { - return HK2Service.EJB1; - } - - }; - } - - @Override - public void dispose(Ejb1HK2Service instance) { - - } - - -} diff --git a/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1Remote.java b/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1Remote.java deleted file mode 100644 index 7fd2941dbd4..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb1/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb1/Ejb1Remote.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.ejb1; - -/** - * @author jwells - * - */ -public interface Ejb1Remote { - public boolean isEjb1HK2ServiceAvailable(); - - public boolean isLib1HK2ServiceAvailable(); - -} diff --git a/appserver/tests/hk2/cdi/ear/ejb1/src/main/resources/META-INF/beans.xml b/appserver/tests/hk2/cdi/ear/ejb1/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 094e6e8ebe9..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb1/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/ear/ejb2/pom.xml b/appserver/tests/hk2/cdi/ear/ejb2/pom.xml deleted file mode 100644 index 1c650e248d0..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb2/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - ear - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.ear - ejb2 - - HK2 CDI EAR Test Ejb2 - - - - - org.glassfish.hk2 - hk2-inhabitant-generator - - - - application - - - generate-inhabitants - - - - - - - - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - org.glassfish.hk2 - hk2 - provided - - - jakarta.ejb - jakarta.ejb-api - provided - - - org.glassfish.tests.hk2.cdi.ear - lib1 - ${project.version} - provided - - - org.glassfish.tests.hk2.cdi.ear - ejb1 - ${project.version} - ejb - provided - - - diff --git a/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2.java b/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2.java deleted file mode 100644 index 6ef679c6517..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.ejb2; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.inject.Inject; - -import com.oracle.hk2.devtest.cdi.ear.ejb1.Ejb1HK2Service; -import com.oracle.hk2.devtest.cdi.ear.lib1.Lib1HK2Service; - -/** - * - * @author jwells - * - */ -@Stateless -@Remote(Ejb2Remote.class) -public class Ejb2 implements Ejb2Remote { - @Inject - private Ejb1HK2Service ejb1Service; - - @Inject - private Lib1HK2Service lib1Service; - - @Inject - private Ejb2HK2Service ejb2Service; - - @Override - public boolean isEjb2HK2ServiceAvailable() { - return (ejb2Service != null); - } - - @Override - public boolean isEjb1HK2ServiceAvailable() { - return (ejb1Service != null); - } - - @Override - public boolean isLib1HK2ServiceAvailable() { - return (lib1Service != null); - } -} diff --git a/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2HK2Service.java b/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2HK2Service.java deleted file mode 100644 index cf7edb64e4f..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2HK2Service.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.ejb2; - -import org.jvnet.hk2.annotations.Contract; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; - -/** - * @author jwells - * - */ -@Contract -public interface Ejb2HK2Service extends HK2Service { - -} diff --git a/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2HK2ServiceFactory.java b/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2HK2ServiceFactory.java deleted file mode 100644 index 0cc6bf2d59c..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2HK2ServiceFactory.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.ejb2; - -import org.glassfish.hk2.api.Factory; -import org.jvnet.hk2.annotations.Service; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; - -/** - * @author jwells - * - */ -@Service -public class Ejb2HK2ServiceFactory implements Factory { - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Factory#provide() - */ - @Override - public Ejb2HK2Service provide() { - return new Ejb2HK2Service() { - - @Override - public String getComponentName() { - return HK2Service.EJB2; - } - - } ; - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Factory#dispose(java.lang.Object) - */ - @Override - public void dispose(Ejb2HK2Service instance) { - - } - -} diff --git a/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2Remote.java b/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2Remote.java deleted file mode 100644 index 9f78365afde..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb2/src/main/java/com/oracle/hk2/devtest/cdi/ear/ejb2/Ejb2Remote.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.ejb2; - -/** - * @author jwells - * - */ -public interface Ejb2Remote { - public boolean isEjb2HK2ServiceAvailable(); - - public boolean isEjb1HK2ServiceAvailable(); - - public boolean isLib1HK2ServiceAvailable(); - -} diff --git a/appserver/tests/hk2/cdi/ear/ejb2/src/main/resources/META-INF/beans.xml b/appserver/tests/hk2/cdi/ear/ejb2/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 094e6e8ebe9..00000000000 --- a/appserver/tests/hk2/cdi/ear/ejb2/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/ear/lib1/pom.xml b/appserver/tests/hk2/cdi/ear/lib1/pom.xml deleted file mode 100644 index 6098872d72c..00000000000 --- a/appserver/tests/hk2/cdi/ear/lib1/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - ear - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.ear - lib1 - - HK2 CDI EAR Test Lib1 - - - - - org.glassfish.hk2 - hk2-inhabitant-generator - - - - application - - - generate-inhabitants - - - - - - - - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - org.glassfish.hk2 - hk2 - provided - - - diff --git a/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/HK2Service.java b/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/HK2Service.java deleted file mode 100644 index 6c569545b8e..00000000000 --- a/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/HK2Service.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.lib1; - -import org.jvnet.hk2.annotations.Contract; - -/** - * @author jwells - * - */ -@Contract -public interface HK2Service { - public final static String LIB1 = "lib1"; - public final static String EJB1 = "ejb1"; - public final static String EJB2 = "ejb2"; - public final static String WAR1 = "war1"; - public final static String WAR2 = "war2"; - - public String getComponentName(); - -} diff --git a/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1.java b/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1.java deleted file mode 100644 index 083e881fb80..00000000000 --- a/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.lib1; - -/** - * - * @author jwells - * - */ -public class Lib1 { -} diff --git a/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1HK2Service.java b/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1HK2Service.java deleted file mode 100644 index 9c81239637a..00000000000 --- a/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1HK2Service.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.lib1; - -import org.jvnet.hk2.annotations.Contract; - -/** - * @author jwells - * - */ -@Contract -public interface Lib1HK2Service extends HK2Service { - -} diff --git a/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1Hk2ServiceFactory.java b/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1Hk2ServiceFactory.java deleted file mode 100644 index 297ce78cf28..00000000000 --- a/appserver/tests/hk2/cdi/ear/lib1/src/main/java/com/oracle/hk2/devtest/cdi/ear/lib1/Lib1Hk2ServiceFactory.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.lib1; - -import org.glassfish.hk2.api.Factory; -import org.jvnet.hk2.annotations.Service; - -/** - * @author jwells - * - */ -@Service -public class Lib1Hk2ServiceFactory implements Factory { - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Factory#provide() - */ - @Override - public Lib1HK2Service provide() { - return new Lib1HK2Service() { - - @Override - public String getComponentName() { - return HK2Service.LIB1; - } - - }; - } - - /* (non-Javadoc) - * @see org.glassfish.hk2.api.Factory#dispose(java.lang.Object) - */ - @Override - public void dispose(Lib1HK2Service instance) { - // TODO Auto-generated method stub - - } - -} diff --git a/appserver/tests/hk2/cdi/ear/pom.xml b/appserver/tests/hk2/cdi/ear/pom.xml deleted file mode 100755 index 5a722d49135..00000000000 --- a/appserver/tests/hk2/cdi/ear/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2 - cdi - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi - ear - pom - - GlassFish HK2 CDI EAR test - - lib1 - ejb1 - ejb2 - war1 - war2 - app - runner - - diff --git a/appserver/tests/hk2/cdi/ear/runner/pom.xml b/appserver/tests/hk2/cdi/ear/runner/pom.xml deleted file mode 100644 index 3127cf76414..00000000000 --- a/appserver/tests/hk2/cdi/ear/runner/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - ear - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.ear - runner - - HK2 CDI EAR Test Runner - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${glassfish.home} - ${source.home} - - - - - - - - - org.glassfish.tests.hk2.cdi.ear - ejb2 - ejb - ${project.version} - test - - - org.glassfish.tests.hk2.cdi.ear - ejb1 - ejb - ${project.version} - test - - - org.glassfish.tests.hk2.cdi.ear - lib1 - ${project.version} - test - - - org.glassfish.tests.hk2.cdi.ear - app - ear - ${project.version} - test - - - org.testng - testng - 6.5.2 - test - - - org.glassfish.main.tests - utils-ng - ${project.version} - test - - - org.glassfish.main.appclient - gf-client - ${project.version} - test - - - diff --git a/appserver/tests/hk2/cdi/ear/runner/src/main/java/com/oracle/hk2/devtest/Dummy.java b/appserver/tests/hk2/cdi/ear/runner/src/main/java/com/oracle/hk2/devtest/Dummy.java deleted file mode 100644 index 2db931f01d0..00000000000 --- a/appserver/tests/hk2/cdi/ear/runner/src/main/java/com/oracle/hk2/devtest/Dummy.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest; - -public class Dummy { -} diff --git a/appserver/tests/hk2/cdi/ear/runner/src/test/java/com/oracle/hk2/devtest/cdi/ear/runner/CDIEarTest.java b/appserver/tests/hk2/cdi/ear/runner/src/test/java/com/oracle/hk2/devtest/cdi/ear/runner/CDIEarTest.java deleted file mode 100644 index 211461d2743..00000000000 --- a/appserver/tests/hk2/cdi/ear/runner/src/test/java/com/oracle/hk2/devtest/cdi/ear/runner/CDIEarTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.runner; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.glassfish.tests.utils.NucleusStartStopTest; -import org.glassfish.tests.utils.NucleusTestUtils; -import org.testng.Assert; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import com.oracle.hk2.devtest.cdi.ear.ejb1.Ejb1Remote; -import com.oracle.hk2.devtest.cdi.ear.ejb2.Ejb2Remote; - -/** - * - * @author jwells - * - */ -public class CDIEarTest extends NucleusStartStopTest { - private final static String APP_JAR = "cdi/ear/app/target/app.ear"; - private final static String APP_NAME = "app"; - - private final static String SOURCE_HOME = System.getProperty("source.home", "$"); - private final static String SOURCE_HOME_APP = "/appserver/tests/hk2/" + APP_JAR; - - private final static String EJB1_JNDI_NAME = "java:global/app/ejb1/Ejb1"; - private final static String EJB2_JNDI_NAME = "java:global/app/ejb2/Ejb2"; - - private final static String WAR1_URL = "http://localhost:8080/war1/war1"; - private final static String WAR2_URL = "http://localhost:8080/war2/war2"; - - private boolean deployed1; - private Context context; - - @BeforeTest - public void beforeTest() throws NamingException { - context = new InitialContext(); - - String appJar = APP_JAR; - if (!SOURCE_HOME.startsWith("$")) { - appJar = SOURCE_HOME + SOURCE_HOME_APP; - } - - deployed1 = NucleusTestUtils.nadmin("deploy", appJar); - Assert.assertTrue(deployed1); - } - - @AfterTest - public void afterTest() throws NamingException { - if (deployed1) { - NucleusTestUtils.nadmin("undeploy", APP_NAME); - deployed1 = false; - } - - if (context != null) { - context.close(); - context = null; - } - } - - private Object lookupWithFiveSecondSleep(String jndiName) throws NamingException, InterruptedException { - long sleepTime = 5L * 1000L; - long interval = 100L; - - while (sleepTime > 0) { - try { - return context.lookup(jndiName); - } - catch (NamingException ne) { - sleepTime -= interval; - if (sleepTime <= 0) { - throw ne; - } - - if ((sleepTime % 1000L) == 0) { - System.out.println("Sleeping another " + (sleepTime / 1000) + " seconds..."); - } - - Thread.sleep(interval); - } - - } - - throw new AssertionError("Should never get here"); - } - - @Test - public void testInjectFromLib1IntoEjb1() throws NamingException, InterruptedException { - Ejb1Remote ejb1 = (Ejb1Remote) lookupWithFiveSecondSleep(EJB1_JNDI_NAME); - - ejb1.isLib1HK2ServiceAvailable(); - } - - @Test - public void testInjectFromEjb1IntoEjb1() throws NamingException, InterruptedException { - Ejb1Remote ejb1 = (Ejb1Remote) lookupWithFiveSecondSleep(EJB1_JNDI_NAME); - - ejb1.isEjb1HK2ServiceAvailable(); - - } - - @Test - public void testInjectedLib1Ejb1War1IntoWar1() { - String fromWar1 = NucleusTestUtils.getURL(WAR1_URL); - - Assert.assertTrue(fromWar1.contains("success"), - "Does not contain the word success: " + fromWar1); - } - - @Test - public void testInjectFromLib1IntoEjb2() throws NamingException, InterruptedException { - Ejb2Remote ejb2 = (Ejb2Remote) lookupWithFiveSecondSleep(EJB2_JNDI_NAME); - - ejb2.isLib1HK2ServiceAvailable(); - } - - @Test - public void testInjectFromEjb1IntoEjb2() throws NamingException, InterruptedException { - Ejb2Remote ejb2 = (Ejb2Remote) lookupWithFiveSecondSleep(EJB2_JNDI_NAME); - - ejb2.isEjb1HK2ServiceAvailable(); - } - - @Test - public void testInjectFromEjb2IntoEjb2() throws NamingException, InterruptedException { - Ejb2Remote ejb2 = (Ejb2Remote) lookupWithFiveSecondSleep(EJB2_JNDI_NAME); - - ejb2.isEjb2HK2ServiceAvailable(); - } - - @Test - public void testInjectedLib1Ejb1Ejb2War2IntoWar2() { - String fromWar2 = NucleusTestUtils.getURL(WAR2_URL); - - Assert.assertTrue(fromWar2.contains("success"), - "Does not contain the word success: " + fromWar2); - } -} diff --git a/appserver/tests/hk2/cdi/ear/war1/pom.xml b/appserver/tests/hk2/cdi/ear/war1/pom.xml deleted file mode 100644 index 2bae47e1196..00000000000 --- a/appserver/tests/hk2/cdi/ear/war1/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - ear - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.ear - war1 - war - - HK2 CDI EAR Test War1 - - - - - org.apache.maven.plugins - maven-war-plugin - - - org.glassfish.hk2 - hk2-inhabitant-generator - - - - application - - - generate-inhabitants - - - - - - - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - org.glassfish.hk2 - hk2 - provided - - - org.glassfish.tests.hk2.cdi.ear - lib1 - ${project.version} - provided - - - org.glassfish.tests.hk2.cdi.ear - ejb1 - ${project.version} - provided - - - diff --git a/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1.java b/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1.java deleted file mode 100644 index c7b989e0f4a..00000000000 --- a/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.war1; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.inject.Inject; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.oracle.hk2.devtest.cdi.ear.ejb1.Ejb1HK2Service; -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; -import com.oracle.hk2.devtest.cdi.ear.lib1.Lib1HK2Service; - -/** - * - * @author jwells - * - */ -public class War1 extends HttpServlet { - /** - * For serialization - */ - private static final long serialVersionUID = 8705667047049271376L; - - @Inject - private Lib1HK2Service lib1Hk2Service; - - @Inject - private Ejb1HK2Service ejb1Hk2Service; - - @Inject - private War1HK2Service war1Hk2Service; - - /** - * Just prints out the value of the ServiceLocator getName - */ - @Override - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - if (lib1Hk2Service == null || !lib1Hk2Service.getComponentName().equals(HK2Service.LIB1)) { - throw new ServletException("lib1HK2Service from lib1 was invalid: " + lib1Hk2Service); - } - - if (ejb1Hk2Service == null || !ejb1Hk2Service.getComponentName().equals(HK2Service.EJB1)) { - throw new ServletException("ejb1HK2Service from ejb1 was invalid: " + ejb1Hk2Service); - } - - if (war1Hk2Service == null || !war1Hk2Service.getComponentName().equals(HK2Service.WAR1)) { - throw new ServletException("war1HK2Service from war1 was invalid: " + war1Hk2Service); - } - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Iso1 WebApp"); - writer.println(""); - writer.println(""); - - writer.println("success"); - - writer.println(""); - writer.println(""); - } -} diff --git a/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1HK2Service.java b/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1HK2Service.java deleted file mode 100644 index 1503938c5ae..00000000000 --- a/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1HK2Service.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.war1; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; - -/** - * @author jwells - * - */ -public interface War1HK2Service extends HK2Service { - -} diff --git a/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1HK2ServiceFactory.java b/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1HK2ServiceFactory.java deleted file mode 100644 index e879236700e..00000000000 --- a/appserver/tests/hk2/cdi/ear/war1/src/main/java/com/oracle/hk2/devtest/cdi/ear/war1/War1HK2ServiceFactory.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.war1; - -import org.glassfish.hk2.api.Factory; -import org.jvnet.hk2.annotations.Service; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; - -/** - * @author jwells - * - */ -@Service -public class War1HK2ServiceFactory implements Factory { - - @Override - public War1HK2Service provide() { - return new War1HK2Service() { - - @Override - public String getComponentName() { - return HK2Service.WAR1; - } - - } ; - } - - @Override - public void dispose(War1HK2Service instance) { - // TODO Auto-generated method stub - - } - -} diff --git a/appserver/tests/hk2/cdi/ear/war1/src/main/webapp/WEB-INF/beans.xml b/appserver/tests/hk2/cdi/ear/war1/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index 094e6e8ebe9..00000000000 --- a/appserver/tests/hk2/cdi/ear/war1/src/main/webapp/WEB-INF/beans.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/ear/war1/src/main/webapp/WEB-INF/web.xml b/appserver/tests/hk2/cdi/ear/war1/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1aa30f94f40..00000000000 --- a/appserver/tests/hk2/cdi/ear/war1/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - war1 - war1 - com.oracle.hk2.devtest.cdi.ear.war1.War1 - - - - war1 - /war1 - - - diff --git a/appserver/tests/hk2/cdi/ear/war2/pom.xml b/appserver/tests/hk2/cdi/ear/war2/pom.xml deleted file mode 100644 index ca5e67a9f3b..00000000000 --- a/appserver/tests/hk2/cdi/ear/war2/pom.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - ear - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.ear - war2 - war - - HK2 CDI EAR Test War2 - - - - - org.apache.maven.plugins - maven-war-plugin - - - org.glassfish.hk2 - hk2-inhabitant-generator - - - - application - - - generate-inhabitants - - - - - - - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - org.glassfish.hk2 - hk2 - provided - - - org.glassfish.tests.hk2.cdi.ear - lib1 - ${project.version} - provided - - - org.glassfish.tests.hk2.cdi.ear - ejb1 - ${project.version} - provided - - - org.glassfish.tests.hk2.cdi.ear - ejb2 - ${project.version} - provided - - - diff --git a/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2.java b/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2.java deleted file mode 100644 index cdf7a91d83d..00000000000 --- a/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.war2; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.inject.Inject; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.oracle.hk2.devtest.cdi.ear.ejb1.Ejb1HK2Service; -import com.oracle.hk2.devtest.cdi.ear.ejb2.Ejb2HK2Service; -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; -import com.oracle.hk2.devtest.cdi.ear.lib1.Lib1HK2Service; - -/** - * - * @author jwells - * - */ -public class War2 extends HttpServlet { - /** - * - */ - private static final long serialVersionUID = -2151912159297931882L; - - @Inject - private Lib1HK2Service lib1Hk2Service; - - @Inject - private Ejb1HK2Service ejb1Hk2Service; - - @Inject - private Ejb2HK2Service ejb2Hk2Service; - - @Inject - private War2HK2Service war2Hk2Service; - - /** - * Just prints out the value of the ServiceLocator getName - */ - @Override - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - if (lib1Hk2Service == null || !lib1Hk2Service.getComponentName().equals(HK2Service.LIB1)) { - throw new ServletException("lib1HK2Service from lib1 was invalid: " + lib1Hk2Service); - } - - if (ejb1Hk2Service == null || !ejb1Hk2Service.getComponentName().equals(HK2Service.EJB1)) { - throw new ServletException("ejb2HK2Service from ejb2 was invalid: " + ejb2Hk2Service); - } - - if (ejb2Hk2Service == null || !ejb2Hk2Service.getComponentName().equals(HK2Service.EJB2)) { - throw new ServletException("ejb1HK2Service from ejb1 was invalid: " + ejb1Hk2Service); - } - - if (war2Hk2Service == null || !war2Hk2Service.getComponentName().equals(HK2Service.WAR2)) { - throw new ServletException("war2HK2Service from war2 was invalid: " + war2Hk2Service); - } - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Iso1 WebApp"); - writer.println(""); - writer.println(""); - - writer.println("success"); - - writer.println(""); - writer.println(""); - } -} diff --git a/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2HK2Service.java b/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2HK2Service.java deleted file mode 100644 index 997ffb3c5ed..00000000000 --- a/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2HK2Service.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.war2; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; - -/** - * @author jwells - * - */ -public interface War2HK2Service extends HK2Service { - -} diff --git a/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2HK2ServiceFactory.java b/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2HK2ServiceFactory.java deleted file mode 100644 index 5a4686c0827..00000000000 --- a/appserver/tests/hk2/cdi/ear/war2/src/main/java/com/oracle/hk2/devtest/cdi/ear/war2/War2HK2ServiceFactory.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.cdi.ear.war2; - -import org.glassfish.hk2.api.Factory; -import org.jvnet.hk2.annotations.Service; - -import com.oracle.hk2.devtest.cdi.ear.lib1.HK2Service; - -/** - * @author jwells - * - */ -@Service -public class War2HK2ServiceFactory implements Factory { - - @Override - public War2HK2Service provide() { - return new War2HK2Service() { - - @Override - public String getComponentName() { - return HK2Service.WAR2; - } - - } ; - } - - @Override - public void dispose(War2HK2Service instance) { - - } - -} diff --git a/appserver/tests/hk2/cdi/ear/war2/src/main/webapp/WEB-INF/beans.xml b/appserver/tests/hk2/cdi/ear/war2/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index 094e6e8ebe9..00000000000 --- a/appserver/tests/hk2/cdi/ear/war2/src/main/webapp/WEB-INF/beans.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/ear/war2/src/main/webapp/WEB-INF/web.xml b/appserver/tests/hk2/cdi/ear/war2/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 7566b62a925..00000000000 --- a/appserver/tests/hk2/cdi/ear/war2/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - war2 - war2 - com.oracle.hk2.devtest.cdi.ear.war2.War2 - - - - war2 - /war2 - - - diff --git a/appserver/tests/hk2/cdi/jersey/pom.xml b/appserver/tests/hk2/cdi/jersey/pom.xml deleted file mode 100755 index 44527116ee1..00000000000 --- a/appserver/tests/hk2/cdi/jersey/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2 - cdi - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi - jersey - pom - - GlassFish HK2 Jersey CDI test - - war - runner - - diff --git a/appserver/tests/hk2/cdi/jersey/runner/pom.xml b/appserver/tests/hk2/cdi/jersey/runner/pom.xml deleted file mode 100644 index 90bfe432283..00000000000 --- a/appserver/tests/hk2/cdi/jersey/runner/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - jersey - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.jersey - runner - - HK2 CDI Jersey Test Runner - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${glassfish.home} - ${source.home} - - - - - - - - - org.glassfish.tests.hk2.cdi.jersey - jersey-cdi - ${project.version} - war - test - - - org.testng - testng - 6.5.2 - test - - - org.glassfish.main.tests - utils-ng - ${project.version} - test - - - org.glassfish.main.appclient - gf-client - ${project.version} - test - - - diff --git a/appserver/tests/hk2/cdi/jersey/runner/src/main/java/com/oracle/hk2/devtest/Dummy.java b/appserver/tests/hk2/cdi/jersey/runner/src/main/java/com/oracle/hk2/devtest/Dummy.java deleted file mode 100644 index 2db931f01d0..00000000000 --- a/appserver/tests/hk2/cdi/jersey/runner/src/main/java/com/oracle/hk2/devtest/Dummy.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest; - -public class Dummy { -} diff --git a/appserver/tests/hk2/cdi/jersey/runner/src/test/java/com/sun/jersey/samples/jersey_cdi/test/JerseyTest.java b/appserver/tests/hk2/cdi/jersey/runner/src/test/java/com/sun/jersey/samples/jersey_cdi/test/JerseyTest.java deleted file mode 100644 index 72536d2bf72..00000000000 --- a/appserver/tests/hk2/cdi/jersey/runner/src/test/java/com/sun/jersey/samples/jersey_cdi/test/JerseyTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.sun.jersey.samples.jersey_cdi.test; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.glassfish.tests.utils.NucleusStartStopTest; -import org.glassfish.tests.utils.NucleusTestUtils; -import org.testng.Assert; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -/** - * @author jwells - * - */ -public class JerseyTest extends NucleusStartStopTest { - private final static String SOURCE_HOME = System.getProperty("source.home", "$"); - private final static String JERSEY_WAR = "cdi/jersey/war/target/jersey-cdi.war"; - private final static String SOURCE_HOME_WAR = "/appserver/tests/hk2/" + JERSEY_WAR; - private final static String JERSEY_WAR_APP_NAME = "jersey-cdi"; - - private boolean deployed1; - private Context context; - - @BeforeTest - public void beforeTest() throws NamingException { - context = new InitialContext(); - - String jerseyWar = JERSEY_WAR; - if (!SOURCE_HOME.startsWith("$")) { - jerseyWar = SOURCE_HOME + SOURCE_HOME_WAR; - } - - deployed1 = NucleusTestUtils.nadmin("deploy", jerseyWar); - Assert.assertTrue(deployed1); - } - - @AfterTest - public void afterTest() throws NamingException { - if (deployed1) { - NucleusTestUtils.nadmin("undeploy", JERSEY_WAR_APP_NAME); - deployed1 = false; - } - - if (context != null) { - context.close(); - context = null; - } - } - - @Test - public void testJustATest() { - } - -} diff --git a/appserver/tests/hk2/cdi/jersey/war/README.html b/appserver/tests/hk2/cdi/jersey/war/README.html deleted file mode 100644 index 1ff28763967..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/README.html +++ /dev/null @@ -1,126 +0,0 @@ - - -JCDI Beans WebApp Sample - - - -

    Jersey CDI Sample

    - -

    This example demonstrates how to develop RESTful web service with - JCDI managed beans and a Servlet 3.0 Web container.

    - -

    Running the Example

    - -

    This example currently works only with a standalone GlassFish 3.1.x instance. - The easiest way to get the application running is to use the GlassFish Update Center client, - install "Jersey examples and documentation" IPS module from there - and follow instructions at the module README file in order to deploy the example. - If you have already installed from the Update Center, the module readme file should be - accessible here - -

    After you successfully deploy the application, visit the following URLs:

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DescriptionURLExpected Results
    A managed bean with no use of injection whatsoeverhttp://localhost:8080/jersey-cdi/helloworldHello World
    Shows injection of context objects into the fields of a managed bean.http://localhost:8080/jersey-cdi/simpleOK GET http://localhost:8080/jersey-cdi/simple
    Shows injection of context objects and path parameters into the fields of a managed bean.http://localhost:8080/jersey-cdi/other/c/dOTHER c d
    Shows constructor injection of a path parameter in a managed bean.http://localhost:8080/jersey-cdi/echoconstructor/aECHO a
    Shows injection of path and query parameters into the fields of a managed bean.http://localhost:8080/jersey-cdi/echofield/bECHO null b
    A managed bean that uses (but does not inject) a path parameter.http://localhost:8080/jersey-cdi/echo/aECHO a
    Shows injection of context objects into the fields of a EJB Stateless Session bean.http://localhost:8080/jersey-cdi/ejb/stateless1
    Shows injection of query parameters into the fields of a managed bean.http://localhost:8080/jersey-cdi/jcdibean/per-requestnull1
    Shows injection of context objects into the fields of a managed bean.http://localhost:8080/jersey-cdi/jcdibean/singleton1
    Shows injection of context objects and query parameters into the fields of a managed bean.http://localhost:8080/jersey-cdi/jcdibean/dependent/per-requestnull1
    Shows injection of context objects into the fields of a managed bean.http://localhost:8080/jersey-cdi/jcdibean/dependent/singleton1
    -
    - - diff --git a/appserver/tests/hk2/cdi/jersey/war/nb-configuration.xml b/appserver/tests/hk2/cdi/jersey/war/nb-configuration.xml deleted file mode 100644 index 753016f3c69..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/nb-configuration.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - user - - diff --git a/appserver/tests/hk2/cdi/jersey/war/pom.xml b/appserver/tests/hk2/cdi/jersey/war/pom.xml deleted file mode 100644 index 55df949f0ba..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/pom.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2.cdi - jersey - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2.cdi.jersey - jersey-cdi - Jersey CDI - Jersey Sample - war - - - - test - - - skip-test - - true - - - true - - - - - - jakarta.ws.rs - jakarta.ws.rs-api - 2.0-m15 - provided - - - org.glassfish.hk2 - hk2-api - ${hk2.version} - provided - - - org.glassfish - javax.annotation - 3.1 - provided - - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - org.glassfish.jersey.test-framework.providers - jersey-test-framework-provider-bundle - pom - ${jersey.version} - test - - - org.glassfish.jersey.core - jersey-client - ${jersey.version} - test - - - org.glassfish.jersey.core - jersey-server - ${jersey.version} - test - - - - jersey-cdi - - - maven-compiler-plugin - true - - ${javase.version} - ${javase.version} - - - - org.glassfish.hk2 - hk2-inhabitant-generator - ${hk2.version} - - - - generate-inhabitants - - - application - true - - - - - - maven-surefire-plugin - - - - - 2.0-m12 - 2.1.59 - - diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/assembly/glassfish.xml b/appserver/tests/hk2/cdi/jersey/war/src/main/assembly/glassfish.xml deleted file mode 100644 index f922dd14bc5..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/assembly/glassfish.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - gf-project - - zip - - - - . - - true - - **/target/** - **/*jersey* - - - - - target/gf-pom-file - - - - diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/assembly/src.xml b/appserver/tests/hk2/cdi/jersey/war/src/main/assembly/src.xml deleted file mode 100644 index ce7831f6b7c..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/assembly/src.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - project - - zip - - - - . - - true - - **/target/** - **/*jersey* - - - - diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamConstructorResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamConstructorResource.java deleted file mode 100644 index a73aefa5168..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamConstructorResource.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import javax.annotation.ManagedBean; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; - -/** - * Shows constructor injection of a path parameter in a managed bean. - * - * @author robc - */ -@ManagedBean -@RequestScoped -@Path("echoconstructor/{a}") -public class EchoParamConstructorResource { - - public EchoParamConstructorResource() {} - - @Inject - public EchoParamConstructorResource(@PathParam("a") String a) { - this.a = a; - } - - @GET - @Produces("text/plain") - public String get() { - return "ECHO " + a; - } - - String a; -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamFieldResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamFieldResource.java deleted file mode 100644 index e106af7c957..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamFieldResource.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.util.List; -import java.util.Set; - -import javax.annotation.ManagedBean; - -import javax.ws.rs.DefaultValue; -import javax.ws.rs.Encoded; -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; - -/** - * Shows injection of path and query parameters into the fields of a managed bean. - * - * @author robc - */ -@ManagedBean -@Path("echofield/{b}") -public class EchoParamFieldResource { - - @GET - @Produces("text/plain") - public String get(@QueryParam("a") String a) { - return "ECHO " + a + " " + b; - } - - @PathParam("b") String b; - @QueryParam("a") String a; - @PathParam("b") Set bs; - @PathParam("b") List bl; - @PathParam("b") @Encoded String be; - @QueryParam("a") Set as; - @QueryParam("a") @Encoded String ae; - @QueryParam("a") @DefaultValue("boo") String ad; - @QueryParam("c") @DefaultValue("boo") String c; -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamResource.java deleted file mode 100644 index 87ec024c17c..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/EchoParamResource.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import javax.annotation.ManagedBean; -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; - -/** - * A managed bean that uses (but does not inject) a path parameter. - * - * @author robc - */ -@ManagedBean -@Path("echo/{a}") -public class EchoParamResource { - - @GET - @Produces("text/plain") - public String get(@PathParam("a") String param) { - return "ECHO " + param; - } -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/FormBean.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/FormBean.java deleted file mode 100644 index 6f950b88679..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/FormBean.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.math.BigDecimal; -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.FormParam; - -/** - * - * @author Paul.Sandoz@Oracle.Com - */ -@RequestScoped -public class FormBean { - - @FormParam("x") BigDecimal x; - - @DefaultValue("1") @FormParam("y") BigDecimal y; - - // Getter methods are required because this bean will be proxied - // (@RequestScoped) so any reference accessing the fields directly will - // not obtain the correct values - - public BigDecimal getX() { - return x; - } - - public BigDecimal getY() { - return y; - } -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/FormResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/FormResource.java deleted file mode 100644 index 8d340122c63..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/FormResource.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.inject.Provider; -import javax.ws.rs.POST; -import javax.ws.rs.Path; - -/** - * - * @author Paul.Sandoz@Oracle.Com - */ -@RequestScoped -@Path("/form") -public class FormResource { - - // Delay instantiation until required by POST method - // as form parameters will not make sense if other HTTP methods are - // also declared - @Inject Provider pfb; - - // Ideally we need to support @Inject on resource/sub-resource and - // sub-resource locator methods - @POST - public String post() { - FormBean fb = pfb.get(); - return fb.getX().add(fb.getY()).toString(); - } -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/HelloWorldResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/HelloWorldResource.java deleted file mode 100644 index 4c8cd2d16ae..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/HelloWorldResource.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import javax.annotation.ManagedBean; -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; - -/** - * A managed bean with no use of injection whatsoever. - * - * @author robc - */ -@ManagedBean -@Path("/helloworld") -public class HelloWorldResource { - - @GET - @Produces("text/plain") - public String getClichedMessage() { - return "Hello World"; - } -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentExceptionMapper.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentExceptionMapper.java deleted file mode 100644 index 2ea53d04dc7..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentExceptionMapper.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.annotation.ManagedBean; -import javax.annotation.PostConstruct; - -import javax.ws.rs.container.ResourceContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; -import javax.ws.rs.ext.ExceptionMapper; -import javax.ws.rs.ext.Provider; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Provider -@ManagedBean -public class JCDIBeanDependentExceptionMapper implements ExceptionMapper { - - // TODO: this should be using proxiable injection support - private @Context javax.inject.Provider uiFieldInjectProvider; - - // TODO: this should be using proxiable injection support - private @Context javax.inject.Provider rcProvider; - - private UriInfo uiMethodInject; - - @Context - public void set(UriInfo ui) { - this.uiMethodInject = ui; - } - - @PostConstruct - public void postConstruct() { - Logger.getLogger(JCDIBeanDependentExceptionMapper.class.getName()).log(Level.INFO, - "In post construct " + this); - - if (uiFieldInjectProvider.get() == null || uiMethodInject == null || rcProvider.get() == null) { - throw new IllegalStateException(); - } - } - - - @Override - public Response toResponse(JDCIBeanDependentException exception) { - - if (uiFieldInjectProvider.get() == null || uiMethodInject == null || rcProvider.get() == null) { - throw new IllegalStateException(); - } - - return Response.serverError().entity("JDCIBeanDependentException").build(); - } -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentPerRequestResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentPerRequestResource.java deleted file mode 100644 index e1b51ecf9b8..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentPerRequestResource.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.annotation.ManagedBean; -import javax.annotation.Resource; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; - -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.QueryParam; -import javax.ws.rs.container.ResourceContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.UriInfo; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Path("/jcdibean/dependent/per-request") -@ManagedBean -public class JCDIBeanDependentPerRequestResource { - - private @Resource(name="injectedResource") int injectedResource = 0; - - private @Context UriInfo uiFieldInject; - - private @Context ResourceContext rc; - - private @QueryParam("x") String x; - - private UriInfo uiMethodInject; - - @Context - public void set(UriInfo ui) { - this.uiMethodInject = ui; - } - - @PostConstruct - public void postConstruct() { - Logger.getLogger(JCDIBeanDependentPerRequestResource.class.getName()).log(Level.INFO, - "In post construct " + this + - "; uiFieldInject: " + uiFieldInject + "; uiMethodInject: " + uiMethodInject); - - if (uiFieldInject == null || uiMethodInject == null || rc == null) - throw new IllegalStateException(); - } - - @GET - @Produces("text/plain") - public String getMessage() { - Logger.getLogger(JCDIBeanDependentPerRequestResource.class.getName()).log(Level.INFO, - "In getMessage " + this + - "; uiFieldInject: " + uiFieldInject + "; uiMethodInject: " + uiMethodInject); - - if (uiFieldInject == null || uiMethodInject == null || rc == null) - throw new IllegalStateException(); - - return x + injectedResource++; - } - - @PreDestroy - public void preDestroy() { - Logger.getLogger(JCDIBeanDependentPerRequestResource.class.getName()).log(Level.INFO, "In pre destroy"); - } -} \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentSingletonResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentSingletonResource.java deleted file mode 100644 index 509bb3c0efb..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanDependentSingletonResource.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.annotation.ManagedBean; -import javax.annotation.Resource; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.enterprise.context.ApplicationScoped; - -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.container.ResourceContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.UriInfo; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Path("/jcdibean/dependent/singleton") -@ApplicationScoped -@ManagedBean -public class JCDIBeanDependentSingletonResource { - - private @Resource(name="injectedResource") int injectedResource = 0; - - // TODO: this should be using proxiable injection support - private @Context javax.inject.Provider uiFieldInjectProvider; - - // TODO: this should be using proxiable injection support - private @Context javax.inject.Provider rcProvider; - - private UriInfo uiMethodInject; - - @Context - public void set(UriInfo ui) { - this.uiMethodInject = ui; - } - - @PostConstruct - public void postConstruct() { - Logger.getLogger(JCDIBeanDependentSingletonResource.class.getName()).log(Level.INFO, - "In post construct " + this); - - if (uiFieldInjectProvider.get() == null || uiMethodInject == null || rcProvider.get() == null) { - throw new IllegalStateException(); - } - } - - @GET - @Produces("text/plain") - public String getMessage() { - Logger.getLogger(JCDIBeanDependentSingletonResource.class.getName()).log(Level.INFO, - "In getMessage " + this + - "; uiFieldInject: " + uiFieldInjectProvider.get() + "; uiMethodInject: " + uiMethodInject); - - if (uiFieldInjectProvider.get() == null || uiMethodInject == null || rcProvider.get() == null) { - throw new IllegalStateException(); - } - - return Integer.toString(injectedResource++); - } - - @Path("exception") - public String getException() { - throw new JDCIBeanDependentException(); - } - - @PreDestroy - public void preDestroy() { - Logger.getLogger(JCDIBeanDependentSingletonResource.class.getName()).log(Level.INFO, "In pre destroy " + this); - } -} \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanExceptionMapper.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanExceptionMapper.java deleted file mode 100644 index 64e12833fd7..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanExceptionMapper.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; - -import javax.ws.rs.container.ResourceContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; -import javax.ws.rs.ext.ExceptionMapper; -import javax.ws.rs.ext.Provider; - -/** - * - * @author paulsandoz - */ -@Provider -@ApplicationScoped -public class JCDIBeanExceptionMapper implements ExceptionMapper { - - private @Context UriInfo uiFieldInject; - - private @Context ResourceContext rc; - - private UriInfo uiMethodInject; - - @Context - public void set(UriInfo ui) { - this.uiMethodInject = ui; - } - - @PostConstruct - public void postConstruct() { - Logger.getLogger(JCDIBeanExceptionMapper.class.getName()).log(Level.INFO, - "In post construct " + this); - - if (uiFieldInject == null || uiMethodInject == null || rc == null) - throw new IllegalStateException(); - } - - public Response toResponse(JDCIBeanException exception) { - if (uiFieldInject == null || uiMethodInject == null || rc == null) - throw new IllegalStateException(); - - return Response.serverError().entity("JDCIBeanException").build(); - } - -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanPerRequestResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanPerRequestResource.java deleted file mode 100644 index 2246491a021..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanPerRequestResource.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.annotation.Resource; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.enterprise.context.RequestScoped; - -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.QueryParam; -import javax.ws.rs.container.ResourceContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.UriInfo; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Path("/jcdibean/per-request") -@RequestScoped -public class JCDIBeanPerRequestResource { - - private @Resource(name="injectedResource") int injectedResource = 0; - - private @Context UriInfo uiFieldInject; - - private @Context ResourceContext rc; - - private @QueryParam("x") String x; - - private UriInfo uiMethodInject; - - @Context - public void set(UriInfo ui) { - this.uiMethodInject = ui; - } - - @PostConstruct - public void postConstruct() { - Logger.getLogger(JCDIBeanPerRequestResource.class.getName()).log(Level.INFO, - "In post construct " + this + - "; uiFieldInject: " + uiFieldInject + "; uiMethodInject: " + uiMethodInject); - - if (uiFieldInject == null || uiMethodInject == null || rc == null) - throw new IllegalStateException(); - } - - @GET - @Produces("text/plain") - public String getMessage() { - Logger.getLogger(JCDIBeanPerRequestResource.class.getName()).log(Level.INFO, - "In getMessage " + this + - "; uiFieldInject: " + uiFieldInject + "; uiMethodInject: " + uiMethodInject); - - if (uiFieldInject == null || uiMethodInject == null || rc == null) - throw new IllegalStateException(); - - return x + injectedResource++; - } - - @PreDestroy - public void preDestroy() { - Logger.getLogger(JCDIBeanPerRequestResource.class.getName()).log(Level.INFO, "In pre destroy"); - } -} \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanSingletonResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanSingletonResource.java deleted file mode 100644 index 6fcf80c0d1f..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JCDIBeanSingletonResource.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.annotation.Resource; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.enterprise.context.ApplicationScoped; - -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.container.ResourceContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.UriInfo; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Path("/jcdibean/singleton") -@ApplicationScoped -public class JCDIBeanSingletonResource { - - private @Resource(name="injectedResource") int injectedResource = 0; - - // TODO: this should be using proxiable injection support - private @Context UriInfo uiFieldInjectProvider; - - // TODO: this should be using proxiable injection support - private @Context ResourceContext rcProvider; - - private UriInfo uiMethodInject; - - @Context - public void set(UriInfo ui) { - this.uiMethodInject = ui; - } - - @PostConstruct - public void postConstruct() { - Logger.getLogger(JCDIBeanSingletonResource.class.getName()).log(Level.INFO, - "In post construct " + this); - - if (uiFieldInjectProvider == null || uiMethodInject == null || rcProvider == null) { - throw new IllegalStateException(); - } - } - - @GET - @Produces("text/plain") - public String getMessage() { - Logger.getLogger(JCDIBeanSingletonResource.class.getName()).log(Level.INFO, - "In getMessage " + this + - "; uiFieldInject: " + uiFieldInjectProvider + "; uiMethodInject: " + uiMethodInject); - - if (uiFieldInjectProvider == null || uiMethodInject == null || rcProvider == null) { - throw new IllegalStateException(); - } - - return Integer.toString(injectedResource++); - } - - @Path("exception") - public String getException() { - throw new JDCIBeanException(); - } - - @PreDestroy - public void preDestroy() { - Logger.getLogger(JCDIBeanSingletonResource.class.getName()).log(Level.INFO, "In pre destroy " + this); - } -} \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JDCIBeanDependentException.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JDCIBeanDependentException.java deleted file mode 100644 index c9458441f99..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JDCIBeanDependentException.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -public class JDCIBeanDependentException extends RuntimeException { - -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JDCIBeanException.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JDCIBeanException.java deleted file mode 100644 index 947d2a93957..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JDCIBeanException.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -public class JDCIBeanException extends RuntimeException { - -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JerseyResolver.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JerseyResolver.java deleted file mode 100644 index 0179f292b4f..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/JerseyResolver.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import java.util.logging.Logger; -import javax.inject.Inject; -import org.glassfish.hk2.api.Injectee; -import org.glassfish.hk2.api.JustInTimeInjectionResolver; -import org.glassfish.hk2.api.ServiceLocator; -import org.jvnet.hk2.annotations.Service; - -/** - * CDI component provider. - * - * @author Jakub Podlesak (jakub.podlesak at oracle.com) - */ - -@Service -public final class JerseyResolver implements JustInTimeInjectionResolver { - - static final Logger LOGGER = Logger.getLogger(JerseyResolver.class.getName()); - - @Inject - ServiceLocator locator; - - @Override - public boolean justInTimeResolution(Injectee failedInjectionPoint) { - LOGGER.severe("failedInjectionPoint = " + failedInjectionPoint); - return false; - } -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MyApplication.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MyApplication.java deleted file mode 100644 index e28bad7c535..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MyApplication.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import org.glassfish.jersey.examples.jersey_cdi.resources.inherited.BaseResource; -import org.glassfish.jersey.examples.jersey_cdi.resources.inherited.ResourceA; -import org.glassfish.jersey.examples.jersey_cdi.resources.inherited.ResourceB; -import org.glassfish.jersey.examples.jersey_cdi.resources.inherited.ResourceC; - -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.core.Application; - -/** - * - * @author Jonathan Benoit - */ -public class MyApplication extends Application { - @Override - public Set> getClasses() { - final Set> classes = new HashSet>(); - // register root resource - classes.add(MySimpleResource.class); - classes.add(MyOtherResource.class); - classes.add(JDCIBeanException.class); - classes.add(JDCIBeanDependentException.class); - classes.add(JCDIBeanSingletonResource.class); - classes.add(JCDIBeanPerRequestResource.class); - classes.add(JCDIBeanExceptionMapper.class); - classes.add(JCDIBeanDependentSingletonResource.class); - classes.add(JCDIBeanDependentPerRequestResource.class); - classes.add(JCDIBeanDependentExceptionMapper.class); - classes.add(HelloWorldResource.class); - classes.add(FormResource.class); - classes.add(FormBean.class); - classes.add(EchoParamResource.class); - classes.add(EchoParamFieldResource.class); - classes.add(EchoParamConstructorResource.class); - classes.add(BaseResource.class); - classes.add(ResourceA.class); - classes.add(ResourceB.class); - classes.add(ResourceC.class); - return classes; - } -} \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MyOtherResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MyOtherResource.java deleted file mode 100644 index 48c5cd67ccd..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MyOtherResource.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import javax.annotation.ManagedBean; -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Request; -import javax.ws.rs.core.UriInfo; - -/** - * Shows injection of context objects and path parameters into the fields of a managed bean. - * - * @author robc - */ -@ManagedBean -@Path("/other/{c}/{d}") -public class MyOtherResource { - - @GET - @Produces("text/plain") - public String get() { - return "OTHER " + c + " " + d; - } - - @Context UriInfo uriInfo; - @Context Request request; - - @PathParam("c") String c; - @PathParam("d") String d; - -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MySimpleResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MySimpleResource.java deleted file mode 100644 index aeb60000cc2..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/MySimpleResource.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.jersey.examples.jersey_cdi.resources; - -import javax.annotation.ManagedBean; -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Request; -import javax.ws.rs.core.UriInfo; - -/** - * Shows injection of context objects into the fields of a managed bean. - * - * @author robc - */ -@ManagedBean -@Path("/simple") -public class MySimpleResource { - - @GET - @Produces("text/plain") - public String get() { - return "OK " + request.getMethod() + " " + uriInfo.getRequestUri(); - } - - @Context UriInfo uriInfo; - @Context Request request; -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/BaseResource.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/BaseResource.java deleted file mode 100644 index 3528d836022..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/BaseResource.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources.inherited; - -import javax.enterprise.context.RequestScoped; -import javax.enterprise.inject.spi.BeanManager; -import javax.inject.Inject; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.UriInfo; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Path("inherited/base") -@RequestScoped -public class BaseResource { - - @Inject BeanManager bm; - - @Context UriInfo ui; - - @GET - public String get() { - if (bm == null) { - throw new IllegalStateException(); - } - - return ui.getPath(); - } - -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceA.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceA.java deleted file mode 100644 index 26eb2792b34..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceA.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources.inherited; - -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.Path; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Path("inherited/a") -@RequestScoped -public class ResourceA extends BaseResource { -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceB.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceB.java deleted file mode 100644 index 6f3938d57c2..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceB.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources.inherited; - -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.Path; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Path("inherited/b") -@RequestScoped -public class ResourceB extends BaseResource { - -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceC.java b/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceC.java deleted file mode 100644 index 94c7dc58f48..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/java/org/glassfish/jersey/examples/jersey_cdi/resources/inherited/ResourceC.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * http://glassfish.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.jersey.examples.jersey_cdi.resources.inherited; - -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.Path; - -/** - * - * @author Paul.Sandoz@Sun.Com - */ -@Path("inherited/a/c") -@RequestScoped -public class ResourceC extends ResourceA { - -} diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/beans.xml b/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index a6ec1d1ac3a..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/beans.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/glassfish-web.xml b/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/glassfish-web.xml deleted file mode 100644 index ab4d710f733..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/glassfish-web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - /jersey-cdi - - - - Keep a copy of the generated servlet class' java code. - - - \ No newline at end of file diff --git a/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/web.xml b/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 019d180452e..00000000000 --- a/appserver/tests/hk2/cdi/jersey/war/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - injectedResource - java.lang.Integer - 1 - - diff --git a/appserver/tests/hk2/cdi/pom.xml b/appserver/tests/hk2/cdi/pom.xml deleted file mode 100755 index 51db7dcbc99..00000000000 --- a/appserver/tests/hk2/cdi/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests - hk2 - 4.1-SNAPSHOT - - - org.glassfish.tests.hk2 - cdi - pom - - GlassFish HK2 CDI Tests - - basic - ear - - diff --git a/appserver/tests/hk2/isolation/pom.xml b/appserver/tests/hk2/isolation/pom.xml deleted file mode 100755 index c2c7b5c0dfe..00000000000 --- a/appserver/tests/hk2/isolation/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests - hk2 - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.hk2 - isolation - pom - 4.1-SNAPSHOT - - GlassFish HK2 Isolation Tests - - web - runner - - diff --git a/appserver/tests/hk2/isolation/runner/pom.xml b/appserver/tests/hk2/isolation/runner/pom.xml deleted file mode 100755 index 2c36b7f5040..00000000000 --- a/appserver/tests/hk2/isolation/runner/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2 - isolation - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.hk2.isolation - runner - 4.1-SNAPSHOT - - GlassFish HK2 Isolation Test Runner - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${glassfish.home} - - - - - - - - - org.glassfish.tests.hk2.isolation.web - iso1 - ${project.version} - war - - - org.glassfish.tests.hk2.isolation.web - iso2 - ${project.version} - war - - - org.testng - testng - 6.5.2 - test - - - org.glassfish.main.tests - utils-ng - ${project.version} - test - - - diff --git a/appserver/tests/hk2/isolation/runner/src/main/java/com/oracle/hk2/devtest/isolation/runner/dummy/Dummy.java b/appserver/tests/hk2/isolation/runner/src/main/java/com/oracle/hk2/devtest/isolation/runner/dummy/Dummy.java deleted file mode 100644 index f38df7fb4f6..00000000000 --- a/appserver/tests/hk2/isolation/runner/src/main/java/com/oracle/hk2/devtest/isolation/runner/dummy/Dummy.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.isolation.runner.dummy; - -/** - * Only here to make maven happy - * - * @author jwells - * - */ -public class Dummy { -} diff --git a/appserver/tests/hk2/isolation/runner/src/test/java/com/oracle/hk2/devtest/isolation/runner/IsolationTest.java b/appserver/tests/hk2/isolation/runner/src/test/java/com/oracle/hk2/devtest/isolation/runner/IsolationTest.java deleted file mode 100644 index 706fc023270..00000000000 --- a/appserver/tests/hk2/isolation/runner/src/test/java/com/oracle/hk2/devtest/isolation/runner/IsolationTest.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.isolation.runner; - -import java.util.HashMap; -import java.util.Map; -import java.util.StringTokenizer; - -import org.glassfish.tests.utils.NucleusStartStopTest; -import org.glassfish.tests.utils.NucleusTestUtils; -import org.testng.Assert; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -/** - * Ensures that different apps get different service locators - * - * @author jwells - * - */ -public class IsolationTest extends NucleusStartStopTest { - private final static String ISO1_WAR = "isolation/web/iso1/target/hk2-isolation-web-iso1.war"; - private final static String ISO1_APP_NAME = "hk2-isolation-web-iso1"; - private final static String ISO1_URL = "http://localhost:8080/hk2-isolation-web-iso1/iso1"; - - private final static String ISO2_WAR = "isolation/web/iso2/target/hk2-isolation-web-iso2.war"; - private final static String ISO2_APP_NAME = "hk2-isolation-web-iso2"; - private final static String ISO2_URL = "http://localhost:8080/hk2-isolation-web-iso2/iso2"; - - private final static String SOURCE_HOME = System.getProperty("source.home", "$"); - private final static String SOURCE_HOME_ISO1_WAR = "/appserver/tests/hk2/" + ISO1_WAR; - private final static String SOURCE_HOME_ISO2_WAR = "/appserver/tests/hk2/" + ISO2_WAR; - - private static final String SERVLET_CONTEXT_LOCATOR = "ServletContextLocator"; - private static final String JNDI_APP_LOCATOR = "JndiAppLocator"; - - private boolean deployed1; - private boolean deployed2; - - private Map getNames(String rawHTML) { - Map retVal = new HashMap(); - - StringTokenizer st = new StringTokenizer(rawHTML, "\n"); - while (st.hasMoreTokens()) { - String line = st.nextToken(); - - int equalsIndex = line.indexOf('='); - if (equalsIndex < 0) continue; // Skip lines that do not have = in it - - String key = line.substring(0, equalsIndex); - String value = line.substring(equalsIndex + 1, line.length()); - - retVal.put(key, value); - } - - return retVal; - } - - private String getName(String rawHTML, String key) { - Map names = getNames(rawHTML); - - return names.get(key); - } - - @BeforeTest - public void beforeTest() { - String iso1War = ISO1_WAR; - String iso2War = ISO2_WAR; - - if (!SOURCE_HOME.startsWith("$")) { - iso1War = SOURCE_HOME + SOURCE_HOME_ISO1_WAR; - iso2War = SOURCE_HOME + SOURCE_HOME_ISO2_WAR; - } - - deployed1 = NucleusTestUtils.nadmin("deploy", iso1War); - deployed2 = NucleusTestUtils.nadmin("deploy", iso2War); - - Assert.assertTrue(deployed1); - Assert.assertTrue(deployed2); - } - - @AfterTest - public void afterTest() { - if (deployed1) { - deployed1 = false; - NucleusTestUtils.nadmin("undeploy", ISO1_APP_NAME); - } - if (deployed2) { - deployed2 = false; - NucleusTestUtils.nadmin("undeploy", ISO2_APP_NAME); - } - } - - /** - * Ensures that the service locators in two web-apps are different - */ - @Test(enabled=false) - public void testWebAppsAreIsolated() { - String fromURL1 = NucleusTestUtils.getURL(ISO1_URL); - String fromURL2 = NucleusTestUtils.getURL(ISO2_URL); - - String iso1Name = getName(fromURL1, SERVLET_CONTEXT_LOCATOR); - String iso2Name = getName(fromURL2, SERVLET_CONTEXT_LOCATOR); - - Assert.assertNotEquals(iso1Name, iso2Name); - } - - /** - * Ensures that the application service locators in two web-apps are different - */ - @Test - public void testWebAppsApplicationServiceLocatorsAreIsolated() { - String fromURL1 = NucleusTestUtils.getURL(ISO1_URL); - String fromURL2 = NucleusTestUtils.getURL(ISO2_URL); - - String iso1Name = getName(fromURL1, JNDI_APP_LOCATOR); - String iso2Name = getName(fromURL2, JNDI_APP_LOCATOR); - - Assert.assertNotEquals(iso1Name, iso2Name); - } -} diff --git a/appserver/tests/hk2/isolation/web/iso1/pom.xml b/appserver/tests/hk2/isolation/web/iso1/pom.xml deleted file mode 100644 index f2e1e9babc5..00000000000 --- a/appserver/tests/hk2/isolation/web/iso1/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2.isolation - web - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.hk2.isolation.web - iso1 - 4.1-SNAPSHOT - war - - Isolation servlet one - - hk2-isolation-web-${project.artifactId} - - - org.apache.maven.plugins - maven-war-plugin - - - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - org.glassfish.hk2 - hk2 - provided - - - diff --git a/appserver/tests/hk2/isolation/web/iso1/src/main/java/com/oracle/hk2/devtest/isolation/web/iso1/Iso1Servlet.java b/appserver/tests/hk2/isolation/web/iso1/src/main/java/com/oracle/hk2/devtest/isolation/web/iso1/Iso1Servlet.java deleted file mode 100644 index f863fa8911d..00000000000 --- a/appserver/tests/hk2/isolation/web/iso1/src/main/java/com/oracle/hk2/devtest/isolation/web/iso1/Iso1Servlet.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.isolation.web.iso1; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.glassfish.hk2.api.ServiceLocator; - -/** - * Simple returns the name of the HABITAT property - * - * @author jwells - */ -public class Iso1Servlet extends HttpServlet { - /** - * For serialization - */ - private static final long serialVersionUID = -9177540431267005946L; - - private static final String HABITAT_ATTRIBUTE = "org.glassfish.servlet.habitat"; - private static final String JNDI_APP_LOOKUP = "java:app/hk2/ServiceLocator"; - - private static final String SERVLET_CONTEXT_LOCATOR = "ServletContextLocator="; - private static final String JNDI_APP_LOCATOR = "JndiAppLocator="; - - private String getJndiAppLocatorName() { - - try { - Context context = new InitialContext(); - - ServiceLocator retVal = (ServiceLocator) context.lookup(JNDI_APP_LOOKUP); - - return retVal.getName(); - } - catch (NamingException ne) { - return null; - } - } - - /** - * Just prints out the value of the ServiceLocator getName - */ - @Override - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - - ServletContext context = getServletContext(); - - ServiceLocator locator = (ServiceLocator) context.getAttribute(HABITAT_ATTRIBUTE); - - String reply1 = SERVLET_CONTEXT_LOCATOR + ((locator == null) ? "null" : locator.getName()); - - String jndiAppLocatorName = getJndiAppLocatorName(); - String reply2 = JNDI_APP_LOCATOR + ((jndiAppLocatorName == null) ? "null" : jndiAppLocatorName); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Iso1 WebApp"); - writer.println(""); - writer.println(""); - - writer.println(reply1); - writer.println(reply2); - - writer.println(""); - writer.println(""); - } -} diff --git a/appserver/tests/hk2/isolation/web/iso1/src/main/webapp/WEB-INF/web.xml b/appserver/tests/hk2/isolation/web/iso1/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 756d7be0669..00000000000 --- a/appserver/tests/hk2/isolation/web/iso1/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - iso1 - iso1 - com.oracle.hk2.devtest.isolation.web.iso1.Iso1Servlet - - - - iso1 - /iso1 - - - diff --git a/appserver/tests/hk2/isolation/web/iso2/pom.xml b/appserver/tests/hk2/isolation/web/iso2/pom.xml deleted file mode 100644 index 35aefffc20a..00000000000 --- a/appserver/tests/hk2/isolation/web/iso2/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - 4.0.0 - - org.glassfish.tests.hk2.isolation - web - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.hk2.isolation.web - iso2 - 4.1-SNAPSHOT - war - - Isolation servlet two - - hk2-isolation-web-${project.artifactId} - - - org.apache.maven.plugins - maven-war-plugin - - - - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api.version} - provided - - - org.glassfish.hk2 - hk2 - provided - - - diff --git a/appserver/tests/hk2/isolation/web/iso2/src/main/java/com/oracle/hk2/devtest/isolation/web/iso2/Iso2Servlet.java b/appserver/tests/hk2/isolation/web/iso2/src/main/java/com/oracle/hk2/devtest/isolation/web/iso2/Iso2Servlet.java deleted file mode 100644 index 2f1d46cca69..00000000000 --- a/appserver/tests/hk2/isolation/web/iso2/src/main/java/com/oracle/hk2/devtest/isolation/web/iso2/Iso2Servlet.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.oracle.hk2.devtest.isolation.web.iso2; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.glassfish.hk2.api.ServiceLocator; - -/** - * Simple returns the name of the HABITAT property - * - * @author jwells - */ -public class Iso2Servlet extends HttpServlet { - /** - * For serialization - */ - private static final long serialVersionUID = -9177540431267005946L; - - private static final String HABITAT_ATTRIBUTE = "org.glassfish.servlet.habitat"; - private static final String JNDI_APP_LOOKUP = "java:app/hk2/ServiceLocator"; - - private static final String SERVLET_CONTEXT_LOCATOR = "ServletContextLocator="; - private static final String JNDI_APP_LOCATOR = "JndiAppLocator="; - - private String getJndiAppLocatorName() { - - try { - Context context = new InitialContext(); - - ServiceLocator retVal = (ServiceLocator) context.lookup(JNDI_APP_LOOKUP); - - return retVal.getName(); - } - catch (NamingException ne) { - return null; - } - } - - /** - * Just prints out the value of the ServiceLocator getName - */ - @Override - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - ServletContext context = getServletContext(); - - ServiceLocator locator = (ServiceLocator) context.getAttribute(HABITAT_ATTRIBUTE); - - String reply1 = SERVLET_CONTEXT_LOCATOR + ((locator == null) ? "null" : locator.getName()); - - String jndiAppLocatorName = getJndiAppLocatorName(); - String reply2 = JNDI_APP_LOCATOR + ((jndiAppLocatorName == null) ? "null" : jndiAppLocatorName); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Iso2 WebApp"); - writer.println(""); - writer.println(""); - - writer.println(reply1); - writer.println(reply2); - - writer.println(""); - writer.println(""); - } -} diff --git a/appserver/tests/hk2/isolation/web/iso2/src/main/webapp/WEB-INF/web.xml b/appserver/tests/hk2/isolation/web/iso2/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 4797adf811b..00000000000 --- a/appserver/tests/hk2/isolation/web/iso2/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - iso2 - iso2 - com.oracle.hk2.devtest.isolation.web.iso2.Iso2Servlet - - - - iso2 - /iso2 - - - diff --git a/appserver/tests/hk2/isolation/web/pom.xml b/appserver/tests/hk2/isolation/web/pom.xml deleted file mode 100755 index 83df95a075a..00000000000 --- a/appserver/tests/hk2/isolation/web/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.tests.hk2 - isolation - 4.1-SNAPSHOT - ../pom.xml - - - org.glassfish.tests.hk2.isolation - web - pom - 4.1-SNAPSHOT - - GlassFish HK2 Isolation WebApps - - iso1 - iso2 - - diff --git a/appserver/tests/hk2/pom.xml b/appserver/tests/hk2/pom.xml deleted file mode 100755 index 54140c64801..00000000000 --- a/appserver/tests/hk2/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - 4.0.0 - - org.glassfish.main.tests - tests - 4.1-SNAPSHOT - - - org.glassfish.tests - hk2 - pom - - GlassFish HK2 Tests - - isolation - cdi - - diff --git a/appserver/tests/jbi/README b/appserver/tests/jbi/README deleted file mode 100644 index 2fe655a04b5..00000000000 --- a/appserver/tests/jbi/README +++ /dev/null @@ -1,7 +0,0 @@ -Running Devtests for javaee service engine. - -1. Set the environment variable S1AS_HOME to GlassFish-v3 installation directory. -2. Set the environment variable APS_HOME the GlassFish workspace tests directory. -3. Run ant setup. -4. Start the domain. -5. Run ant all. diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/README b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/README deleted file mode 100644 index d6829442a2f..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/README +++ /dev/null @@ -1,11 +0,0 @@ -This is a test case to test Bare Doc/Literal style operations. - -The test case uses: ------------------- - -HTTP SOAP BC as the consumer. - -Java EE Service Engine as the provider. - -client <----> HTTP SOAP BC <-----NMR------> JavaEE SE <------> webservice - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/build.properties b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/build.properties deleted file mode 100644 index 0224164c59d..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/build.properties +++ /dev/null @@ -1,51 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/build.xml b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/build.xml deleted file mode 100644 index 7b7edd42a2d..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/build.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/client/SOAPWebConsumer.java b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/client/SOAPWebConsumer.java deleted file mode 100644 index 583a07f5a3a..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/client/SOAPWebConsumer.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; -import javax.xml.ws.WebServiceRef; -import javax.xml.ws.Service; -import javax.xml.ws.BindingProvider; -import com.example.calculator.CalculatorService; -import com.example.calculator.Calculator; -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class SOAPWebConsumer { - // @WebServiceRef(wsdlLocation="http://localhost:8080/bare_doc_literal-bc_consumer_se_provider/webservice/CalculatorService?WSDL") -// static CalculatorService service; - CalculatorService service = new CalculatorService(); - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String testId = "jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider"; - public static void main (String[] args) { - stat.addDescription(testId); - SOAPWebConsumer client = new SOAPWebConsumer(); - client.addUsingSOAPConsumer(); - stat.printSummary(testId); - } - - private void addUsingSOAPConsumer() { - com.example.calculator.Calculator port= null; - try { - - System.out.println(" After creating CalculatorService"); - - port = service.getCalculatorPort(); - System.out.println(" After getting port"); - - // Get Stub - BindingProvider stub = (BindingProvider)port; - String endpointURI ="http://localhost:12011/calculatorendpoint"; - stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - endpointURI); - System.out.println(" After setting endpoint address URI"); - System.out.println(" Using SOAP binding's consumer to add 500 + 50 = " + port.add(50)); - stat.addStatus(testId, stat.PASS); - System.out.println(" No Exception thrown"); - - } catch(Exception e) { - //e.printStackTrace(); - if(e instanceof javax.xml.ws.soap.SOAPFaultException) - stat.addStatus(testId, stat.FAIL); - else { - stat.addStatus(testId, stat.FAIL); - System.out.println(" SOAPFaultException Not thrown"); - } - } - } -} diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 3cd22a36704..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Provider - - - - dummy_client_su - provider service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 1f3626ab3b1..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/endpoint/Calculator.java b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/endpoint/Calculator.java deleted file mode 100644 index 42df6d4209d..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/endpoint/Calculator.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.*; -import javax.jws.soap.SOAPBinding; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.com/Calculator" -) -@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) -public class Calculator { - public Calculator() {} - - @WebMethod - public int add( - @WebParam(name = "number1", targetNamespace = "http://example.com/Calculator", partName = "part1") - int j - ) throws Exception { - int i = 500; - int k = i +j ; - System.out.println("JBI Test :: bare-rpc-literal bc_consumer_se_provider : " + i + "+" + j +" = " + k); - return k; - } -} diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml deleted file mode 100644 index 73a641a5db2..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - consumer_for_web_calculator - consumer service to the soap binding - - - web_calculator_consumer_su.jar - sun-http-binding - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl deleted file mode 100644 index 873fa91e01e..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd deleted file mode 100644 index d74287cf0d8..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml deleted file mode 100644 index fdb58a42e03..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/endpoints.xml deleted file mode 100644 index a3fa169c46c..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/web.xml b/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/bc_consumer_se_provider/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/build.xml b/appserver/tests/jbi/bare_doc_literal/build.xml deleted file mode 100644 index 11bd61fa203..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - -]> - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/README b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/README deleted file mode 100644 index b993cc4372f..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/README +++ /dev/null @@ -1,11 +0,0 @@ -This is a test case to test Bare Doc/Literal style operations. - -The test case uses: ------------------- - -Java EE Service Engine as the consumer. - -Java EE Service Engine as the provider. - -client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/build.properties b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/build.properties deleted file mode 100644 index 4c230a89c56..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/build.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/build.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/build.xml deleted file mode 100644 index bf77da1d5cb..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/build.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-jbi.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-jbi.xml deleted file mode 100644 index 5943897b35d..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-sun-web.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-web.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client/TestClient.java b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client/TestClient.java deleted file mode 100644 index 7e8d3368b27..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/client/TestClient.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/bare_doc_literal/se_consumer_se_provider"; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - StringBuilder buffer = new StringBuilder(); - String line = null; - boolean found = false; - while ((line = input.readLine()) != null) { - if(line.indexOf("SUCCESS") != -1) found = true; - buffer.append(line + "\n"); - } - log(buffer.toString()); - if(!found) return 505; - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/common/IncomeTaxDetails.java b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/common/IncomeTaxDetails.java deleted file mode 100644 index 999eef145e2..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/common/IncomeTaxDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package common; - -public class IncomeTaxDetails { - public String firstName; - public String lastName; - public String status; // salaried, self-employed, student. - public long annualIncome; -} - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 3cd22a36704..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Provider - - - - dummy_client_su - provider service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 1dd5a062e00..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/endpoint/Calculator.java b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/endpoint/Calculator.java deleted file mode 100644 index afee9d38fde..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/endpoint/Calculator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.*; -import common.IncomeTaxDetails; -import java.util.Hashtable; -import javax.jws.soap.SOAPBinding; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator" -) -@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) -public class Calculator { - public Calculator() {} - - @WebMethod - public int add( - /* - @WebParam(name = "number1", targetNamespace = "http://example.web.service/Calculator", partName = "part1") - int i , */ - @WebParam(name = "number2", targetNamespace = "http://example.web.service/Calculator", partName = "part2") - int j - ) throws Exception { - int i = 50; - int k = i +j ; - System.out.println("JBI Test :: bare-rpc-literal se_consumer_se_provider : " + i + "+" + j +" = " + k); - return k; - } - -} diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/sun-web.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/web.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/client/Client.java b/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/client/Client.java deleted file mode 100644 index 052d1ea22c9..00000000000 --- a/appserver/tests/jbi/bare_doc_literal/se_consumer_se_provider/webclient/client/Client.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.calculator.*; -//import common.IncomeTaxDetails; -//import java.util.Hashtable; - -public class Client extends HttpServlet { - - @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service; - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - PrintWriter out=null; - try { - System.out.println(" Service is :" + service); - resp.setContentType("text/html"); - out = resp.getWriter(); - Calculator port = service.getCalculatorPort(); - - int k = port.add(505); - printSuccess("SUCCESS :: Sum of 505 and 50 is : ", out,k); - - - } catch(java.lang.Exception e) { - //e.printStackTrace(); - printFailure(out, e.getMessage()); - } finally { - if(out != null) { - out.flush(); - out.close(); - } - } - } - - public void printFailure(PrintWriter out, String errMsg) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Test FAILED: Error message - " + errMsg); - out.println("

    "); - out.println(""); - out.println(""); - } - - public void printSuccess(String message, PrintWriter out, long result) { - if(out == null) return; - out.println("\n\n"); - out.println(message + result); - } - - public void printSuccess(String message, PrintWriter out, String result) { - if(out == null) return; - out.println("\n\n"); - out.println(message + result); - } -} - diff --git a/appserver/tests/jbi/build.xml b/appserver/tests/jbi/build.xml deleted file mode 100644 index 68bde86c6e3..00000000000 --- a/appserver/tests/jbi/build.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - -]> - - - &commonBuild; - &commonProperties; - &reporting; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/client/build.xml b/appserver/tests/jbi/client/build.xml deleted file mode 100644 index 564f39900a2..00000000000 --- a/appserver/tests/jbi/client/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - -]> - - - - - - - - diff --git a/appserver/tests/jbi/client/web/build.properties b/appserver/tests/jbi/client/web/build.properties deleted file mode 100644 index 654c33e53c8..00000000000 --- a/appserver/tests/jbi/client/web/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/client/web/build.xml b/appserver/tests/jbi/client/web/build.xml deleted file mode 100644 index 0927c926fdd..00000000000 --- a/appserver/tests/jbi/client/web/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/client/web/client-jbi.xml b/appserver/tests/jbi/client/web/client-jbi.xml deleted file mode 100644 index a6882f2bd99..00000000000 --- a/appserver/tests/jbi/client/web/client-jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/client/web/client-sun-web.xml b/appserver/tests/jbi/client/web/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/client/web/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/client/web/client-web.xml b/appserver/tests/jbi/client/web/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/client/web/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/client/web/client/TestClient.java b/appserver/tests/jbi/client/web/client/TestClient.java deleted file mode 100644 index f253b7b29dd..00000000000 --- a/appserver/tests/jbi/client/web/client/TestClient.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String testId = "jbi-serviceengine/client/web"; - - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF Calculator add SERVICE IS") != -1) - found1 = true; - if(line.indexOf("[3]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/client/web/endpoint/Calculator.java b/appserver/tests/jbi/client/web/endpoint/Calculator.java deleted file mode 100644 index f721c6af012..00000000000 --- a/appserver/tests/jbi/client/web/endpoint/Calculator.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator" -) -public class Calculator { - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - - return k; - } -} diff --git a/appserver/tests/jbi/client/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/jbi/client/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml deleted file mode 100644 index 6dbbc1edcc0..00000000000 --- a/appserver/tests/jbi/client/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - client_web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - client_consumer_for_web_calculator - consumer service to the soap binding - - - client_web_calculator_consumer_su.jar - sun-http-binding - - - - diff --git a/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/CalculatorService.wsdl deleted file mode 100644 index a784d832323..00000000000 --- a/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/CalculatorService.wsdl +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd deleted file mode 100644 index c9b4b06f2ef..00000000000 --- a/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/META-INF/jbi.xml deleted file mode 100644 index abd27971d8e..00000000000 --- a/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/META-INF/jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/endpoints.xml deleted file mode 100644 index 9ea3dd41920..00000000000 --- a/appserver/tests/jbi/client/web/soap-binding-su-alaska/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/client/web/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/client/web/soap-binding-su/assembly/META-INF/jbi.xml deleted file mode 100644 index c9e3bb33220..00000000000 --- a/appserver/tests/jbi/client/web/soap-binding-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - client_web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - client_consumer_for_web_calculator - consumer service to the soap binding - - - client_web_calculator_consumer_su.jar - SunSOAPBinding - - - - diff --git a/appserver/tests/jbi/client/web/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/jbi/client/web/soap-binding-su/su/META-INF/jbi.xml deleted file mode 100644 index 52a5016a962..00000000000 --- a/appserver/tests/jbi/client/web/soap-binding-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/client/web/soap-binding-su/su/endpoints.xml b/appserver/tests/jbi/client/web/soap-binding-su/su/endpoints.xml deleted file mode 100644 index 3b5c84ec943..00000000000 --- a/appserver/tests/jbi/client/web/soap-binding-su/su/endpoints.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - http://example.web.service/Calculator - CalculatorService - - CalculatorPort - provider - http://localhost:8080/jsr208-integration-web-client/webservice/CalculatorService - - - add - http://www.w3.org/2004/08/wsdl/in-out - "" - - http://example.web.service/Calculator - - - http://example.web.service/Calculator - - - diff --git a/appserver/tests/jbi/client/web/sun-web.xml b/appserver/tests/jbi/client/web/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/client/web/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/client/web/web.xml b/appserver/tests/jbi/client/web/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/client/web/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/client/web/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/client/web/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/client/web/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/client/web/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/client/web/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/client/web/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/client/web/webclient/client/Client.java b/appserver/tests/jbi/client/web/webclient/client/Client.java deleted file mode 100644 index 4199764a827..00000000000 --- a/appserver/tests/jbi/client/web/webclient/client/Client.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.calculator.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service; - CalculatorService service = new CalculatorService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - try { - System.out.println(" Service is :" + service); - Calculator port = service.getCalculatorPort(); - int ret = port.add(1, 2); - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF Calculator add SERVICE IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - out.flush(); - out.close(); - } catch(Exception e) { - e.printStackTrace(); - } - } -} - diff --git a/appserver/tests/jbi/config/common.properties b/appserver/tests/jbi/config/common.properties deleted file mode 100644 index 7741a8e67f2..00000000000 --- a/appserver/tests/jbi/config/common.properties +++ /dev/null @@ -1,55 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/config/common.xml b/appserver/tests/jbi/config/common.xml deleted file mode 100644 index ccece0f08e5..00000000000 --- a/appserver/tests/jbi/config/common.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -AS_ADMIN_USERPASSWORD= -AS_ADMIN_PASSWORD= -AS_ADMIN_ADMINPASSWORD= -AS_ADMIN_MASTERPASSWORD=${master.password} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/config/init-common.properties b/appserver/tests/jbi/config/init-common.properties deleted file mode 100644 index ef40b9ff9cd..00000000000 --- a/appserver/tests/jbi/config/init-common.properties +++ /dev/null @@ -1,44 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -sun-http-binding.jar=http://download.java.net/maven/open-esb/fuji/components/installers/sun-http-binding/1.0-M9-SNAPSHOT/sun-http-binding-1.0-M9-SNAPSHOT.jar -fuji-gf-container.jar=http://download.java.net/maven/open-esb/fuji/fuji-gf-container/1.0-M9-SNAPSHOT/fuji-gf-container-1.0-M9-SNAPSHOT.jar -sun-javaee-engine.jar=${env.APS_HOME}/../jbi/serviceengine/sun-javaee-engine/target/sun-javaee-engine.jar - diff --git a/appserver/tests/jbi/config/j2eeReporter.xsl b/appserver/tests/jbi/config/j2eeReporter.xsl deleted file mode 100644 index a814c474ab9..00000000000 --- a/appserver/tests/jbi/config/j2eeReporter.xsl +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - -  -This Test Suite has no description - -silver -red -yellow -0099CC - - - - - - GlassFish V3 Test Results - - - - - - - - -
    -
    -

    GlassFish V3 Test Result Report

    - -
    -
    - - -

    Execution Date:

    -
    - - - - - - - - - - - - - - - - - - - - -
    Configuration Information
    Machine Name
    OS
    JDK Version
    - - - - - - - - - - - -
    -
    -

    Summary Test Results

    - - - - - - - - - - - - - - - - - - - - - - - -
    ItemTotalPassFailDid Not Run
    Test Suites
    Test Cases
    - - - - -
    -
    -

    Detailed Results

    - - - - - - - - - - - - - - - - - - - - - - - -
    Test Suite Link Fail Count Pass Count Total Count
    - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Testsuite Number
    Testsuite Id
    Testsuite Name
    Testsuite Description
    Total Test Cases Run
    Total Test Cases Failed
    Total Test Cases Passed
    - - - - - - - - -
    Name Status
    -
    -

    - - [ Detailed Results | - Summary | - Top ] - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    diff --git a/appserver/tests/jbi/config/jaxwstools.xml b/appserver/tests/jbi/config/jaxwstools.xml deleted file mode 100644 index f46009cd2a7..00000000000 --- a/appserver/tests/jbi/config/jaxwstools.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/config/report.xml b/appserver/tests/jbi/config/report.xml deleted file mode 100644 index 80540e14999..00000000000 --- a/appserver/tests/jbi/config/report.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/config/resultCount.sh b/appserver/tests/jbi/config/resultCount.sh deleted file mode 100644 index 2b511fd613e..00000000000 --- a/appserver/tests/jbi/config/resultCount.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -FILE=$APS_HOME/jbi/test_resultsValid.xml -echo "input file=$FILE" - -TOTAL=21 -PASSED=`grep "pass" $FILE | wc -l` -FAILED=`grep "fail" $FILE | wc -l` -TOTAL_RUN=`expr $PASSED + $FAILED ` -DNR=`expr $TOTAL - $TOTAL_RUN` - -echo "" -echo "************************" -echo "PASSED= $PASSED" -echo "------------ =========" -echo "FAILED= $FAILED" -echo "------------ =========" -echo "DID NOT RUN= $DNR" -echo "------------ =========" -echo "Total Expected=$TOTAL" -echo "************************" -echo "" - -echo "************************">>$APS_HOME/jbi/count.txt; -date>>$APS_HOME/jbi/count.txt; -echo "-----------------------">>$APS_HOME/jbi/count.txt; -echo "PASSED= $PASSED">>$APS_HOME/jbi/count.txt; -echo "------------ =========">>$APS_HOME/jbi/count.txt; -echo "FAILED= $FAILED">>$APS_HOME/jbi/count.txt; -echo "------------ =========">>$APS_HOME/jbi/count.txt; -echo "DID NOT RUN= $DNR">>$APS_HOME/jbi/count.txt; -echo "------------ =========">>$APS_HOME/jbi/count.txt; -echo "Total Expected=$TOTAL">>$APS_HOME/jbi/count.txt; -echo "************************">>$APS_HOME/jbi/count.txt; diff --git a/appserver/tests/jbi/lib/reporter.jar b/appserver/tests/jbi/lib/reporter.jar deleted file mode 100644 index 9c968a83ed79e0513d792b4769c79066e5f346ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27376 zcma&NV{k8Tv+tc1+qP{xE4FRhwr$(C&6VUA+fG(&+j;(H?|bh$XFsRzI#bg<^WxK0 zJy+FK_jj%y1!)jaXrTXfKqPUo{m0F}925{JkgTYRAf2R~7{m7j5Rk&ZP)H!~f6$2W z$|t>lP^*6o^&k6hR8~+s^Y^aH97OLFvmG)=U$ zl5;c~??ciPt7oT2=YQt|^dI^BE9?Kbfd1o+?QI$UE93t^0r@Y&+12jfP;mbnWoqSO z`fpIA|A`tK+x&0%|6E+`{~PXP>R|8WV(RqYasRo}UI@OMv@k$GZRkKitp7Gn)b5{X z2PaEsQz27BI~jX(b5kdJV;e(f=Tr?S50z!KZ+qrUPtP7i52%C&EHpA$sA9q*#0tp> z@{C$Z*le~w8NI=Nn;98Gh1%9=nvIPrG+P`R)v94?5wQ@fD>LoxwGH3K4=eZXRkg1h zUwiUolix=lPU+6GTrUDAc}H-wJwBI`K<3fZc-akqFmdh_xwa_6KaL!J!xJO}K=^qp zgaL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jWVNz05)+ zrQl_b7>5|x1uj}zpo|O&V3{v9`Kv^&BD$F=J^2W&*KU&HD?|m0w_#F5w@Qd@Qc*|I zxm$aB8g0*yS!*trFFDL3_*>LAJSr#pXgG$8n$cc6%p5Bmgi(6BQ_C-q858Wy^M%;zdFzmkgvPGxt_I zRe~Qqwj2aA=u%bt2otNM=Q<15cNn032$T1vIEsyNCkS*Q!9&KhRqb?s>+zUG#dFpH zA3>&zxHQIvtXc!U7K;~%MH_KOb)AHFyP|iwF)7f6_xNeYm-hf{lQk{9Pw4=6H5Of8 zfEO^J)eWr~zZ#^GJGWZ3@cPE?bjx!#56b+7kh0NDek(s#PC$MqKR6Ocp3q^-4hlQW zreKFquSlxKO|xH&aDlaY`(x~2>Vk4_Y?OoR>_uhp8s~(Ipvll%h@H?m)`QV}t8bC} zRn&-0Cz%X5oM`TdBTlQ>vpY~GD^_@e$uq#S38d#YIGu>*#e#K&2ov=(z{>5&*y7Zg z3&Lz=)CniCiE*;C+3R)EEJ=~NFLPOUXXim*Ho3mX+A|E^sRJ?5Gh>$yLvI$1Jm6KfgSD113R&T`Z&`rIz_ zLot@L+apK=t`pfgJDI)t(YeTdCN)G<(;{r(#`16(m7h;eMRYthjRfa*X_x@K@aTu0L?3JSJ537z zsNI?A+uFpbSK&&MdA$Qr)Zrm1#vyXG-KATb{I%U?e9M+KTmg(c;!EzpU&G}uK&@q%bJy zUvVVlZ4@3z^6NzT`hq|2n<(*A@TM zAjL22X{rAc_TR@Ueuw{k%-|P1y3D`9|I5(9?=F5X&HQp9s`YO!eidqdNBn)i@e8p_ r|Gy#r+I{?v`g`W}3l+iWzoGsm4^xtZg8pfW_VP`9sYpqh{k;2s<-!jZ diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/README b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/README deleted file mode 100644 index a79e5d88ea9..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/README +++ /dev/null @@ -1,11 +0,0 @@ -This is a test case to test RPC/Literal style operations with the bundled WSDL. - -The test case uses: ------------------- - -HTTP SOAP BC as the consumer. - -Java EE Service Engine as the provider. - -client <----> HTTP SOAP BC <-----NMR------> JavaEE SE <------> webservice - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/build.properties b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/build.properties deleted file mode 100644 index 1dd848e27c7..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/build.properties +++ /dev/null @@ -1,51 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/build.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/build.xml deleted file mode 100644 index a4b018c3b86..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/build.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/client/SOAPWebConsumer.java b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/client/SOAPWebConsumer.java deleted file mode 100644 index b210a993455..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/client/SOAPWebConsumer.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; -import javax.xml.ws.WebServiceRef; -import javax.xml.ws.Service; -import javax.xml.ws.BindingProvider; -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -import service.web.example.calculator.*; -import javax.xml.ws.*; - -public class SOAPWebConsumer { -// @WebServiceRef(wsdlLocation="http://localhost:8080/rpc-literal-bundled-wsdl-bc-consumer-se-provider/webservice/CalculatorService?WSDL") -// static CalculatorService service; - CalculatorService service = new CalculatorService(); - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/rpc-literal/bc_consumer_sc_provider/bundled-wsdl"; - - public static void main(String[] args) { - stat.addDescription(testId); - SOAPWebConsumer client = new SOAPWebConsumer(); - client.addUsingSOAPConsumer(); - stat.printSummary(testId); - } - - private void addUsingSOAPConsumer() { - Calculator port= null; - try { - - System.out.println(" After creating CalculatorService"); - - port = service.getCalculatorPort(); - System.out.println(" After getting port"); - - // Get Stub - BindingProvider stub = (BindingProvider)port; - String endpointURI ="http://localhost:12011/calculatorendpoint"; - stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - endpointURI); - System.out.println(" After setting endpoint address URI"); - - IncomeTaxDetails itDetails = new IncomeTaxDetails(); - itDetails.setFirstName( "bhavani"); - itDetails.setLastName("s"); - itDetails.setAnnualIncome( 400000); - itDetails.setStatus("salaried"); - - long startTime = System.currentTimeMillis(); - long ret = 0; - // Make 100 calls to see how much time it takes. - //for(int i=0; i<1000; i++) { - ret = port.calculateIncomeTax(itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - ); - //} - long timeTaken = System.currentTimeMillis() - startTime; - - //int ret = port.add(1, 2); - printSuccess("Your income tax is : Rs ", ret, timeTaken); - startTime = System.currentTimeMillis(); - int k = port.add(505, 50); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("Sum of 505 and 50 is : ", k, timeTaken); - - startTime = System.currentTimeMillis(); - String hi = port.sayHi(); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("Output from webservice : ", hi, timeTaken); - - /* - startTime = System.currentTimeMillis(); - port.printHi(); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("SUCCESS : ", "Webservice has successfully printed hi in server.log", timeTaken); - - startTime = System.currentTimeMillis(); - port.printHiToMe("JavaEEServiceEngine"); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("SUCCESS : ", "Webservice has successfully printed hi to me in server.log", timeTaken); - */ - stat.addStatus(testId, stat.PASS); - - } catch(java.lang.Exception e) { - stat.addStatus(testId, stat.FAIL); - } - } - - public void printFailure(String errMsg) { - System.out.println(""); - System.out.println(""); - System.out.println("TestServlet"); - System.out.println(""); - System.out.println(""); - System.out.println("

    "); - System.out.println("Test FAILED: Error message - " + errMsg); - System.out.println("

    "); - System.out.println(""); - System.out.println(""); - } - - public void printSuccess(String message, long result, long timeTaken) { - System.out.println("\n\n"); - System.out.println(message + result); - System.out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds."); - } - - public void printSuccess(String message, String result, long timeTaken) { - System.out.println("\n\n"); - System.out.println(message + result); - System.out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds."); - } - -} diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/common/IncomeTaxDetails.java b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/common/IncomeTaxDetails.java deleted file mode 100644 index 999eef145e2..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/common/IncomeTaxDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package common; - -public class IncomeTaxDetails { - public String firstName; - public String lastName; - public String status; // salaried, self-employed, student. - public long annualIncome; -} - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 3cd22a36704..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Provider - - - - dummy_client_su - provider service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 8ea623f4a97..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/endpoint/Calculator.java b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/endpoint/Calculator.java deleted file mode 100644 index 6df2a7fd2d9..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/endpoint/Calculator.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.*; -import javax.jws.soap.SOAPBinding; -import common.IncomeTaxDetails; - -@WebService( -name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator", - wsdlLocation = "WEB-INF/wsdl/CalculatorService.wsdl" - ) - @SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL) - - public class Calculator { - - public static final String testName = "\nTest :: rpc-literal-bundled-wsdl-bc-consumer-se-provider : "; - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add( - @WebParam(name = "int_1", partName = "int_1") int i, - @WebParam(name = "int_2", partName = "int_2") int j - ) throws Exception { - int k = i +j ; - System.out.println(testName + i + "+" + j +" = " + k); - return k; - } - - @WebMethod(operationName="calculateIncomeTax", action="urn:CalculateIncomeTax") - public long calculateIncomeTax(IncomeTaxDetails details - , IncomeTaxDetails details2 - , IncomeTaxDetails details3 - , IncomeTaxDetails details4 - , IncomeTaxDetails details5 - , IncomeTaxDetails details6 - , IncomeTaxDetails details7 - , IncomeTaxDetails details8 - , IncomeTaxDetails details9 - , IncomeTaxDetails details10 - ) { - long income = details.annualIncome; - System.out.println(testName + "Annual income = " + income); - long taxRate = 30; // 30% - long taxToBePaid = income / taxRate; - System.out.println(testName +"Tax to be paid = " + taxToBePaid); - return taxToBePaid; - } - - @WebMethod(operationName="sayHi", action="urn:SayHi") - public String sayHi() { - return testName + "Hi from sayHi()"; - } - - @WebMethod(operationName="printHi", action="urn:PrintHi") - @Oneway - public void printHi() { - System.out.println(testName +"Hi from printHi()"); - } - - @WebMethod(operationName="printHiToMe", action="urn:PrintHiToMe") - @Oneway - public void printHiToMe(String name) { - System.out.println(testName +"Hi to " + name + " from printHiToMe()"); - } -} diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/assembly/META-INF/jbi.xml deleted file mode 100644 index 73a641a5db2..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - consumer_for_web_calculator - consumer service to the soap binding - - - web_calculator_consumer_su.jar - sun-http-binding - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService.wsdl deleted file mode 100644 index c0d2c613230..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService.wsdl +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService_schema1.xsd deleted file mode 100644 index 6392b8e527b..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/META-INF/jbi.xml deleted file mode 100644 index b8e3a97f4a2..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/endpoints.xml deleted file mode 100644 index 1a69b6a4d1d..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/soap-binding-su-alaska/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/web.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/wsdl/CalculatorService.wsdl b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/wsdl/CalculatorService.wsdl deleted file mode 100644 index 819e7d47df8..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/wsdl/CalculatorService.wsdl +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/wsdl/CalculatorService_schema1.xsd b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/wsdl/CalculatorService_schema1.xsd deleted file mode 100644 index 7a56832fab3..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/bundled-wsdl/wsdl/CalculatorService_schema1.xsd +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/README b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/README deleted file mode 100644 index fad576ebff5..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/README +++ /dev/null @@ -1,11 +0,0 @@ -This is a test case to test RPC/Literal style operations with one WSDL importing another WSDL. - -The test case uses: ------------------- - -HTTP SOAP BC as the consumer. - -Java EE Service Engine as the provider. - -client <----> HTTP SOAP BC <-----NMR------> JavaEE SE <------> webservice - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/build.properties b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/build.properties deleted file mode 100644 index 110b4ed0387..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/build.properties +++ /dev/null @@ -1,51 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/build.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/build.xml deleted file mode 100644 index 25692b3793c..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/build.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/client/SOAPWebConsumer.java b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/client/SOAPWebConsumer.java deleted file mode 100644 index ce7ccb3170f..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/client/SOAPWebConsumer.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; -import javax.xml.ws.WebServiceRef; -import javax.xml.ws.Service; -import javax.xml.ws.BindingProvider; -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -import service.web.example.calculator.*; -import javax.xml.ws.*; - -public class SOAPWebConsumer { -// @WebServiceRef(wsdlLocation="http://localhost:8080/rpc-literal-bundled-wsdl-bc-consumer-se-provider/webservice/CalculatorService?WSDL") -// static CalculatorService service; - CalculatorService service = new CalculatorService(); - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/rpc-literal/bc_consumer_sc_provider/wsdl-import"; - - public static void main(String[] args) { - stat.addDescription(testId); - SOAPWebConsumer client = new SOAPWebConsumer(); - client.addUsingSOAPConsumer(); - stat.printSummary(testId); - } - - private void addUsingSOAPConsumer() { - Calculator port= null; - try { - - System.out.println(" After creating CalculatorService"); - - port = service.getCalculatorPort(); - System.out.println(" After getting port"); - - // Get Stub - BindingProvider stub = (BindingProvider)port; - String endpointURI ="http://localhost:12011/calculatorendpoint"; - stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - endpointURI); - System.out.println(" After setting endpoint address URI"); - - IncomeTaxDetails itDetails = new IncomeTaxDetails(); - itDetails.setFirstName( "bhavani"); - itDetails.setLastName("s"); - itDetails.setAnnualIncome( 400000); - itDetails.setStatus("salaried"); - - long startTime = System.currentTimeMillis(); - long ret = 0; - // Make 100 calls to see how much time it takes. - //for(int i=0; i<1000; i++) { - ret = port.calculateIncomeTax(itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - ); - //} - long timeTaken = System.currentTimeMillis() - startTime; - - //int ret = port.add(1, 2); - printSuccess("Your income tax is : Rs ", ret, timeTaken); - startTime = System.currentTimeMillis(); - int k = port.add(505, 50); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("Sum of 505 and 50 is : ", k, timeTaken); - - startTime = System.currentTimeMillis(); - String hi = port.sayHi(); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("Output from webservice : ", hi, timeTaken); - - /* - startTime = System.currentTimeMillis(); - port.printHi(); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("SUCCESS : ", "Webservice has successfully printed hi in server.log", timeTaken); - - startTime = System.currentTimeMillis(); - port.printHiToMe("JavaEEServiceEngine"); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("SUCCESS : ", "Webservice has successfully printed hi to me in server.log", timeTaken); - */ - stat.addStatus(testId, stat.PASS); - - } catch(java.lang.Exception e) { - stat.addStatus(testId, stat.FAIL); - } - } - - public void printFailure(String errMsg) { - System.out.println(""); - System.out.println(""); - System.out.println("TestServlet"); - System.out.println(""); - System.out.println(""); - System.out.println("

    "); - System.out.println("Test FAILED: Error message - " + errMsg); - System.out.println("

    "); - System.out.println(""); - System.out.println(""); - } - - public void printSuccess(String message, long result, long timeTaken) { - System.out.println("\n\n"); - System.out.println(message + result); - System.out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds."); - } - - public void printSuccess(String message, String result, long timeTaken) { - System.out.println("\n\n"); - System.out.println(message + result); - System.out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds."); - } - -} diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/common/IncomeTaxDetails.java b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/common/IncomeTaxDetails.java deleted file mode 100644 index 999eef145e2..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/common/IncomeTaxDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package common; - -public class IncomeTaxDetails { - public String firstName; - public String lastName; - public String status; // salaried, self-employed, student. - public long annualIncome; -} - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 3cd22a36704..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Provider - - - - dummy_client_su - provider service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 8ea623f4a97..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/endpoint/Calculator.java b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/endpoint/Calculator.java deleted file mode 100644 index 6df2a7fd2d9..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/endpoint/Calculator.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.*; -import javax.jws.soap.SOAPBinding; -import common.IncomeTaxDetails; - -@WebService( -name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator", - wsdlLocation = "WEB-INF/wsdl/CalculatorService.wsdl" - ) - @SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL) - - public class Calculator { - - public static final String testName = "\nTest :: rpc-literal-bundled-wsdl-bc-consumer-se-provider : "; - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add( - @WebParam(name = "int_1", partName = "int_1") int i, - @WebParam(name = "int_2", partName = "int_2") int j - ) throws Exception { - int k = i +j ; - System.out.println(testName + i + "+" + j +" = " + k); - return k; - } - - @WebMethod(operationName="calculateIncomeTax", action="urn:CalculateIncomeTax") - public long calculateIncomeTax(IncomeTaxDetails details - , IncomeTaxDetails details2 - , IncomeTaxDetails details3 - , IncomeTaxDetails details4 - , IncomeTaxDetails details5 - , IncomeTaxDetails details6 - , IncomeTaxDetails details7 - , IncomeTaxDetails details8 - , IncomeTaxDetails details9 - , IncomeTaxDetails details10 - ) { - long income = details.annualIncome; - System.out.println(testName + "Annual income = " + income); - long taxRate = 30; // 30% - long taxToBePaid = income / taxRate; - System.out.println(testName +"Tax to be paid = " + taxToBePaid); - return taxToBePaid; - } - - @WebMethod(operationName="sayHi", action="urn:SayHi") - public String sayHi() { - return testName + "Hi from sayHi()"; - } - - @WebMethod(operationName="printHi", action="urn:PrintHi") - @Oneway - public void printHi() { - System.out.println(testName +"Hi from printHi()"); - } - - @WebMethod(operationName="printHiToMe", action="urn:PrintHiToMe") - @Oneway - public void printHiToMe(String name) { - System.out.println(testName +"Hi to " + name + " from printHiToMe()"); - } -} diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/assembly/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/assembly/META-INF/jbi.xml deleted file mode 100644 index 73a641a5db2..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - consumer_for_web_calculator - consumer service to the soap binding - - - web_calculator_consumer_su.jar - sun-http-binding - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/CalculatorService.wsdl b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/CalculatorService.wsdl deleted file mode 100644 index c0d2c613230..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/CalculatorService.wsdl +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/CalculatorService_schema1.xsd deleted file mode 100644 index 6392b8e527b..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/META-INF/jbi.xml deleted file mode 100644 index b8e3a97f4a2..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/endpoints.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/endpoints.xml deleted file mode 100644 index 1a69b6a4d1d..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/sun-http-binding/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/web.xml b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/CalculatorService.wsdl b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/CalculatorService.wsdl deleted file mode 100644 index e2a99e37367..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/CalculatorService.wsdl +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/CalculatorService_schema1.xsd b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/CalculatorService_schema1.xsd deleted file mode 100644 index 7a56832fab3..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/CalculatorService_schema1.xsd +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/MessageTypes.wsdl b/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/MessageTypes.wsdl deleted file mode 100644 index b6d1178cb26..00000000000 --- a/appserver/tests/jbi/rpc_literal/bc_consumer_se_provider/wsdl-import/wsdl/MessageTypes.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/build.xml b/appserver/tests/jbi/rpc_literal/build.xml deleted file mode 100644 index f184eb1c0d8..00000000000 --- a/appserver/tests/jbi/rpc_literal/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - -]> - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/README b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/README deleted file mode 100644 index d7c90e0976e..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/README +++ /dev/null @@ -1,11 +0,0 @@ -This is a test case to test RPC/Literal style operations with the bundled WSDL. - -The test case uses: ------------------- - -Java EE Service Engine as the consumer. - -Java EE Service Engine as the provider. - -client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.properties b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.properties deleted file mode 100644 index e80c488554a..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.properties +++ /dev/null @@ -1,51 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.xml deleted file mode 100644 index d51d878a7b6..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-jbi.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-jbi.xml deleted file mode 100644 index 64811c91344..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-sun-web.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-web.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client/TestClient.java b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client/TestClient.java deleted file mode 100644 index 0f117675ed4..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/client/TestClient.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/rpc-literal/se_consumer_se_provider/bundled_wsdl"; - - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - StringBuilder buffer = new StringBuilder(); - String line = null; - boolean found = false; - while ((line = input.readLine()) != null) { - if(line.indexOf("SUCCESS") != -1) found = true; - buffer.append(line + "\n"); - } - log(buffer.toString()); - if(!found) return 505; - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/common/IncomeTaxDetails.java b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/common/IncomeTaxDetails.java deleted file mode 100644 index 999eef145e2..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/common/IncomeTaxDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package common; - -public class IncomeTaxDetails { - public String firstName; - public String lastName; - public String status; // salaried, self-employed, student. - public long annualIncome; -} - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/endpoint/Calculator.java b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/endpoint/Calculator.java deleted file mode 100644 index eabe9fc5eb9..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/endpoint/Calculator.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.*; -import javax.jws.soap.SOAPBinding; -import common.IncomeTaxDetails; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator", - wsdlLocation = "WEB-INF/wsdl/CalculatorService.wsdl" - ) -@SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL) - -public class Calculator { - - public static final String testName = "\nTest :: rpc-literal-bundled-wsdl : "; - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add( - @WebParam(name = "int_1", partName = "int_1") int i, - @WebParam(name = "int_2", partName = "int_2") int j - ) throws Exception { - int k = i +j ; - System.out.println(testName + i + "+" + j +" = " + k); - return k; - } - - @WebMethod(operationName="calculateIncomeTax", action="urn:CalculateIncomeTax") - public long calculateIncomeTax(IncomeTaxDetails details - , IncomeTaxDetails details2 - , IncomeTaxDetails details3 - , IncomeTaxDetails details4 - , IncomeTaxDetails details5 - , IncomeTaxDetails details6 - , IncomeTaxDetails details7 - , IncomeTaxDetails details8 - , IncomeTaxDetails details9 - , IncomeTaxDetails details10 - ) { - long income = details.annualIncome; - System.out.println(testName + "Annual income = " + income); - long taxRate = 30; // 30% - long taxToBePaid = income / taxRate; - System.out.println(testName +"Tax to be paid = " + taxToBePaid); - return taxToBePaid; - } - - @WebMethod(operationName="sayHi", action="urn:SayHi") - public String sayHi() { - return testName + "Hi from sayHi()"; - } - - @WebMethod(operationName="printHi", action="urn:PrintHi") - public void printHi() { - System.out.println(testName +"Hi from printHi()"); - } - - @WebMethod(operationName="printHiToMe", action="urn:PrintHiToMe") - public void printHiToMe(String name) { - System.out.println(testName +"Hi to " + name + " from printHiToMe()"); - } -} diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/assembly/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/assembly/META-INF/jbi.xml deleted file mode 100644 index e157a1f826e..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - rpc-literal-bundled-wsdl-se-consumer-se-provider - Client web calculator service assembly - - - - rpc-literal-bundled-wsdl - provider service - - - rpc-literal-bundled-wsdl.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/su/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/su/META-INF/jbi.xml deleted file mode 100644 index a130bdd3998..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/su/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/sun-web.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/sun-web.xml deleted file mode 100644 index 7cd8d0facce..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - -rpc-literal-bundled-wsdl - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/web.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/client/Client.java b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/client/Client.java deleted file mode 100644 index 9812a561d90..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/client/Client.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.calculator.*; -//import common.IncomeTaxDetails; -//import java.util.Hashtable; - -public class Client extends HttpServlet { - -// @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service; - CalculatorService service = new CalculatorService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - PrintWriter out=null; - try { - System.out.println(" Service is :" + service); - resp.setContentType("text/html"); - out = resp.getWriter(); - Calculator port = service.getCalculatorPort(); - IncomeTaxDetails itDetails = new IncomeTaxDetails(); - itDetails.setFirstName ( "bhavani"); - itDetails.setLastName ("s"); - itDetails.setAnnualIncome ( 400000); - itDetails.setStatus ("salaried"); - - long startTime = System.currentTimeMillis(); - long ret = 0; - // Make 100 calls to see how much time it takes. - //for(int i=0; i<1000; i++) { - ret = port.calculateIncomeTax(itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - ); - //} - long timeTaken = System.currentTimeMillis() - startTime; - - //int ret = port.add(1, 2); - printSuccess("Your income tax is : Rs ", out,ret, timeTaken); - startTime = System.currentTimeMillis(); - int k = port.add(505, 50); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("Sum of 505 and 50 is : ", out,k, timeTaken); - - startTime = System.currentTimeMillis(); - String hi = port.sayHi(); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("Output from webservice : ", out, hi, timeTaken); - - startTime = System.currentTimeMillis(); - port.printHi(); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("SUCCESS : ", out, "Webservice has successfully printed hi in server.log", timeTaken); - - startTime = System.currentTimeMillis(); - port.printHiToMe("JavaEEServiceEngine"); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("SUCCESS : ", out, "Webservice has successfully printed hi to me in server.log", timeTaken); - - } catch(java.lang.Exception e) { - //e.printStackTrace(); - printFailure(out, e.getMessage()); - } finally { - if(out != null) { - out.flush(); - out.close(); - } - } - } - - public void printFailure(PrintWriter out, String errMsg) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Test FAILED: Error message - " + errMsg); - out.println("

    "); - out.println(""); - out.println(""); - } - - public void printSuccess(String message, PrintWriter out, long result, long timeTaken) { - if(out == null) return; - out.println("\n\n"); - out.println(message + result); - out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds."); - } - - public void printSuccess(String message, PrintWriter out, String result, long timeTaken) { - if(out == null) return; - out.println("\n\n"); - out.println(message + result); - out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds."); - } -} - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService.wsdl b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService.wsdl deleted file mode 100644 index 819e7d47df8..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService.wsdl +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService_schema1.xsd b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService_schema1.xsd deleted file mode 100644 index 7a56832fab3..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService_schema1.xsd +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/README b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/README deleted file mode 100644 index cfddd2205af..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/README +++ /dev/null @@ -1,11 +0,0 @@ -This is a test case to test RPC/Literal style operations with generated WSDL. - -The test case uses: ------------------- - -Java EE Service Engine as the consumer. - -Java EE Service Engine as the provider. - -client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/build.properties b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/build.properties deleted file mode 100644 index fe6fb5ca0de..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/build.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/build.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/build.xml deleted file mode 100644 index 93a50bd538b..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/build.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-jbi.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-jbi.xml deleted file mode 100644 index 5943897b35d..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-sun-web.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-web.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client/TestClient.java b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client/TestClient.java deleted file mode 100644 index 04fdc2e2965..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/client/TestClient.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -// Portions Copyright [2019] Payara Foundation and/or affiliates - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/rpc-literal/se_consumer_se_provider/generated_wsdl"; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - StringBuilder buffer = new StringBuilder(); - String line = null; - boolean found = false; - while ((line = input.readLine()) != null) { - if(line.indexOf("SUCCESS") != -1) found = true; - buffer.append(line + "\n"); - } - log(buffer.toString()); - if(!found) return 505; - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/common/IncomeTaxDetails.java b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/common/IncomeTaxDetails.java deleted file mode 100644 index 999eef145e2..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/common/IncomeTaxDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package common; - -public class IncomeTaxDetails { - public String firstName; - public String lastName; - public String status; // salaried, self-employed, student. - public long annualIncome; -} - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 3cd22a36704..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Provider - - - - dummy_client_su - provider service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 1dd5a062e00..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/endpoint/Calculator.java b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/endpoint/Calculator.java deleted file mode 100644 index 71a730c8616..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/endpoint/Calculator.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.Oneway; -import common.IncomeTaxDetails; -import java.util.Hashtable; -import javax.jws.soap.SOAPBinding; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator" -) -@SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL) -public class Calculator { - - public static final String testName = "\nTest :: rpc-literal-generated-wsdl : "; - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) throws Exception { - int k = i +j ; - System.out.println(testName + i + "+" + j +" = " + k); - //throw new java.lang.Exception("This is my exception"); - return k; - } - - @WebMethod(operationName="calculateIncomeTax", action="urn:CalculateIncomeTax") - public long calculateIncomeTax(IncomeTaxDetails details - , IncomeTaxDetails details2 - , IncomeTaxDetails details3 - , IncomeTaxDetails details4 - , IncomeTaxDetails details5 - , IncomeTaxDetails details6 - , IncomeTaxDetails details7 - , IncomeTaxDetails details8 - , IncomeTaxDetails details9 - , IncomeTaxDetails details10 - ) { - long income = details.annualIncome; - System.out.println(testName + "Annual income = " + income); - long taxRate = 30; // 30% - long taxToBePaid = income / taxRate; - System.out.println(testName +"Tax to be paid = " + taxToBePaid); - return taxToBePaid; - } - - @WebMethod(operationName="sayHi", action="urn:SayHi") - public String sayHi() { - return testName + "Hi from sayHi()"; - } - - @WebMethod(operationName="printHi", action="urn:PrintHi") - public void printHi() { - System.out.println(testName +"Hi from printHi()"); - } - - @WebMethod(operationName="printHiToMe", action="urn:PrintHiToMe") - public void printHiToMe(String name) { - System.out.println(testName +"Hi to " + name + " from printHiToMe()"); - } -} diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/sun-web.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/web.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/client/Client.java b/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/client/Client.java deleted file mode 100644 index 9812a561d90..00000000000 --- a/appserver/tests/jbi/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/client/Client.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.calculator.*; -//import common.IncomeTaxDetails; -//import java.util.Hashtable; - -public class Client extends HttpServlet { - -// @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service; - CalculatorService service = new CalculatorService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - PrintWriter out=null; - try { - System.out.println(" Service is :" + service); - resp.setContentType("text/html"); - out = resp.getWriter(); - Calculator port = service.getCalculatorPort(); - IncomeTaxDetails itDetails = new IncomeTaxDetails(); - itDetails.setFirstName ( "bhavani"); - itDetails.setLastName ("s"); - itDetails.setAnnualIncome ( 400000); - itDetails.setStatus ("salaried"); - - long startTime = System.currentTimeMillis(); - long ret = 0; - // Make 100 calls to see how much time it takes. - //for(int i=0; i<1000; i++) { - ret = port.calculateIncomeTax(itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - , itDetails - ); - //} - long timeTaken = System.currentTimeMillis() - startTime; - - //int ret = port.add(1, 2); - printSuccess("Your income tax is : Rs ", out,ret, timeTaken); - startTime = System.currentTimeMillis(); - int k = port.add(505, 50); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("Sum of 505 and 50 is : ", out,k, timeTaken); - - startTime = System.currentTimeMillis(); - String hi = port.sayHi(); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("Output from webservice : ", out, hi, timeTaken); - - startTime = System.currentTimeMillis(); - port.printHi(); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("SUCCESS : ", out, "Webservice has successfully printed hi in server.log", timeTaken); - - startTime = System.currentTimeMillis(); - port.printHiToMe("JavaEEServiceEngine"); - timeTaken = System.currentTimeMillis() - startTime; - printSuccess("SUCCESS : ", out, "Webservice has successfully printed hi to me in server.log", timeTaken); - - } catch(java.lang.Exception e) { - //e.printStackTrace(); - printFailure(out, e.getMessage()); - } finally { - if(out != null) { - out.flush(); - out.close(); - } - } - } - - public void printFailure(PrintWriter out, String errMsg) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Test FAILED: Error message - " + errMsg); - out.println("

    "); - out.println(""); - out.println(""); - } - - public void printSuccess(String message, PrintWriter out, long result, long timeTaken) { - if(out == null) return; - out.println("\n\n"); - out.println(message + result); - out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds."); - } - - public void printSuccess(String message, PrintWriter out, String result, long timeTaken) { - if(out == null) return; - out.println("\n\n"); - out.println(message + result); - out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds."); - } -} - diff --git a/appserver/tests/jbi/security/README b/appserver/tests/jbi/security/README deleted file mode 100644 index 3914cb49849..00000000000 --- a/appserver/tests/jbi/security/README +++ /dev/null @@ -1 +0,0 @@ -This directory contains tests for the security feature of JavaEE service engine. diff --git a/appserver/tests/jbi/security/build.xml b/appserver/tests/jbi/security/build.xml deleted file mode 100644 index 1ca36b77cb8..00000000000 --- a/appserver/tests/jbi/security/build.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - -]> - - - - - - - diff --git a/appserver/tests/jbi/security/jse_only/META-INF/MANIFEST.MF b/appserver/tests/jbi/security/jse_only/META-INF/MANIFEST.MF deleted file mode 100644 index 23277300804..00000000000 --- a/appserver/tests/jbi/security/jse_only/META-INF/MANIFEST.MF +++ /dev/null @@ -1,4 +0,0 @@ -Manifest-Version: 1.0 -Ant-Version: Apache Ant 1.6.5 -Created-By: 14.0-b16 (Sun Microsystems Inc.) - diff --git a/appserver/tests/jbi/security/jse_only/META-INF/jbi.xml b/appserver/tests/jbi/security/jse_only/META-INF/jbi.xml deleted file mode 100644 index 3604763f4c6..00000000000 --- a/appserver/tests/jbi/security/jse_only/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/security/jse_only/README b/appserver/tests/jbi/security/jse_only/README deleted file mode 100644 index e070591696c..00000000000 --- a/appserver/tests/jbi/security/jse_only/README +++ /dev/null @@ -1,12 +0,0 @@ -It tests the security feature of JavaEE service engine. JavaEE SE is used on consumer as well as on the provider side. -An EJB webservice is invoked by a servlet that requires authentication. This webservice method returns the caller principal associated with the invocation. -A temporary file user is created in this test. - -Here is the invocation flow- - -1. Standalone client invokes the servlet after passing proper user credential. -2. Apserver invokes the servlet with a Principal. -3. Servlet calls the EJB webservice. -4. EJB webservice returns the caller principal associated with the EJBContext. -5. Servlet sends the returned value of EJB webservice in the response. -6. Client checks whether the returned principal matches with the one it was invoked. diff --git a/appserver/tests/jbi/security/jse_only/build.properties b/appserver/tests/jbi/security/jse_only/build.properties deleted file mode 100644 index f2af89cd483..00000000000 --- a/appserver/tests/jbi/security/jse_only/build.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/security/jse_only/build.xml b/appserver/tests/jbi/security/jse_only/build.xml deleted file mode 100644 index cea1d84e482..00000000000 --- a/appserver/tests/jbi/security/jse_only/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/security/jse_only/client-jbi.xml b/appserver/tests/jbi/security/jse_only/client-jbi.xml deleted file mode 100644 index 15f7db1c19d..00000000000 --- a/appserver/tests/jbi/security/jse_only/client-jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/security/jse_only/client-sun-web.xml b/appserver/tests/jbi/security/jse_only/client-sun-web.xml deleted file mode 100644 index 082d3621c29..00000000000 --- a/appserver/tests/jbi/security/jse_only/client-sun-web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - - user - user - - diff --git a/appserver/tests/jbi/security/jse_only/client-web.xml b/appserver/tests/jbi/security/jse_only/client-web.xml deleted file mode 100644 index b8adba06477..00000000000 --- a/appserver/tests/jbi/security/jse_only/client-web.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - - UserConstraint - - User - - /webclient/RequestProcessor/* - GET - POST - - - - user - - - - BASIC - file - - - user - - - - diff --git a/appserver/tests/jbi/security/jse_only/client/TestClient.java b/appserver/tests/jbi/security/jse_only/client/TestClient.java deleted file mode 100644 index 6a1c0368f08..00000000000 --- a/appserver/tests/jbi/security/jse_only/client/TestClient.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String description = "jbi-serviceengine/security/jse_only"; - - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(description); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(description); - } - - public void doTest(String[] args) { - - String url = args[0]; - String passwd = args[1]; - try { - int code = invokeServlet(url,passwd); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url, String userPassword) throws Exception { - log("Invoking url = " + url+", password = " + userPassword); - URL u = new URL(url); - String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes()); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - c1.setRequestProperty ("Authorization", "Basic " + encoding); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF EJB webservice IS") != -1) - found1 = true; - if(line.indexOf("[JBI-SecurityTest PrincipalSent=user PrincipalGot=user]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(description, stat.PASS); - } - - private void fail() { - stat.addStatus(description, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/security/jse_only/endpoint/ejb/Hello.java b/appserver/tests/jbi/security/jse_only/endpoint/ejb/Hello.java deleted file mode 100644 index 62374f6ea41..00000000000 --- a/appserver/tests/jbi/security/jse_only/endpoint/ejb/Hello.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; - -@WebService( -targetNamespace="http://endpoint/ejb") -public interface Hello { - public String sayHello(String who); -} diff --git a/appserver/tests/jbi/security/jse_only/endpoint/ejb/HelloEJB.java b/appserver/tests/jbi/security/jse_only/endpoint/ejb/HelloEJB.java deleted file mode 100644 index 0458bda913a..00000000000 --- a/appserver/tests/jbi/security/jse_only/endpoint/ejb/HelloEJB.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import java.security.Principal; -import javax.jws.WebService; -import javax.xml.ws.WebServiceRef; -import javax.ejb.Stateless; -import javax.ejb.SessionContext; -import javax.annotation.Resource; - -@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb") -@Stateless -public class HelloEJB implements Hello { - - @Resource private SessionContext ctx; - - public String sayHello(String who) { - System.out.println("**** sayHello("+ who+")"); - Principal p = ctx.getCallerPrincipal(); - String principal = (p == null)? "NULL": p.getName(); //p.toString(); - System.out.println("****EJB: principal = " + principal); - return "JBI-SecurityTest " + who + " PrincipalGot="+principal; - } -} diff --git a/appserver/tests/jbi/security/jse_only/javaee-se-serviceunit/assembly/META-INF/jbi.xml b/appserver/tests/jbi/security/jse_only/javaee-se-serviceunit/assembly/META-INF/jbi.xml deleted file mode 100644 index 0f8c6fdea04..00000000000 --- a/appserver/tests/jbi/security/jse_only/javaee-se-serviceunit/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - secured-ejb-assembly - secured ejb service assembly - - - - secured-ejb-app - provider service - - - secured-ejbWS.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/security/jse_only/javaee-se-serviceunit/su/META-INF/jbi.xml b/appserver/tests/jbi/security/jse_only/javaee-se-serviceunit/su/META-INF/jbi.xml deleted file mode 100644 index f8476ce5015..00000000000 --- a/appserver/tests/jbi/security/jse_only/javaee-se-serviceunit/su/META-INF/jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/security/jse_only/sun-web.xml b/appserver/tests/jbi/security/jse_only/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/security/jse_only/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/security/jse_only/web.xml b/appserver/tests/jbi/security/jse_only/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/security/jse_only/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/security/jse_only/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/security/jse_only/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/security/jse_only/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/security/jse_only/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/security/jse_only/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/security/jse_only/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/security/jse_only/webclient/client/Client.java b/appserver/tests/jbi/security/jse_only/webclient/client/Client.java deleted file mode 100644 index ae9317f8dc0..00000000000 --- a/appserver/tests/jbi/security/jse_only/webclient/client/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.http.*; -import java.io.PrintWriter; -import java.security.Principal; - -import javax.xml.ws.*; - -import endpoint.ejb.*; - -public class Client extends HttpServlet { - -// @WebServiceRef(name="sun-web.serviceref/HelloEJBService") - HelloEJBService service = new HelloEJBService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - try { - Principal p = req.getUserPrincipal(); - String principal = (p==null)? "NULL": p.toString(); - System.out.println("****Servlet: principal = " + principal); - - Hello port = service.getHelloEJBPort(); - String ret = port.sayHello("PrincipalSent="+principal); - System.out.println("Return value from webservice:"+ret); - - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF EJB webservice IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - } catch(Exception e) { - e.printStackTrace(); - } - } -} diff --git a/appserver/tests/jbi/service_unit/add-numbers/README b/appserver/tests/jbi/service_unit/add-numbers/README deleted file mode 100644 index aa31e123bb5..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/README +++ /dev/null @@ -1,28 +0,0 @@ -This test case has : --------------------- - -A simple webservice returns the sum of two integers. This is bundled as a -servlet inside a WAR file. This WAR file is included in the service assembly -and is deployed by the JavaEE Service Engine. - -A simple servlet (with jbi_enabled=true) to access this web service - -A simple java client to invoke this servlet - -The test case uses: ------------------- - -Java EE Service Engine as the consumer. - -Java EE Service Engine as the provider. - -client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice - -Expected result: ----------------- - -The Java EE Service Engine should successfully deploy the service unit. - -Java client should be able to successfully invoke the webservice and get -the sum of two numbers. - diff --git a/appserver/tests/jbi/service_unit/add-numbers/RepRunConf.txt b/appserver/tests/jbi/service_unit/add-numbers/RepRunConf.txt deleted file mode 100644 index bfb71bc4bc3..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/RepRunConf.txt +++ /dev/null @@ -1,42 +0,0 @@ - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - - - -Test has been reported diff --git a/appserver/tests/jbi/service_unit/add-numbers/build.properties b/appserver/tests/jbi/service_unit/add-numbers/build.properties deleted file mode 100644 index e49efc7c159..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/build.properties +++ /dev/null @@ -1,51 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/build.xml b/appserver/tests/jbi/service_unit/add-numbers/build.xml deleted file mode 100644 index 27352a4e88b..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/build.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/client-sun-web.xml b/appserver/tests/jbi/service_unit/add-numbers/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/client-web.xml b/appserver/tests/jbi/service_unit/add-numbers/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/client/TestClient.java b/appserver/tests/jbi/service_unit/add-numbers/client/TestClient.java deleted file mode 100644 index b3367ed4875..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/client/TestClient.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String testId = "jbi-serviceengine/service_unit/add-numbers"; - - public boolean found1 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("Result is") != -1) - found1 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100755 index 94505c53a2f..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Consumer - - - - dummy_client_su - consumer service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 45ca85e8034..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/endpoint/AddNumber.java b/appserver/tests/jbi/service_unit/add-numbers/endpoint/AddNumber.java deleted file mode 100644 index caea283df46..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/endpoint/AddNumber.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.Oneway; - -@WebService( - name="AddNumber", - serviceName="AddNumberService", - targetNamespace="http://example.web.service/AddNumber" -) -public class AddNumber { - public AddNumber() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) throws Exception { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - //throw new java.lang.Exception("This is my exception"); - return k; - } -} diff --git a/appserver/tests/jbi/service_unit/add-numbers/javaee-se-serviceunit/assembly/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/add-numbers/javaee-se-serviceunit/assembly/META-INF/jbi.xml deleted file mode 100755 index 924fab264df..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/javaee-se-serviceunit/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - client_web_calculator_service_assembly - Client web calculator service assembly - - - - calc-web-client-web - provider service - - - calc-web-client-web.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/javaee-se-serviceunit/su/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/add-numbers/javaee-se-serviceunit/su/META-INF/jbi.xml deleted file mode 100755 index 775bc6470b3..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/javaee-se-serviceunit/su/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/sun-web.xml b/appserver/tests/jbi/service_unit/add-numbers/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/web.xml b/appserver/tests/jbi/service_unit/add-numbers/web.xml deleted file mode 100644 index b4239a408a6..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the AddNumber Service - AddNumberWAR - - - Endpoint for AddNumber Web Service - AddNumberWebService - AddNumber - endpoint.AddNumber - 0 - - - - AddNumber - /webservice/AddNumberService - - - - 54 - - - - diff --git a/appserver/tests/jbi/service_unit/add-numbers/webclient/client/Client.java b/appserver/tests/jbi/service_unit/add-numbers/webclient/client/Client.java deleted file mode 100644 index aec5675dda3..00000000000 --- a/appserver/tests/jbi/service_unit/add-numbers/webclient/client/Client.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.addnumber.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/calculator") AddNumberService service; - AddNumberService service = new AddNumberService(); - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - System.out.println("In client doGet "); - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - System.out.println("In client doPost "); - PrintWriter out=null; - try { - System.out.println(" Service is :" + service); - resp.setContentType("text/html"); - out = resp.getWriter(); - AddNumber port = service.getAddNumberPort(); - int ret = port.add(1, 2); - printSuccess(out,ret); - } catch(java.lang.Exception e) { - //e.printStackTrace(); - printFailure(out, e.getMessage()); - } finally { - if(out != null) { - out.flush(); - out.close(); - } - } - } - - public void printFailure(PrintWriter out, String errMsg) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Test FAILED: Error message - " + errMsg); - out.println("

    "); - out.println(""); - out.println(""); - } - - public void printSuccess(PrintWriter out, int result) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Result is : " + result); - out.println("

    "); - out.println(""); - out.println(""); - } -} - diff --git a/appserver/tests/jbi/service_unit/build.xml b/appserver/tests/jbi/service_unit/build.xml deleted file mode 100644 index 0764bdee723..00000000000 --- a/appserver/tests/jbi/service_unit/build.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/README b/appserver/tests/jbi/service_unit/compApp-client/README deleted file mode 100644 index ac554211a77..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/README +++ /dev/null @@ -1,26 +0,0 @@ -This test demonstrates usage of a composite application when JavaEE SE is -consumer. There is a Calculator webservice with add operation that adds two -numbers. This calculator service is deployed in appserver with jbi-enabled set -to false so that the service can not be called through JavaEE SE. - -The webservice client is a servlet that sends an add request to the calculator -service. This servlet is deployed as part of a composite application. -A standalone Java client is used to invoke this servlet and execute this test. - -ant all of this test does the following : - -task setup: - 1. Calculator webservice is deployed in appserver and jbi-enabled flag is - set to false - 2. A service assembly is created and deployed that contains a JavaEE service - unit consuming calculator service and a HTTP BC service unit that provides - calculator service. -task runtest: - Client invokes the test servlet which in calls the calculator - service. This call goes through JavaEE SE. Below is the runtime call flow- - -TestClient --> Client(Servlet) --> JavaEE SE --> HTTP BC --> Calculator WS - -task undeploy: - undeploys the calculator service from appserver and composite application - from from JBI diff --git a/appserver/tests/jbi/service_unit/compApp-client/build.properties b/appserver/tests/jbi/service_unit/compApp-client/build.properties deleted file mode 100644 index a0d58cebbd3..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/build.properties +++ /dev/null @@ -1,48 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/build.xml b/appserver/tests/jbi/service_unit/compApp-client/build.xml deleted file mode 100644 index dfab0010474..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/build.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/client-sun-web.xml b/appserver/tests/jbi/service_unit/compApp-client/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/client-web.xml b/appserver/tests/jbi/service_unit/compApp-client/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/client/TestClient.java b/appserver/tests/jbi/service_unit/compApp-client/client/TestClient.java deleted file mode 100644 index 2a5cf1fafb4..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/client/TestClient.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String testId = "jbi-serviceengine/service_unit/compApp-client"; - - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF Calculator add SERVICE IS") != -1) - found1 = true; - if(line.indexOf("[3]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/service_unit/compApp-client/endpoint/Calculator.java b/appserver/tests/jbi/service_unit/compApp-client/endpoint/Calculator.java deleted file mode 100644 index f721c6af012..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/endpoint/Calculator.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator" -) -public class Calculator { - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - - return k; - } -} diff --git a/appserver/tests/jbi/service_unit/compApp-client/jbi.xml b/appserver/tests/jbi/service_unit/compApp-client/jbi.xml deleted file mode 100644 index 430325cddcd..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/assembly/META-INF/jbi.xml deleted file mode 100755 index 760f2d8c5d5..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - client_web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - client_consumer_for_web_calculator - consumer service to the soap binding - - - client_web_calculator_consumer_su.jar - sun-http-binding - - - - - wsclient - Represents this Service Unit - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/CalculatorService.wsdl b/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/CalculatorService.wsdl deleted file mode 100644 index a1c58be17df..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/CalculatorService.wsdl +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/CalculatorService_schema1.xsd deleted file mode 100644 index c9b4b06f2ef..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/META-INF/jbi.xml deleted file mode 100755 index abd27971d8e..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/endpoints.xml b/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/endpoints.xml deleted file mode 100755 index 9ea3dd41920..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/soap-binding-su/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/sun-web.xml b/appserver/tests/jbi/service_unit/compApp-client/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/web.xml b/appserver/tests/jbi/service_unit/compApp-client/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-client/webclient/client/Client.java b/appserver/tests/jbi/service_unit/compApp-client/webclient/client/Client.java deleted file mode 100644 index f81bc23adfd..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-client/webclient/client/Client.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.calculator.*; - -public class Client extends HttpServlet { - - //@WebServiceRef CalculatorService service; - CalculatorService service = new CalculatorService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - System.out.println("In client doGet "); - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - try { - System.out.println(" Service is :" + service); - Calculator port = service.getCalculatorPort(); - int ret = port.add(1, 2); - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF Calculator add SERVICE IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - out.flush(); - out.close(); - } catch(Exception e) { - e.printStackTrace(); - } - } -} - diff --git a/appserver/tests/jbi/service_unit/compApp-server/README b/appserver/tests/jbi/service_unit/compApp-server/README deleted file mode 100644 index 5f3beba34bf..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/README +++ /dev/null @@ -1,9 +0,0 @@ -This test demonstrates usage of a composite application when JavaEE SE is provider. There -is a Calculator webservice with add operation that adds two numbers. Client is a standalone -Java application which sends request to the webservice through HTTP SOAPBinding. - -ant all of this test does the following : - -1. task setup: A service assembly is created and deployed that contains a JavaEE service unit providing calculator service and a HTTP BC service unit that consumes calculator service. -2. task runtest: Client sends an add request through SOAP binding, -3. task undeploy: undeploys the composite application from from JBI diff --git a/appserver/tests/jbi/service_unit/compApp-server/build.properties b/appserver/tests/jbi/service_unit/compApp-server/build.properties deleted file mode 100644 index aafb8d93ee3..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/build.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/build.xml b/appserver/tests/jbi/service_unit/compApp-server/build.xml deleted file mode 100644 index fe7ae8fc1a6..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/build.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/client/SOAPWebConsumer.java b/appserver/tests/jbi/service_unit/compApp-server/client/SOAPWebConsumer.java deleted file mode 100644 index 7b21b158777..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/client/SOAPWebConsumer.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; -import javax.xml.ws.WebServiceRef; -import javax.xml.ws.Service; -import javax.xml.ws.BindingProvider; -import com.example.calculator.CalculatorService; -import com.example.calculator.Calculator; -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class SOAPWebConsumer { - //@WebServiceRef(wsdlLocation="http://localhost:8080/calculatorservice-web/webservice/CalculatorService?WSDL") - CalculatorService service = new CalculatorService(); - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String testId = "jbi-serviceengine/service_unit/compApp-server"; - - public static void main (String[] args) { - stat.addDescription(testId); - SOAPWebConsumer client = new SOAPWebConsumer(); - client.addUsingSOAPConsumer(args); - stat.printSummary(testId); - } - - private void addUsingSOAPConsumer(String[] args) { - com.example.calculator.Calculator port= null; - try { - - System.out.println(" After creating CalculatorService"); - - port = service.getCalculatorPort(); - System.out.println(" After getting port"); - - // Get Stub - BindingProvider stub = (BindingProvider)port; - String endpointURI ="http://localhost:12011/calculatorendpoint"; - stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - endpointURI); - System.out.println(" After setting endpoint address URI"); - System.out.println(" Using SOAP binding's consumer to add 1 + 2 = " + port.add(1,2)); - stat.addStatus(testId, stat.PASS); - } catch(Exception e) { - e.printStackTrace(); - stat.addStatus(testId, stat.FAIL); - } - } -} diff --git a/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 3cd22a36704..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Provider - - - - dummy_client_su - provider service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 1f3626ab3b1..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/endpoint/Calculator.java b/appserver/tests/jbi/service_unit/compApp-server/endpoint/Calculator.java deleted file mode 100644 index 8a89994feb6..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/endpoint/Calculator.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.com/Calculator" -) -public class Calculator { - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - - return k; - } -} diff --git a/appserver/tests/jbi/service_unit/compApp-server/jbi.xml b/appserver/tests/jbi/service_unit/compApp-server/jbi.xml deleted file mode 100644 index 82040793222..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce4a2..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 73a641a5db2..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - consumer_for_web_calculator - consumer service to the soap binding - - - web_calculator_consumer_su.jar - sun-http-binding - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/CalculatorService.wsdl b/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/CalculatorService.wsdl deleted file mode 100644 index 7eaa539aa1a..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/CalculatorService.wsdl +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/CalculatorService_schema1.xsd deleted file mode 100644 index 5c79d5bfeb5..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/META-INF/jbi.xml deleted file mode 100644 index fdb58a42e03..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/endpoints.xml b/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/endpoints.xml deleted file mode 100644 index a3fa169c46c..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/soap-binding-su/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/service_unit/compApp-server/web.xml b/appserver/tests/jbi/service_unit/compApp-server/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/service_unit/compApp-server/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/README b/appserver/tests/jbi/service_unit/endpoint_mapping/README deleted file mode 100644 index aa31e123bb5..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/README +++ /dev/null @@ -1,28 +0,0 @@ -This test case has : --------------------- - -A simple webservice returns the sum of two integers. This is bundled as a -servlet inside a WAR file. This WAR file is included in the service assembly -and is deployed by the JavaEE Service Engine. - -A simple servlet (with jbi_enabled=true) to access this web service - -A simple java client to invoke this servlet - -The test case uses: ------------------- - -Java EE Service Engine as the consumer. - -Java EE Service Engine as the provider. - -client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice - -Expected result: ----------------- - -The Java EE Service Engine should successfully deploy the service unit. - -Java client should be able to successfully invoke the webservice and get -the sum of two numbers. - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/RepRunConf.txt b/appserver/tests/jbi/service_unit/endpoint_mapping/RepRunConf.txt deleted file mode 100644 index 8a9f4a7b8f4..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/RepRunConf.txt +++ /dev/null @@ -1,41 +0,0 @@ - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - - -Test has been reported diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/build.properties b/appserver/tests/jbi/service_unit/endpoint_mapping/build.properties deleted file mode 100644 index e49efc7c159..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/build.properties +++ /dev/null @@ -1,51 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/build.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/build.xml deleted file mode 100644 index 6bd167cdb5a..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/build.xml +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &testproperties; - &jaxwsTools; - &jbiproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/client-sun-web.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/client-web.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/client/TestClient.java b/appserver/tests/jbi/service_unit/endpoint_mapping/client/TestClient.java deleted file mode 100644 index 1e5941a39cd..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/client/TestClient.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String testId = "jbi-serviceengine/service_unit/endpoint-naming"; - - public boolean found1 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("Result is") != -1) - found1 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100755 index 94505c53a2f..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Consumer - - - - dummy_client_su - consumer service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 722b76411bc..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/endpoint/EndpointMapping.java b/appserver/tests/jbi/service_unit/endpoint_mapping/endpoint/EndpointMapping.java deleted file mode 100644 index ab0fad2334d..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/endpoint/EndpointMapping.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.Oneway; - -@WebService( - name="EndpointMapping", - serviceName="EndpointMappingService", - targetNamespace="http://example.web.service/EndpointMapping" -) -public class EndpointMapping { - public EndpointMapping() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) throws Exception { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - //throw new java.lang.Exception("This is my exception"); - return k; - } -} diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/javaee-se-serviceunit/assembly/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/javaee-se-serviceunit/assembly/META-INF/jbi.xml deleted file mode 100755 index cefc140a066..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/javaee-se-serviceunit/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - client_web_calculator_service_assembly - Client web calculator service assembly - - - - calc-web-client - provider service - - - calc-web-client-web.war - sun-javaee-engine - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/javaee-se-serviceunit/su/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/javaee-se-serviceunit/su/META-INF/jbi.xml deleted file mode 100755 index b7fcc2ba179..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/javaee-se-serviceunit/su/META-INF/jbi.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/sun-web.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/web.xml b/appserver/tests/jbi/service_unit/endpoint_mapping/web.xml deleted file mode 100644 index 872b2fa407c..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the EndpointMapping Service - EndpointMappingWAR - - - Endpoint for EndpointMapping Web Service - EndpointMappingWebService - EndpointMapping - endpoint.EndpointMapping - 0 - - - - EndpointMapping - /webservice/EndpointMappingService - - - - 54 - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping/webclient/client/Client.java b/appserver/tests/jbi/service_unit/endpoint_mapping/webclient/client/Client.java deleted file mode 100644 index c35632f155b..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping/webclient/client/Client.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.endpointmapping.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/calculator") EndpointMappingService service; - EndpointMappingService service = new EndpointMappingService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - PrintWriter out=null; - try { - System.out.println(" Service is :" + service); - resp.setContentType("text/html"); - out = resp.getWriter(); - EndpointMapping port = service.getEndpointMappingPort(); - int ret = port.add(1, 2); - printSuccess(out,ret); - } catch(java.lang.Exception e) { - //e.printStackTrace(); - printFailure(out, e.getMessage()); - } finally { - if(out != null) { - out.flush(); - out.close(); - } - } - } - - public void printFailure(PrintWriter out, String errMsg) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Test FAILED: Error message - " + errMsg); - out.println("

    "); - out.println(""); - out.println(""); - } - - public void printSuccess(PrintWriter out, int result) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Result is : " + result); - out.println("

    "); - out.println(""); - out.println(""); - } -} - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/RepRunConf.txt b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/RepRunConf.txt deleted file mode 100644 index 8a9f4a7b8f4..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/RepRunConf.txt +++ /dev/null @@ -1,41 +0,0 @@ - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - - -Test has been reported diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/build.properties b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/build.properties deleted file mode 100644 index c221835bb88..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/build.properties +++ /dev/null @@ -1,48 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/build.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/build.xml deleted file mode 100644 index 75f67cc155f..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/build.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client-sun-web.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client-web.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client/TestClient.java b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client/TestClient.java deleted file mode 100644 index 0dbf6be1231..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/client/TestClient.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String testId = "jbi-serviceengine/service_unit/endpoint_mapping_consumer"; - - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF EndpointMappingConsumer add SERVICE IS") != -1) - found1 = true; - if(line.indexOf("[3]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/endpoint/EndpointMappingConsumer.java b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/endpoint/EndpointMappingConsumer.java deleted file mode 100644 index f38fb98abe2..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/endpoint/EndpointMappingConsumer.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; - -@WebService( - name="EndpointMappingConsumer", - serviceName="EndpointMappingConsumerService", - targetNamespace="http://example.web.service/EndpointMappingConsumer" -) -public class EndpointMappingConsumer { - public EndpointMappingConsumer() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - - return k; - } -} diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/jbi.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/jbi.xml deleted file mode 100644 index c2064dbe244..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/jbi.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/assembly/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/assembly/META-INF/jbi.xml deleted file mode 100755 index e238cd6b104..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - client_web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - client_consumer_for_web_calculator - consumer service to the soap binding - - - client_web_calculator_consumer_su.jar - sun-http-binding - - - - - wsclient - Represents this Service Unit - - - wsclient.war - sun-javaee-engine - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService.wsdl b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService.wsdl deleted file mode 100644 index f1ae7ed79df..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService.wsdl +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService_schema1.xsd b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService_schema1.xsd deleted file mode 100644 index 5fc7552b4db..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService_schema1.xsd +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/META-INF/jbi.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/META-INF/jbi.xml deleted file mode 100755 index 7549a049ebc..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/META-INF/jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/endpoints.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/endpoints.xml deleted file mode 100755 index 7e1ae8076b9..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-http-binding/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-web.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/web.xml b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/web.xml deleted file mode 100644 index ca8895016bc..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the EndpointMappingConsumer Service - EndpointMappingConsumerWAR - - - Endpoint for EndpointMappingConsumer Web Service - EndpointMappingConsumerWebService - EndpointMappingConsumer - endpoint.EndpointMappingConsumer - 0 - - - - EndpointMappingConsumer - /webservice/EndpointMappingConsumerService - - - - 54 - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/Client.java b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/Client.java deleted file mode 100644 index 9c8094a924b..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/Client.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.endpointmappingconsumer.*; - -public class Client extends HttpServlet { - - @WebServiceRef EndpointMappingConsumerService service; - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - try { - System.out.println(" Service is :" + service); - EndpointMappingConsumer port = service.getEndpointMappingConsumerPort(); - int ret = port.add(1, 2); - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF EndpointMappingConsumer add SERVICE IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - out.flush(); - out.close(); - } catch(Exception e) { - e.printStackTrace(); - } - } -} - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService.wsdl b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService.wsdl deleted file mode 100644 index 300fe01456e..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService.wsdl +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService_schema1.xsd b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService_schema1.xsd deleted file mode 100644 index 5fc7552b4db..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService_schema1.xsd +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EnpointMappingConsumerService_schema1.xsd b/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EnpointMappingConsumerService_schema1.xsd deleted file mode 100644 index 5fc7552b4db..00000000000 --- a/appserver/tests/jbi/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EnpointMappingConsumerService_schema1.xsd +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/README b/appserver/tests/jbi/soapfault/README deleted file mode 100644 index 04ab46ab62c..00000000000 --- a/appserver/tests/jbi/soapfault/README +++ /dev/null @@ -1,3 +0,0 @@ -There are 3 tests in this directory. They test that exceptions are properly -propagated through the JavaEE service engine to the webservice endpoints. -Service engine acts as a provider, consumer and consumer&provider in these 3 tests. diff --git a/appserver/tests/jbi/soapfault/build.xml b/appserver/tests/jbi/soapfault/build.xml deleted file mode 100644 index baa085d7f4b..00000000000 --- a/appserver/tests/jbi/soapfault/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - -]> - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/README b/appserver/tests/jbi/soapfault/se_consumer/README deleted file mode 100644 index f8a75d6848c..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/README +++ /dev/null @@ -1,23 +0,0 @@ -The sample tests that exceptions are properly propagated through JavaEE service -engine to the JavaEE component that requested for the webservice. Service engine -acts as a consumer in this test. - -There is a Calculator web service, deployed as a servlet, with only one -operation add which throws an exception. This webservice has it's jbi-enabled -flag as false. Another servlet is deployed which has it's jbi-enabled flag as -true. This servlet requests for the Calculator webservice and the call goes -through the service engine. -Client is a standalone java application which sends request to the servlet -which inturn calls the calculator webservice. - -ant all of this sample does the following : - -1. compiles and deploys the web service on application server. - -2. compiles and deploys the servlet that requests for above web service, - deploys a consumer service unit on SOAP Binding - -2. runs the client which invokes the servlet. - -3. undeploy applications from app server and service assembly deployment from - SOAP Binding. diff --git a/appserver/tests/jbi/soapfault/se_consumer/build.properties b/appserver/tests/jbi/soapfault/se_consumer/build.properties deleted file mode 100644 index 5809d41a8be..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/build.xml b/appserver/tests/jbi/soapfault/se_consumer/build.xml deleted file mode 100644 index 3eab8f659ea..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/client-jbi.xml b/appserver/tests/jbi/soapfault/se_consumer/client-jbi.xml deleted file mode 100644 index dd398e1e6a0..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/client-jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/client-sun-web.xml b/appserver/tests/jbi/soapfault/se_consumer/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/client-web.xml b/appserver/tests/jbi/soapfault/se_consumer/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/client/TestClient.java b/appserver/tests/jbi/soapfault/se_consumer/client/TestClient.java deleted file mode 100644 index a8d981db661..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/client/TestClient.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/soapfault/se_consumer"; - - public boolean found1 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("Exception thrown Successfully") != -1) - found1 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/soapfault/se_consumer/endpoint/Calculator.java b/appserver/tests/jbi/soapfault/se_consumer/endpoint/Calculator.java deleted file mode 100644 index 0b76363018c..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/endpoint/Calculator.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.Oneway; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator" -) -public class Calculator { - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) throws Exception { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - throw new java.lang.Exception("This is my exception"); - //return k; - } -} diff --git a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml deleted file mode 100644 index 6dbbc1edcc0..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - client_web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - client_consumer_for_web_calculator - consumer service to the soap binding - - - client_web_calculator_consumer_su.jar - sun-http-binding - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService.wsdl deleted file mode 100644 index b961d522a90..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService_schema1.xsd deleted file mode 100644 index 4242392a5b5..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/META-INF/jbi.xml deleted file mode 100644 index abd27971d8e..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/META-INF/jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/endpoints.xml deleted file mode 100644 index 9ea3dd41920..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/soap-binding-su-alaska/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/sun-web.xml b/appserver/tests/jbi/soapfault/se_consumer/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/web.xml b/appserver/tests/jbi/soapfault/se_consumer/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/soapfault/se_consumer/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/soapfault/se_consumer/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_consumer/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumer/webclient/client/Client.java b/appserver/tests/jbi/soapfault/se_consumer/webclient/client/Client.java deleted file mode 100644 index b726bd7cf2b..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumer/webclient/client/Client.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.calculator.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service; - CalculatorService service = new CalculatorService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - PrintWriter out=null; - try { - System.out.println(" Service is :" + service); - resp.setContentType("text/html"); - out = resp.getWriter(); - Calculator port = service.getCalculatorPort(); - int ret = port.add(1, 2); - printFailure(out); - } catch(java.lang.Exception e) { - e.printStackTrace(); - if(e instanceof service.web.example.calculator.Exception_Exception) { - printSuccess(out); - } - } finally { - if(out != null) { - out.flush(); - out.close(); - } - } - } - - public void printFailure(PrintWriter out) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Test FAILED: SOAPFaultException not thrown"); - out.println("

    "); - out.println(""); - out.println(""); - } - - public void printSuccess(PrintWriter out) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Exception thrown Successfully"); - out.println("

    "); - out.println(""); - out.println(""); - } -} - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/README b/appserver/tests/jbi/soapfault/se_consumerNprovider/README deleted file mode 100644 index b128aa86b5c..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/README +++ /dev/null @@ -1,23 +0,0 @@ -The sample tests that exceptions are properly propagated through JavaEE service -engine both to the JavaEE component and to the standalone client that requested -the service. Service engine acts as a consumer as well as a provider in this test. - -There is a Calculator web service, deployed as a servlet, with only one -operation add which throws an exception. This webservice has it's jbi-enabled -flag as true. Another servlet is deployed which has it's jbi-enabled flag as -true. This servlet requests for the Calculator webservice and the call goes -through the service engine. -Client is a standalone java application which sends request to the servlet -which inturn calls the calculator webservice. - -ant all of this sample does the following : - -1. compiles and deploys the web service on application server. - -2. compiles and deploys the servlet that requests for above web service, - deploys a consumer service unit on SOAP Binding - -2. runs the client which invokes the servlet. - -3. undeploy applications from app server and service assembly deployment from - SOAP Binding. diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/build.properties b/appserver/tests/jbi/soapfault/se_consumerNprovider/build.properties deleted file mode 100644 index 5809d41a8be..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/build.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/build.xml deleted file mode 100644 index 25d29e77819..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/client-jbi.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/client-jbi.xml deleted file mode 100644 index dd398e1e6a0..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/client-jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/client-sun-web.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/client-web.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/client/TestClient.java b/appserver/tests/jbi/soapfault/se_consumerNprovider/client/TestClient.java deleted file mode 100644 index 9061832b9a5..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/client/TestClient.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/soapfault/se_consumerNprovider"; - - public boolean found1 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("Exception thrown Successfully") != -1) - found1 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/endpoint/Calculator.java b/appserver/tests/jbi/soapfault/se_consumerNprovider/endpoint/Calculator.java deleted file mode 100644 index 438ac880761..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/endpoint/Calculator.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.Oneway; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator" -) -public class Calculator { - public Calculator() {} - - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) throws Exception { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - throw new java.lang.Exception("This is my exception..."); - //return k; - } -/* - @WebMethod(operationName="subtract", action="urn:Subtract") - @Oneway - public void subtract(int i, int j) { - int k = i -j ; - System.out.println(i + "-" + j +" = " + k); - if(i == 101) - throw new RuntimeException("This is my exception in subtract ..."); - } -*/ -} diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/assembly/META-INF/jbi.xml deleted file mode 100644 index 6dbbc1edcc0..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - client_web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - client_consumer_for_web_calculator - consumer service to the soap binding - - - client_web_calculator_consumer_su.jar - sun-http-binding - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService.wsdl deleted file mode 100644 index b961d522a90..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd deleted file mode 100644 index 4242392a5b5..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/META-INF/jbi.xml deleted file mode 100644 index abd27971d8e..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/META-INF/jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/endpoints.xml deleted file mode 100644 index 9ea3dd41920..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/sun-web.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/web.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/client/Client.java b/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/client/Client.java deleted file mode 100644 index be83acccda6..00000000000 --- a/appserver/tests/jbi/soapfault/se_consumerNprovider/webclient/client/Client.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.calculator.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service; - CalculatorService service = new CalculatorService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - PrintWriter out=null; - try { - System.out.println(" Service is :" + service); - resp.setContentType("text/html"); - out = resp.getWriter(); - Calculator port = service.getCalculatorPort(); - int ret = port.add(1, 2); - printFailure(out); - } catch(java.lang.Exception e) { - e.printStackTrace(); - printSuccess(out); - } finally { - if(out != null) { - out.flush(); - out.close(); - } - } - } - - public void printFailure(PrintWriter out) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Test FAILED: SOAPFaultException not thrown"); - out.println("

    "); - out.println(""); - out.println(""); - } - - public void printSuccess(PrintWriter out) { - if(out == null) return; - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("Exception thrown Successfully"); - out.println("

    "); - out.println(""); - out.println(""); - } -} - diff --git a/appserver/tests/jbi/soapfault/se_provider/README b/appserver/tests/jbi/soapfault/se_provider/README deleted file mode 100644 index d707b4d4961..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/README +++ /dev/null @@ -1,17 +0,0 @@ -The sample tests that exceptions are properly propagated through the JavaEE -service engine to the webservice client. Service engine acts as a provider in -this test. - -There is a Calculator web service, packaged as a servlet, with only one -operation add which throws an exception. Client is a standalone java -application which sends request to the webservice through SOAPBinding. - -ant all of this sample does the following : - -1. compiles and deploys the web service on application server, deploys a - producer service unit on SOAP Binding - -2. runs the client which makes a webservice request through SOAP binding. - -3. undeploy application from app server and service assembly deployment from -SOAP Binding. diff --git a/appserver/tests/jbi/soapfault/se_provider/build.properties b/appserver/tests/jbi/soapfault/se_provider/build.properties deleted file mode 100644 index 275f7d82965..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_provider/build.xml b/appserver/tests/jbi/soapfault/se_provider/build.xml deleted file mode 100644 index aa0fd8646e8..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/build.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_provider/client/SOAPWebConsumer.java b/appserver/tests/jbi/soapfault/se_provider/client/SOAPWebConsumer.java deleted file mode 100644 index fe4e1463fb4..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/client/SOAPWebConsumer.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; -import javax.xml.ws.WebServiceRef; -import javax.xml.ws.Service; -import javax.xml.ws.BindingProvider; -import javax.xml.ws.soap.SOAPFaultException; -import com.example.calculator.CalculatorService; -import com.example.calculator.Calculator; -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class SOAPWebConsumer { - //@WebServiceRef(wsdlLocation="http://localhost:12011/calculatorendpoint/CalculatorService?WSDL") - //static CalculatorService service; - CalculatorService service = new CalculatorService(); - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - private static String testId = "jbi-serviceengine/soapfault/se_provider"; - - public static void main (String[] args) { - stat.addDescription(testId); - SOAPWebConsumer client = new SOAPWebConsumer(); - client.addUsingSOAPConsumer(); - stat.printSummary(testId ); - } - - private void addUsingSOAPConsumer() { - com.example.calculator.Calculator port= null; - - port = service.getCalculatorPort(); - - // Get Stub - BindingProvider stub = (BindingProvider)port; - String endpointURI ="http://localhost:12011/calculatorendpoint"; - stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - endpointURI); - - String failedMsg = null; - - try { - System.out.println("\nInvoking throwRuntimeException"); - port.throwRuntimeException("bhavani"); - } catch(Exception ex) { - System.out.println(ex); - if(!(ex instanceof SOAPFaultException) || - !(ex.getMessage().equals("java.lang.RuntimeException: Calculator :: Threw Runtime Exception"))) { - failedMsg = "port.throwRuntimeException() did not receive RuntimeException 'Calculator :: Threw Runtime Exception'"; - } - } - - try { - System.out.println("\nInvoking throwApplicationException"); - port.throwApplicationException("bhavani"); - } catch(Exception ex) { - System.out.println(ex); - if(!(ex instanceof com.example.calculator.Exception_Exception)) { - failedMsg = "port.throwApplicationException() did not throw ApplicationException"; - } - } - - if(failedMsg != null) { - stat.addStatus(testId, stat.FAIL); - } else { - stat.addStatus(testId, stat.PASS); - } - } -} diff --git a/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 3cd22a36704..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Provider - - - - dummy_client_su - provider service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 1f3626ab3b1..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/soapfault/se_provider/endpoint/Calculator.java b/appserver/tests/jbi/soapfault/se_provider/endpoint/Calculator.java deleted file mode 100644 index 2a4ec8e9604..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/endpoint/Calculator.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.com/Calculator" -) - -public class Calculator { - public Calculator() {} - - - @WebMethod(operationName="throwRuntimeException", action="urn:ThrowRuntimeException") - public String throwRuntimeException(String name) { - String exceptionMsg = "Calculator :: Threw Runtime Exception"; - System.out.println(exceptionMsg); - throw new RuntimeException(exceptionMsg); - } - - @WebMethod(operationName="throwApplicationException", action="urn:ThrowApplicationException") - public String throwApplicationException(String name) throws Exception { - String exceptionMsg = "Calculator :: Threw Application Exception"; - System.out.println(exceptionMsg); - throw new Exception(exceptionMsg); - } -} diff --git a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml deleted file mode 100644 index 73a641a5db2..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - web_calculator_consumer_assembly - This is an AU for Soap Binding deployments - - - - consumer_for_web_calculator - consumer service to the soap binding - - - web_calculator_consumer_su.jar - sun-http-binding - - - - diff --git a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl deleted file mode 100644 index fdd41f20ad5..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd deleted file mode 100644 index 64117a7960f..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml deleted file mode 100644 index fdb58a42e03..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - WSDL11 - - diff --git a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/endpoints.xml deleted file mode 100644 index a3fa169c46c..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/soap-binding-su-alaska/su/endpoints.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/appserver/tests/jbi/soapfault/se_provider/web.xml b/appserver/tests/jbi/soapfault/se_provider/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/soapfault/se_provider/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/transactions/README b/appserver/tests/jbi/transactions/README deleted file mode 100644 index 414aa54965d..00000000000 --- a/appserver/tests/jbi/transactions/README +++ /dev/null @@ -1,10 +0,0 @@ -This directory contains tests to check the transaction feature in JavaEE service engine. - -These tests require database to be up and running. -Every test here creates a different table and drops that table in the end of the execution. - -Tests jse_only* have JavaEE SE as consumer as well as provider. No binding component is used in these tests. - -How to Run: -1. Start appserver and start database. -2. asant all diff --git a/appserver/tests/jbi/transactions/build.xml b/appserver/tests/jbi/transactions/build.xml deleted file mode 100644 index 178766f1ae5..00000000000 --- a/appserver/tests/jbi/transactions/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - -]> - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only/README b/appserver/tests/jbi/transactions/jse_only/README deleted file mode 100644 index 3c0e30a2300..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/README +++ /dev/null @@ -1 +0,0 @@ -This is a simple test that executes a calculator webservice. Nothing related to transaction is done here. This ensures that the normal path works fine. diff --git a/appserver/tests/jbi/transactions/jse_only/build.properties b/appserver/tests/jbi/transactions/jse_only/build.properties deleted file mode 100644 index dda2ba2f263..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only/build.xml b/appserver/tests/jbi/transactions/jse_only/build.xml deleted file mode 100644 index b0ac0f4f6e0..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/build.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only/client-jbi.xml b/appserver/tests/jbi/transactions/jse_only/client-jbi.xml deleted file mode 100644 index a6882f2bd99..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/client-jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only/client-sun-web.xml b/appserver/tests/jbi/transactions/jse_only/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only/client-web.xml b/appserver/tests/jbi/transactions/jse_only/client-web.xml deleted file mode 100644 index e319c435c05..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/client-web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - - 54 - - - diff --git a/appserver/tests/jbi/transactions/jse_only/client/TestClient.java b/appserver/tests/jbi/transactions/jse_only/client/TestClient.java deleted file mode 100644 index 923e9a46c09..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/client/TestClient.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/transactions/jse_only"; - - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF Calculator add SERVICE IS") != -1) - found1 = true; - if(line.indexOf("[3]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/transactions/jse_only/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 94505c53a2f..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Consumer - - - - dummy_client_su - consumer service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/transactions/jse_only/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index b44763b481d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only/endpoint/Calculator.java b/appserver/tests/jbi/transactions/jse_only/endpoint/Calculator.java deleted file mode 100644 index 4ddfc8bebd3..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/endpoint/Calculator.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint; - -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; - -@WebService( - name="Calculator", - serviceName="CalculatorService", - targetNamespace="http://example.web.service/Calculator" -) -public class Calculator { - public Calculator() {} - - @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) - @WebMethod(operationName="add", action="urn:Add") - public int add(int i, int j) { - int k = i +j ; - System.out.println(i + "+" + j +" = " + k); - - return k; - } -} diff --git a/appserver/tests/jbi/transactions/jse_only/sun-web.xml b/appserver/tests/jbi/transactions/jse_only/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only/web.xml b/appserver/tests/jbi/transactions/jse_only/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/transactions/jse_only/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only/webclient/client/Client.java b/appserver/tests/jbi/transactions/jse_only/webclient/client/Client.java deleted file mode 100644 index 314619c794f..00000000000 --- a/appserver/tests/jbi/transactions/jse_only/webclient/client/Client.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.servlet.*; -import javax.servlet.http.*; -import javax.naming.InitialContext; -import javax.transaction.UserTransaction; -import java.io.IOException; -import java.io.PrintWriter; - -import javax.xml.ws.*; -import service.web.example.calculator.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service; - CalculatorService service = new CalculatorService(); - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - UserTransaction ut = null; - try { - ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction"); - ut.begin(); - System.out.println(" Service is :" + service); - Calculator port = service.getCalculatorPort(); - int ret = port.add(1, 2); - ut.commit(); - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF Calculator add SERVICE IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - out.flush(); - out.close(); - } catch(Exception e) { - try { - if(ut != null) - ut.rollback(); - } catch (Exception ex) { - ex.printStackTrace(); - } - e.printStackTrace(); - } - } -} - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/README b/appserver/tests/jbi/transactions/jse_only_ejbcommit/README deleted file mode 100644 index 46a300dd71d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/README +++ /dev/null @@ -1,12 +0,0 @@ -This tests the commit logic of transaction. An EJB webservice is invoked by a servlet. This webservice method uses REQUIRED TX_Attribute. It adds a row in the database table(CUSTOMER_cm) created in the servlet. - -Here is the flow- - -1. Standalone client invokes a servlet -2. Servlet creates table CUSTOMER_cm -3. Servlet starts a UserTransaction -4. Servlet calls the EJB webservice -5. EJB webservice adds a row in the CUSTOMER_cm table -6. Servlet commits the transaction -7. It is checked whether the data is correctly updated in the table. -8. Table CUSTOMER_cm is dropped diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/build.properties b/appserver/tests/jbi/transactions/jse_only_ejbcommit/build.properties deleted file mode 100644 index e5717ed64b9..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/build.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/build.xml deleted file mode 100644 index 9b5ee34f641..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-jbi.xml deleted file mode 100644 index a2e71645699..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-sun-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-web.xml deleted file mode 100644 index 149ffa9c7b8..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/client-web.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - service ref for ejb endpoint - service/helloservice - javax.xml.rpc.Service - - endpoint.ejb.Hello - - - - - 54 - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/client/TestClient.java b/appserver/tests/jbi/transactions/jse_only_ejbcommit/client/TestClient.java deleted file mode 100644 index d196f32aa5c..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/client/TestClient.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/transactions/jse_only_ejbcommit"; - - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF EJB webservice IS") != -1) - found1 = true; - if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 94505c53a2f..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Consumer - - - - dummy_client_su - consumer service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 3604763f4c6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/endpoint/ejb/Hello.java b/appserver/tests/jbi/transactions/jse_only_ejbcommit/endpoint/ejb/Hello.java deleted file mode 100644 index 765d83844bf..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/endpoint/ejb/Hello.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; - -@WebService( -targetNamespace="http://endpoint/ejb") -public interface Hello { - - public String sayHello(String who); -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/endpoint/ejb/HelloEJB.java b/appserver/tests/jbi/transactions/jse_only_ejbcommit/endpoint/ejb/HelloEJB.java deleted file mode 100644 index 1b0e7ff944c..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/endpoint/ejb/HelloEJB.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; -import javax.xml.ws.WebServiceRef; -import javax.ejb.Stateless; -import javax.ejb.SessionContext; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.annotation.Resource; -import java.sql.*; -import javax.sql.DataSource; - -@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb") -@Stateless -public class HelloEJB implements Hello { - - @Resource private SessionContext ctx; - @Resource(mappedName="jdbc/__default") private DataSource ds; - - @TransactionAttribute(TransactionAttributeType.REQUIRED) - public String sayHello(String who) { - System.out.println("**** EJB Called"); - Connection con=null; - String tableName = "CUSTOMER_cm"; - try { - con = ds.getConnection(); - System.out.println("**** auto commit = " + con.getAutoCommit()); - - updateTable(con, tableName, "Vikas", "vikas@sun.com"); - readData(con, tableName); - } catch(Exception ex) { - throw new RuntimeException(ex); - } finally { - try { - if(con != null) con.close(); - } catch (SQLException se) {} - } - //ctx.setRollbackOnly(); - return "WebSvcTest-Hello " + who; - } - - private void updateTable(Connection con, String tableName, String name, String email) throws Exception { - PreparedStatement pStmt = - con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)"); - pStmt.setString(1, name); - pStmt.setString(2, email); - pStmt.executeUpdate(); - } - - private void readData(Connection con, String tableName) throws Exception { - PreparedStatement pStmt = - con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName); - ResultSet rs = pStmt.executeQuery(); - while(rs.next()){ - System.out.println("NAME="+rs.getString(1)+", EMAIL="+rs.getString(2)); - } - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/sun-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/web.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/client/Client.java b/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/client/Client.java deleted file mode 100644 index a5605472c14..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit/webclient/client/Client.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.annotation.Resource; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.naming.InitialContext; -import javax.transaction.UserTransaction; -import javax.transaction.Status; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.*; -import javax.sql.DataSource; - -import javax.xml.ws.*; -import endpoint.ejb.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/HelloEJBService") - HelloEJBService service = new HelloEJBService(); - - @Resource(mappedName="jdbc/__default") private DataSource ds; - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - UserTransaction ut = null; - // Create Table with name CUSTOMER_cm. This name will be used in the EJB - String tableName = "CUSTOMER_cm"; - String nameEntry = "Vikas"; - String emailEntry= "vikas@sun.com"; - try { - Connection con = ds.getConnection(); - // autocommit is made true so that the table is created and dropped immediately - con.setAutoCommit(true); - createTable(con, tableName); - ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction"); - ut.begin(); - - System.out.println(" Service is :" + service); - Hello port = service.getHelloEJBPort(); - - String ret = port.sayHello("Appserver Tester !"); - System.out.println("Return value from webservice:"+ret); - - if(ut.getStatus() != Status.STATUS_ACTIVE) { - ret += "FAILED"; - } else { - System.out.println("**** committing transaction"); - ut.commit(); - if(!isDataUpdated(con, tableName, nameEntry, emailEntry)) { - ret += "FAILED"; - } - } - - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF EJB webservice IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - dropTable(con, tableName); - } catch(Exception e) { - e.printStackTrace(); - } - } - - // use this table in the EJB webservice - private void createTable(Connection con, String tableName) throws Exception { - System.out.println("**** auto commit = " + con.getAutoCommit()); - PreparedStatement pStmt = - con.prepareStatement("CREATE TABLE "+tableName+" (NAME VARCHAR(30) NOT NULL PRIMARY KEY, EMAIL VARCHAR(30))"); - pStmt.executeUpdate(); - } - - private void dropTable(Connection con, String tableName) throws Exception { - PreparedStatement pStmt = con.prepareStatement("DROP TABLE "+tableName); - pStmt.executeUpdate(); - } - - // Check whether the EJB webservice has updated the data in the table. - private boolean isDataUpdated(Connection con, String tableName, String name, String email) throws Exception { - PreparedStatement pStmt = con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName); - ResultSet rs = pStmt.executeQuery(); - try { - while(rs.next()) { - String db_Name = rs.getString(1); - String db_Email = rs.getString(2); - System.out.println("NAME="+db_Name+", EMAIL="+db_Email); - if(db_Name.equals(name) && db_Email.equals(email)) - return true; - } - } finally { - rs.close(); - } - return false; - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/README b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/README deleted file mode 100644 index d4ba329de67..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/README +++ /dev/null @@ -1,13 +0,0 @@ -This tests the commit logic of transaction. An EJB webservice is invoked by a servlet. This webservice method uses REQUIRED TX_Attribute. It adds a row in the database table(CUSTOMER_cm1) created in the servlet. - -Here is the flow- - -1. Standalone client invokes a servlet -2. Servlet creates table CUSTOMER_cm1 -3. Servlet starts a UserTransaction -4. Servlet adds a row in the CUSTOMER_cm1 table -5. Servlet calls the EJB webservice -6. EJB webservice adds a row in the CUSTOMER_cm1 table -7. Servlet commits the transaction -8. It is checked whether the data is correctly updated in the table. -9. Table CUSTOMER_cm1 is dropped diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/build.properties b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/build.properties deleted file mode 100644 index e5717ed64b9..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/build.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/build.xml deleted file mode 100644 index d7567b36d17..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-jbi.xml deleted file mode 100644 index a2e71645699..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-sun-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-web.xml deleted file mode 100644 index 149ffa9c7b8..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client-web.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - service ref for ejb endpoint - service/helloservice - javax.xml.rpc.Service - - endpoint.ejb.Hello - - - - - 54 - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client/TestClient.java b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client/TestClient.java deleted file mode 100644 index b6ef2fc1064..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/client/TestClient.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/transactions/jse_only_ejbcommit1"; - - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF EJB webservice IS") != -1) - found1 = true; - if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 94505c53a2f..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Consumer - - - - dummy_client_su - consumer service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 3604763f4c6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/endpoint/ejb/Hello.java b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/endpoint/ejb/Hello.java deleted file mode 100644 index 765d83844bf..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/endpoint/ejb/Hello.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; - -@WebService( -targetNamespace="http://endpoint/ejb") -public interface Hello { - - public String sayHello(String who); -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/endpoint/ejb/HelloEJB.java b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/endpoint/ejb/HelloEJB.java deleted file mode 100644 index be61a875ff3..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/endpoint/ejb/HelloEJB.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; -import javax.xml.ws.WebServiceRef; -import javax.ejb.Stateless; -import javax.ejb.SessionContext; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.annotation.Resource; -import java.sql.*; -import javax.sql.DataSource; - -@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb") -@Stateless -public class HelloEJB implements Hello { - - @Resource private SessionContext ctx; - @Resource(mappedName="jdbc/__default") private DataSource ds; - - @TransactionAttribute(TransactionAttributeType.REQUIRED) - public String sayHello(String who) { - System.out.println("**** EJB Called"); - Connection con=null; - String tableName = "CUSTOMER_cm"; - String nameEntry = "Vikas"; - String emailEntry= "vikas@sun.com"; - - try { - con = ds.getConnection(); - System.out.println("**** auto commit = " + con.getAutoCommit()); - - updateTable(con, tableName, nameEntry, emailEntry); - readData(con, tableName); - } catch(Exception ex) { - throw new RuntimeException(ex); - } finally { - try { - if(con != null) con.close(); - } catch (SQLException se) {} - } - //ctx.setRollbackOnly(); - return "WebSvcTest-Hello " + who; - } - - private void updateTable(Connection con, String tableName, String name, String email) throws Exception { - PreparedStatement pStmt = - con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)"); - pStmt.setString(1, name); - pStmt.setString(2, email); - pStmt.executeUpdate(); - } - - private void readData(Connection con, String tableName) throws Exception { - PreparedStatement pStmt = - con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName); - ResultSet rs = pStmt.executeQuery(); - while(rs.next()){ - System.out.println("NAME="+rs.getString(1)+", EMAIL="+rs.getString(2)); - } - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/sun-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/web.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/client/Client.java b/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/client/Client.java deleted file mode 100644 index 4da1af33f9f..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbcommit1/webclient/client/Client.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.annotation.Resource; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.naming.InitialContext; -import javax.transaction.UserTransaction; -import javax.transaction.Status; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.*; -import javax.sql.DataSource; - -import javax.xml.ws.*; -import endpoint.ejb.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/HelloEJBService") - HelloEJBService service = new HelloEJBService(); - - @Resource(mappedName="jdbc/__default") private DataSource ds; - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - UserTransaction ut = null; - // Create Table with name CUSTOMER_cm1. This name will be used in the EJB - String tableName = "CUSTOMER_cm"; - String[] names = {"Vikas", "VikasAwasthi"}; - String[] emails= {"vikas@sun.com", "VikasA@sun.com"}; - try { - Connection con = ds.getConnection(); - createTable(con, tableName); - ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction"); - ut.begin(); - - System.out.println(" Service is :" + service); - Hello port = service.getHelloEJBPort(); - - String ret = port.sayHello("Appserver Tester !"); - System.out.println("Return value from webservice:"+ret); - - updateTable(con, tableName, names[1], emails[1]); - if(ut.getStatus() != Status.STATUS_ACTIVE) { - ret += "FAILED"; - } else { - System.out.println("**** committing transaction"); - ut.commit(); - if(!isDataUpdated(con, tableName, names, emails)) { - ret += "FAILED"; - } - } - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF EJB webservice IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - dropTable(con, tableName); - } catch(Exception e) { - e.printStackTrace(); - } - } - - // use this table in the EJB webservice - private void createTable(Connection con, String tableName) throws Exception { - // autocommit is made true so that the table is created immediately - boolean autoCommit = con.getAutoCommit(); - con.setAutoCommit(true); - System.out.println("**** auto commit = " + con.getAutoCommit()); - PreparedStatement pStmt = - con.prepareStatement("CREATE TABLE "+tableName+" (NAME VARCHAR(30) NOT NULL PRIMARY KEY, EMAIL VARCHAR(30))"); - pStmt.executeUpdate(); - con.setAutoCommit(autoCommit); - } - - private void dropTable(Connection con, String tableName) throws Exception { - boolean autoCommit = con.getAutoCommit(); - con.setAutoCommit(true); - PreparedStatement pStmt = con.prepareStatement("DROP TABLE "+tableName); - pStmt.executeUpdate(); - con.setAutoCommit(autoCommit); - } - - // Check whether the EJB webservice has updated the data in the table. - private boolean isDataUpdated(Connection con, String tableName, String[] names, String[] emails) throws Exception { - PreparedStatement pStmt = con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName); - ResultSet rs = pStmt.executeQuery(); - int allDataCount = 0; - while(rs.next()) { - String db_Name = rs.getString(1); - String db_Email = rs.getString(2); - System.out.println("NAME="+db_Name+", EMAIL="+db_Email); - for (int i=0; i < names.length; i++) - if(db_Name.equals(names[i]) && db_Email.equals(emails[i])) - allDataCount++; - } - rs.close(); - return (allDataCount == names.length); - } - - private void updateTable(Connection con, String tableName, String name, String email) - throws Exception { - PreparedStatement pStmt = - con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)"); - pStmt.setString(1, name); - pStmt.setString(2, email); - pStmt.executeUpdate(); - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/README b/appserver/tests/jbi/transactions/jse_only_ejbrollback/README deleted file mode 100644 index 20e70e96e36..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/README +++ /dev/null @@ -1,14 +0,0 @@ -This tests the rollback logic of transaction. An EJB webservice is invoked by a servlet. This webservice method uses REQUIRED TX_Attribute. - -Here is the flow- - -1. Standalone client invokes a servlet -2. Servlet creates table CUSTOMER_rb1 -3. Servlet starts a UserTransaction -4. Servlet adds a row in the CUSTOMER_rb1 table -5. Servlet calls the EJB webservice -6. EJB webservice adds a row in the CUSTOMER_rb1 table -7. Transaction is rolledback using SessionContext.setRollbackOnly() -8. Servlet rollback the transaction -9. It is checked that the data is not updated in the table. -10. Table CUSTOMER_rb1 is dropped diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/build.properties b/appserver/tests/jbi/transactions/jse_only_ejbrollback/build.properties deleted file mode 100644 index e5717ed64b9..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/build.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/build.xml deleted file mode 100644 index 106019e735e..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-jbi.xml deleted file mode 100644 index a2e71645699..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-sun-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-web.xml deleted file mode 100644 index 149ffa9c7b8..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/client-web.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - service ref for ejb endpoint - service/helloservice - javax.xml.rpc.Service - - endpoint.ejb.Hello - - - - - 54 - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/client/TestClient.java b/appserver/tests/jbi/transactions/jse_only_ejbrollback/client/TestClient.java deleted file mode 100644 index de014ac6410..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/client/TestClient.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/transactions/jse_only_ejbrollback"; - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF EJB webservice IS") != -1) - found1 = true; - if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 94505c53a2f..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Consumer - - - - dummy_client_su - consumer service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 3604763f4c6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/endpoint/ejb/Hello.java b/appserver/tests/jbi/transactions/jse_only_ejbrollback/endpoint/ejb/Hello.java deleted file mode 100644 index 765d83844bf..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/endpoint/ejb/Hello.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; - -@WebService( -targetNamespace="http://endpoint/ejb") -public interface Hello { - - public String sayHello(String who); -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/endpoint/ejb/HelloEJB.java b/appserver/tests/jbi/transactions/jse_only_ejbrollback/endpoint/ejb/HelloEJB.java deleted file mode 100644 index 1fc334e66d9..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/endpoint/ejb/HelloEJB.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; -import javax.xml.ws.WebServiceRef; -import javax.ejb.Stateless; -import javax.ejb.SessionContext; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.annotation.Resource; -import java.sql.*; -import javax.sql.DataSource; - -@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb") -@Stateless -public class HelloEJB implements Hello { - - @Resource private SessionContext ctx; - @Resource(mappedName="jdbc/__default") private DataSource ds; - - @TransactionAttribute(TransactionAttributeType.REQUIRED) - public String sayHello(String who) { - System.out.println("**** EJB Called"); - Connection con=null; - String tableName = "CUSTOMER_rb"; - try { - con = ds.getConnection(); - System.out.println("**** auto commit = " + con.getAutoCommit()); - - updateTable(con, tableName, "Vikas", "vikas@sun.com"); - readData(con, tableName); - } catch(Exception ex) { - throw new RuntimeException(ex); - } finally { - try { - if(con != null) con.close(); - } catch (SQLException se) {} - } - ctx.setRollbackOnly(); - return "WebSvcTest-Hello " + who; - } - - private void updateTable(Connection con, String tableName, String name, String email) throws Exception { - PreparedStatement pStmt = - con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)"); - pStmt.setString(1, name); - pStmt.setString(2, email); - pStmt.executeUpdate(); - } - - private void readData(Connection con, String tableName) throws Exception { - PreparedStatement pStmt = - con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName); - ResultSet rs = pStmt.executeQuery(); - while(rs.next()){ - System.out.println("NAME="+rs.getString(1)+", EMAIL="+rs.getString(2)); - } - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/sun-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/web.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/client/Client.java b/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/client/Client.java deleted file mode 100644 index c3471d0d2ac..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback/webclient/client/Client.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.annotation.Resource; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.naming.InitialContext; -import javax.transaction.UserTransaction; -import javax.transaction.Status; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.*; -import javax.sql.DataSource; - -import javax.xml.ws.*; -import endpoint.ejb.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/HelloEJBService") - HelloEJBService service = new HelloEJBService(); - - @Resource(mappedName="jdbc/__default") private DataSource ds; - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - UserTransaction ut = null; - // Create Table with name CUSTOMER_rb. This name will be used in the EJB - String tableName = "CUSTOMER_rb"; - Connection con = null; - try { - con = ds.getConnection(); - con.setAutoCommit(true); - createTable(con, tableName); - ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction"); - ut.begin(); - - System.out.println(" Service is :" + service); - Hello port = service.getHelloEJBPort(); - - String ret = port.sayHello("Appserver Tester !"); - System.out.println("Return value from webservice:"+ret); - System.out.println("**** rollbacking transaction"); - // ut.rollback(); - ut.setRollbackOnly(); - if(ut.getStatus() != Status.STATUS_MARKED_ROLLBACK) { - ret += "FAILED"; - } - if(isDataPresent(con, tableName)) { - ret += "FAILED"; - } - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF EJB webservice IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - dropTable(con, tableName); - } catch(Exception e) { - e.printStackTrace(); - }finally { - try { - if(con != null) con.close(); - } catch (SQLException se) {} - } - } - - // use this table in the EJB webservice - private void createTable(Connection con, String tableName) throws Exception { - System.out.println("**** auto commit = " + con.getAutoCommit()); - PreparedStatement pStmt = - con.prepareStatement("CREATE TABLE "+tableName+" (NAME VARCHAR(30) NOT NULL PRIMARY KEY, EMAIL VARCHAR(30))"); - pStmt.executeUpdate(); - } - - private void dropTable(Connection con, String tableName) throws Exception { - PreparedStatement pStmt = con.prepareStatement("DROP TABLE "+tableName); - pStmt.executeUpdate(); - } - - // Check whether the EJB webservice has updated the data in the table. - private boolean isDataPresent(Connection con, String tableName) throws Exception { - PreparedStatement pStmt = con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName); - ResultSet rs = pStmt.executeQuery(); - while(rs.next()) { - String db_Name = rs.getString(1); - String db_Email = rs.getString(2); - System.out.println("NAME="+db_Name+", EMAIL="+db_Email); - rs.close(); - return true; - } - return false; - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/README b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/README deleted file mode 100644 index f227946fc00..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/README +++ /dev/null @@ -1,13 +0,0 @@ -This tests the rollback logic of transaction. An EJB webservice is invoked by a servlet. This webservice method uses REQUIRED TX_Attribute. - -Here is the flow- - -1. Standalone client invokes a servlet -2. Servlet creates table CUSTOMER_rb1 -3. Servlet starts a UserTransaction -4. Servlet adds a row in the CUSTOMER_rb1 table -5. Servlet calls the EJB webservice -6. EJB webservice adds a row in the CUSTOMER_rb1 table -7. Servlet rollback the transaction -8. It is checked that the data is not updated in the table. -9. Table CUSTOMER_rb1 is dropped diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/build.properties b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/build.properties deleted file mode 100644 index e5717ed64b9..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/build.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/build.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/build.xml deleted file mode 100644 index 106019e735e..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/build.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &jaxwsTools; - &jbiproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-jbi.xml deleted file mode 100644 index a2e71645699..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-jbi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-sun-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-web.xml deleted file mode 100644 index 149ffa9c7b8..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client-web.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - A test application - WebTier - - centralServlet - RequestProcessor - client.Client - - - RequestProcessor - /webclient/RequestProcessor - - - service ref for ejb endpoint - service/helloservice - javax.xml.rpc.Service - - endpoint.ejb.Hello - - - - - 54 - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client/TestClient.java b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client/TestClient.java deleted file mode 100644 index 0e5ebdfb915..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/client/TestClient.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; - -import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; - -public class TestClient { - - private static SimpleReporterAdapter stat = - new SimpleReporterAdapter("jbi"); - - private static String testId = "jbi-serviceengine/transactions/jse_only_ejbrollback1"; - - public boolean found1 = false; - public boolean found2 = false; - - public static void main (String[] args) { - stat.addDescription(testId); - TestClient client = new TestClient(); - client.doTest(args); - stat.printSummary(testId); - } - - public void doTest(String[] args) { - - String url = args[0]; - try { - int code = invokeServlet(url); - report(code); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - private int invokeServlet(String url) throws Exception { - log("Invoking url = " + url); - URL u = new URL(url); - HttpURLConnection c1 = (HttpURLConnection)u.openConnection(); - int code = c1.getResponseCode(); - InputStream is = c1.getInputStream(); - BufferedReader input = new BufferedReader (new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.indexOf("So the RESULT OF EJB webservice IS") != -1) - found1 = true; - if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1) - found2 = true; - } - return code; - } - - private void report(int code) { - if(code != 200) { - log("Incorrect return code: " + code); - fail(); - } - if(!found1) { - fail(); - } - if(!found2) { - fail(); - } - pass(); - } - - private void log(String message) { - System.out.println("[client.TestClient]:: " + message); - } - - private void pass() { - stat.addStatus(testId, stat.PASS); - } - - private void fail() { - stat.addStatus(testId, stat.FAIL); - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index 3755b34edc6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: jbiDummyApp -Bundle-Name: Dummy JBI App -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/assembly/META-INF/jbi.xml deleted file mode 100644 index 94505c53a2f..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - dummy_client_assembly - Dummy APP as Consumer - - - - dummy_client_su - consumer service - - - dummy_client_su.jar - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/su/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/su/META-INF/MANIFEST.MF deleted file mode 100644 index 7e2c5c74ded..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/su/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -DynamicImport-Package: * -Dynamic-Update: false -Bundle-Version: 1.0 -Bundle-Name: Dummy App -Created-By: 1.6.0_10 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: dummyApp - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/su/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/su/META-INF/jbi.xml deleted file mode 100644 index 3604763f4c6..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/dummy-client-su/su/META-INF/jbi.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/endpoint/ejb/Hello.java b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/endpoint/ejb/Hello.java deleted file mode 100644 index 765d83844bf..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/endpoint/ejb/Hello.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; - -@WebService( -targetNamespace="http://endpoint/ejb") -public interface Hello { - - public String sayHello(String who); -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/endpoint/ejb/HelloEJB.java b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/endpoint/ejb/HelloEJB.java deleted file mode 100644 index a22a558e900..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/endpoint/ejb/HelloEJB.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package endpoint.ejb; - -import javax.jws.WebService; -import javax.xml.ws.WebServiceRef; -import javax.ejb.Stateless; -import javax.ejb.SessionContext; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.annotation.Resource; -import java.sql.*; -import javax.sql.DataSource; - -@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb") -@Stateless -public class HelloEJB implements Hello { - - @Resource private SessionContext ctx; - @Resource(mappedName="jdbc/__default") private DataSource ds; - - @TransactionAttribute(TransactionAttributeType.REQUIRED) - public String sayHello(String who) { - System.out.println("**** EJB Called"); - Connection con=null; - String tableName = "CUSTOMER_rb1"; - String nameEntry = "Vikas"; - String emailEntry= "vikas@sun.com"; - - try { - con = ds.getConnection(); - System.out.println("**** auto commit = " + con.getAutoCommit()); - - updateTable(con, tableName, nameEntry, emailEntry); - readData(con, tableName); - } catch(Exception ex) { - throw new RuntimeException(ex); - } finally { - try { - if(con != null) con.close(); - } catch (SQLException se) {} - } - ctx.setRollbackOnly(); - return "WebSvcTest-Hello " + who; - } - - private void updateTable(Connection con, String tableName, String name, String email) throws Exception { - PreparedStatement pStmt = - con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)"); - pStmt.setString(1, name); - pStmt.setString(2, email); - pStmt.executeUpdate(); - } - - private void readData(Connection con, String tableName) throws Exception { - PreparedStatement pStmt = - con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName); - ResultSet rs = pStmt.executeQuery(); - while(rs.next()){ - System.out.println("NAME="+rs.getString(1)+", EMAIL="+rs.getString(2)); - } - } -} diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/sun-web.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/sun-web.xml deleted file mode 100644 index 3643b268c6d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/sun-web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - -9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/web.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/web.xml deleted file mode 100644 index 1299570a9fc..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - WebTier for the Calculator Service - CalculatorWAR - - - Endpoint for Calculator Web Service - CalculatorWebService - Calculator - endpoint.Calculator - 0 - - - - Calculator - /webservice/CalculatorService - - - - 54 - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/assembly/META-INF/MANIFEST.MF b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/assembly/META-INF/MANIFEST.MF deleted file mode 100644 index f68c049338e..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/assembly/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: Client_Assembly -Bundle-Name: Client_Assembly -Dynamic-Update: false -DynamicImport-Package: * diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/assembly/META-INF/jbi.xml b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/assembly/META-INF/jbi.xml deleted file mode 100644 index 1725c82979d..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/assembly/META-INF/jbi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - wsclient_assembly - WsClient Consumer - - - - wsclient - consumer service - - - wsclient.war - sun-javaee-engine - - - - diff --git a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/client/Client.java b/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/client/Client.java deleted file mode 100644 index bdb7ae427ee..00000000000 --- a/appserver/tests/jbi/transactions/jse_only_ejbrollback1/webclient/client/Client.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package client; - -import javax.annotation.Resource; -import javax.servlet.*; -import javax.servlet.http.*; -import javax.naming.InitialContext; -import javax.transaction.UserTransaction; -import javax.transaction.Status; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.*; -import javax.sql.DataSource; - -import javax.xml.ws.*; -import endpoint.ejb.*; - -public class Client extends HttpServlet { - - //@WebServiceRef(name="sun-web.serviceref/HelloEJBService") - HelloEJBService service = new HelloEJBService(); - - @Resource(mappedName="jdbc/__default") private DataSource ds; - - public void doGet(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - doPost(req, resp); - } - - public void doPost(HttpServletRequest req, HttpServletResponse resp) - throws javax.servlet.ServletException { - UserTransaction ut = null; - // Create Table with name CUSTOMER_rb1. This name will be used in the EJB - String tableName = "CUSTOMER_rb1"; - String[] names = {"Vikas", "VikasAwasthi"}; - String[] emails= {"vikas@sun.com", "VikasA@sun.com"}; - Connection con = null; - try { - con = ds.getConnection(); - createTable(con, tableName); - ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction"); - ut.begin(); - - System.out.println(" Service is :" + service); - Hello port = service.getHelloEJBPort(); - - String ret = port.sayHello("Appserver Tester !"); - System.out.println("Return value from webservice:"+ret); - updateTable(con, tableName, names[1], emails[1]); - - System.out.println("**** rollbacking transaction"); - ut.rollback(); - - if(isDataPresent(con, tableName)) { - ret += "FAILED"; - } - - PrintWriter out = resp.getWriter(); - resp.setContentType("text/html"); - out.println(""); - out.println(""); - out.println("TestServlet"); - out.println(""); - out.println(""); - out.println("

    "); - out.println("So the RESULT OF EJB webservice IS :"); - out.println("

    "); - out.println("[" + ret + "]"); - out.println(""); - out.println(""); - dropTable(con, tableName); - } catch(Exception e) { - e.printStackTrace(); - }finally { - try { - if(con != null) con.close(); - } catch (SQLException se) {} - } - } - - // use this table in the EJB webservice - private void createTable(Connection con, String tableName) throws Exception { - // autocommit is made true so that the table is created immediately - boolean autoCommit = con.getAutoCommit(); - con.setAutoCommit(true); - System.out.println("**** auto commit = " + con.getAutoCommit()); - PreparedStatement pStmt = - con.prepareStatement("CREATE TABLE "+tableName+" (NAME VARCHAR(30) NOT NULL PRIMARY KEY, EMAIL VARCHAR(30))"); - pStmt.executeUpdate(); - con.setAutoCommit(autoCommit); - } - - private void dropTable(Connection con, String tableName) throws Exception { - boolean autoCommit = con.getAutoCommit(); - con.setAutoCommit(true); - PreparedStatement pStmt = con.prepareStatement("DROP TABLE "+tableName); - pStmt.executeUpdate(); - con.setAutoCommit(autoCommit); - } - - // Check whether the EJB webservice has updated the data in the table. - private boolean isDataPresent(Connection con, String tableName) throws Exception { - PreparedStatement pStmt = con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName); - ResultSet rs = pStmt.executeQuery(); - while(rs.next()) { - String db_Name = rs.getString(1); - String db_Email = rs.getString(2); - System.out.println("NAME="+db_Name+", EMAIL="+db_Email); - rs.close(); - return true; - } - return false; - } - - private void updateTable(Connection con, String tableName, String name, String email) - throws Exception { - PreparedStatement pStmt = - con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)"); - pStmt.setString(1, name); - pStmt.setString(2, email); - pStmt.executeUpdate(); - } -} diff --git a/appserver/tests/logmonitor/Filter.java b/appserver/tests/logmonitor/Filter.java deleted file mode 100644 index e23328ea86a..00000000000 --- a/appserver/tests/logmonitor/Filter.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -import java.io.*; -import java.io.BufferedReader; -import java.io.File; -import java.io.FilenameFilter; -import java.io.InputStreamReader; -import java.lang.System; -import java.util.Collection; -import java.util.StringTokenizer; -import java.util.Vector; - -public class Filter { - - static Vector myMessageIds = new Vector(); - static Vector myMissingMessageIds = new Vector(); - - - public Collection listFiles( - File directory, - FilenameFilter filter, - boolean recurse) { - - Vector files = new Vector(); - - // Get files / directories in the directory - File[] entries = directory.listFiles(); - - // Go over entries - for (File entry : entries) { - - // If there is no filter or the filter accepts the - // file / directory, add it to the list - if (filter == null || filter.accept(directory, entry.getName())) { - files.add(entry); - } - - // If the file is a directory and the recurse flag - // is set, recurse into the directory - if (recurse && entry.isDirectory()) { - files.addAll(listFiles(entry, filter, recurse)); - } - } - - // Return collection of files - return files; - } - - public void readFileToGetMessageIds(File file) { - try { - - //System.out.println("\n\n..." + file.getAbsolutePath()); - - BufferedReader rdr = - new BufferedReader( - new InputStreamReader( - new java.io.FileInputStream(file))); - String line = null; - - while ((line = rdr.readLine()) != null) { - //System.out.println("\n..."+line); - if (line.contains(":") - && line.contains("=") - && !line.startsWith("#") - && !line.contains(".cause") - && !line.contains(".check")) { - StringTokenizer st = new StringTokenizer(line, "="); - if (st.hasMoreTokens()) { - st.nextToken(); - String tempString = st.nextToken().trim(); - if (tempString.contains(":")) { - String id = tempString.substring(0, tempString.indexOf(':')).trim(); - //System.out.println("Ids=" + id); - if (id.length() < 10 && !id.contains(" ") && id.matches("[a-zA-Z0-9]*")) { - myMessageIds.add(id); - } - } - } - } - } - rdr.close(); - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Exception during readFileToGetMessageIds: " + e); - } - - - } - - public void readFileToGetMissingDiagnosticInfo(File file) { - try { - - Vector idVector = new Vector(); - //System.out.println("\n\n..." + file.getAbsolutePath()); - - BufferedReader rdr = - new BufferedReader( - new InputStreamReader( - new java.io.FileInputStream(file))); - String line = null; - - while ((line = rdr.readLine()) != null) { - //System.out.println("\n..."+line); - if (line.contains(":") - && line.contains("=") - && !line.startsWith("#") - && !line.contains(".cause") - && !line.contains(".check")) { - StringTokenizer st = new StringTokenizer(line, "="); - if (st.hasMoreTokens()) { - st.nextToken(); - String tempString = st.nextToken().trim(); - if (tempString.contains(":")) { - String id = tempString.substring(0, tempString.indexOf(':')).trim(); - //System.out.println("Ids=" + id); - if (id.length() < 10 && !id.contains(" ") && id.matches("[a-zA-Z0-9]*")) { - myMissingMessageIds.add(id); - } - } - } - } - } - - rdr.close(); - - for (String id : myMissingMessageIds) { - rdr = - new BufferedReader( - new InputStreamReader( - new java.io.FileInputStream(file))); - line = null; - while ((line = rdr.readLine()) != null) { - if (!line.contains("#") - && (line.contains(id + ".diag.cause") || line.contains(id + ".diag.check"))) { - idVector.add(id); - } - } - rdr.close(); - } - - for (String id : idVector) { - myMissingMessageIds.remove(id); - } - - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Exception during readFileToGetMissingDiagnosticInfo: " + e); - } - - - } - - public void writeKeyToFile(Vector ids, String fileName) { - - try { - FileWriter fw = new FileWriter(new File(fileName)); - for (String id : ids) { - fw.write(id + "\n"); - } - fw.flush(); - fw.close(); - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Exception during Writing File"); - } - - } - - - public static void main(String args[]) { - - boolean masterIds = false; - boolean missingIds = false; - boolean isGfHome = true; - String gfHome = ""; - - if (args.length < 2 || args[0]==null || args[1] ==null || ("${glassfish_home}").equals(args[0]) || ("${options}").equals(args[1]) - || ("").equals(args[0]) || ("").equals(args[1]) ) { - System.out.println("Missing Inputs...\n"); - System.out.println("Usage: java Filter \n"); - System.out.println("Help: missingId for generate list of Ids which has diagnostic info missing.\n"); - System.out.println("Help: masterId for generate master list of Ids.\n"); - } else { - - gfHome = args[0]; - - File tempFile = new File(gfHome); - if (tempFile == null || !tempFile.isDirectory()) { - isGfHome = false; - } - - if (args[1].equals("missingId")) { - missingIds = true; - } - - if (args[1].equals("masterId")) { - masterIds = true; - } - - if (!masterIds && !missingIds) { - System.out.println("Missing Inputs... value is missing as second argument."); - } else - if (!isGfHome) { - System.out.println("Missing Inputs... value is not proper as first argument."); - } else { - - FilenameFilter fnm = new FilenameFilter() { - public boolean accept(File dir, String filename) { - return filename.equals("LogStrings.properties"); - } - }; - - Collection myCollection = new Filter().listFiles(new File(args[0]), fnm, true); - //System.out.println(myCollection.size()); - - if (masterIds) { - for (File myFile : myCollection) { - new Filter().readFileToGetMessageIds(myFile); - } - new Filter().writeKeyToFile(myMessageIds, "master-list-message-ids.txt"); - } - - if (missingIds) { - for (File myFile : myCollection) { - new Filter().readFileToGetMissingDiagnosticInfo(myFile); - } - new Filter().writeKeyToFile(myMissingMessageIds, "missing-diagnostic-message-ids.txt"); - } - } - } - - } - -} - diff --git a/appserver/tests/logmonitor/README b/appserver/tests/logmonitor/README deleted file mode 100644 index dbee23fb1b1..00000000000 --- a/appserver/tests/logmonitor/README +++ /dev/null @@ -1,67 +0,0 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. - -There are two scripts here. ------------------------------------------------------------------------------------------------------------------------------------- - -1. Uses build.xml & Filter.java. -This scripts generates master list of message Ids and also check which message Ids has missing diagnostic info. - -How to use? -% ant all -Dglassfish_home= -Doptions=masterId/missingIds - ------------------------------------------------------------------------------------------------------------------------------------- - -2. Uses ruby script missing-msg-id-finder.rb, message-keys-used-checker.rb & message-key-excl.txt. -2.1 missing-msg-id-finder.rb (uses message-key-excl.txt). Searches all LogStrings.properties in (hard-coded) GF v3 src path for -messages with no proper Id. Result is stored in msgs-with-no-ids.txt. - -2.2 message-keys-used-checker.rb (uses msgs-with-no-ids.txt). Searches through all Java classes in (hard-coded) GF v3 src path for -the usage of specified message keys. If found (and not logged as FINE, etc. message), reported to stdout. - -2.3 message-key-excl.txt contanis exception list which stores message key for which bug is already raised. Once user close the bug, -you must have to update this txt file and run script again for bug verification. - -So first you run 2.1, then 2.2, then update the exclude list as you report/solve the issues. Then run them again, etc. - -How to use? - -% ruby missing-msg-id-finder.rb -% ruby message-keys-used-checker.rb - ------------------------------------------------------------------------------------------------------------------------------------- diff --git a/appserver/tests/logmonitor/build.xml b/appserver/tests/logmonitor/build.xml deleted file mode 100644 index 206fd2bb518..00000000000 --- a/appserver/tests/logmonitor/build.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/logmonitor/message-key-excl.txt b/appserver/tests/logmonitor/message-key-excl.txt deleted file mode 100644 index 9570fa6d9e5..00000000000 --- a/appserver/tests/logmonitor/message-key-excl.txt +++ /dev/null @@ -1,88 +0,0 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. - -# not for logging to server log -audit.denied -audit.ok -audit.methodname -audit.session - -# logged with level FINE in security module -acc.secmgron -acc.secmgroff - -# logged with level FINE in persistence module -database.DBVendorTypeHelper.inputVendorName -database.DBVendorTypeHelper.detectedVendorType -database.DBVendorTypeHelper.couldNotLoadResource -database.DBVendorTypeHelper.regExprDbType -database.DBVendorTypeHelper.patternSyntaxException -database.DBVendorTypeHelper.traceVendorNameToTypeProperty -database.DBVendorTypeHelper.errorParsingVendorNameToTypeProperty - -# logged with level FINE in jdbc module -jdbc.invalid_connection -jdbc.duplicate_close_connection -jdbc.duplicateTxCompleted -jdbc.executing_init_sql -jdbc.exc_init_sql_error_stmt_close -jdbc.execute_init_sql_start -jdbc.execute_init_sql_end -CCP.ValidateAtmostEveryIdleSecs.Set -connection_sharing_start -connection_sharing_end -connection_sharing_reset_association -pool.get_validation_table_names_mc_destroy - -# logged with level FINE in appclient module -enterprise.deployment.appclient.jws.clientJNLPConfigLoad -enterprise.deployment.appclient.jws.clientJNLPConfigChangeFile - -# http://java.net/jira/browse/GLASSFISH-16541 -console.adapter.missingDeployDir -console.adapter.cannotBackup -console.adapter.NoUpdateCenterInfo -console.adapter.CannotCreateUC -console.adapter.cannotUndeploy -console.adapter.errorStopping - -# http://java.net/jira/browse/GLASSFISH-16535 -ajra.config_not_created_yet - -# http://java.net/jira/browse/GLASSFISH-16542 -JPAJava2DBProcessor.nondefaultprovider diff --git a/appserver/tests/logmonitor/message-keys-used-checker.rb b/appserver/tests/logmonitor/message-keys-used-checker.rb deleted file mode 100755 index 08ebc156563..00000000000 --- a/appserver/tests/logmonitor/message-keys-used-checker.rb +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/ruby -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Author: Dies Koper (dkoper@dev.java.net) -# This script reads a list of message keys from an input file and -# checks all Java source files for the usage of these keys. -# Message logged for debugging (level FINE, etc.) are omitted from the results. -require 'find' - -keys_found = [] -# load message keys (or "msg.key=msg text" pairs) -keys = IO.readlines("msgs-with-no-ids.txt") -keys.collect! { |item| - # only interested in message keys (so remove msg text) - if item =~ /^([\w._\-]+\s*[^\\])[=:].*/ - $1 - else - item - end -} - -# return regex pattern from given array in .*"(a|b|c)".* format, i.e. -# a, b or c is enclosed in double quotes -def build_regex(keys) - #puts keys - regex=".*\"(" - keys.each { |key| - regex += key.to_s + '|' - } - regex = regex.chomp!('|') + ')".*' - #puts regex -end - -#puts keys -# build regex pattern from array elements -regex = build_regex(keys) -#puts regex - -keys_total = keys.size -matches = 0 -no_id = 0 -prev_line = "" - -puts "GlassFish Home Is: "+ARGV[0] - -# traverse all files under the following root dir -Find.find(ARGV[0] ) do |f| - - case File.dirname(f) - # skip directories that store copies of property files - when /.*\/.svn/ then Find.prune # skip .svn dirs - when /.*\/target/ then Find.prune # skip build dirs - when /.*\/tests/ then Find.prune # skip test dirs - end - - case File.extname(f) - when '.java' then - IO.foreach(f) {|line| - # if line contains a message key - unless (line.match(regex).nil?) - key = $1 - keys_found << key - - case line - # if a line starts with a double quote or opening bracket '(' it is - # probably a continuance of the previous line - when /^\s*["\(].*/ - line = prev_line.chomp + line.lstrip - #puts "double line: #{line}" - end - - case line - # do not report if message logged as debug message - when /.*log\(Level\.(FINE|FINER|FINEST|CONFIG).*/ then - # puts "debug msg found: #{key} in #{f.gsub(File::SEPARATOR, - # File::ALT_SEPARATOR || File::SEPARATOR)}\n#{line}" - when /.*\.(fine|finer|finest|config)\(.*/ then - # puts "debug msg found: #{key} in #{f.gsub(File::SEPARATOR, - # File::ALT_SEPARATOR || File::SEPARATOR)}\n#{line}" - else - # Message key found. (Could be in code that is commented out, - # not used, logged as info/warn/severe message, etc.) - puts "- Found key '#{key}' used in #{f.gsub(File::SEPARATOR, - File::ALT_SEPARATOR || File::SEPARATOR)}\n#{line}" - no_id += 1 - end - end - prev_line = line - } - end - -end - -keys_not_found = keys - keys_found -puts "#{no_id} messages may need an Id." -puts "#{keys_not_found.size} of provided #{keys_total} message keys were not found:\n" + - keys_not_found.inspect diff --git a/appserver/tests/logmonitor/missing-msg-id-finder.rb b/appserver/tests/logmonitor/missing-msg-id-finder.rb deleted file mode 100755 index 829f2af481e..00000000000 --- a/appserver/tests/logmonitor/missing-msg-id-finder.rb +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/ruby -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -# Author: Dies Koper (dkoper@dev.java.net) -# This script reads all LogStrings.properties in the current directory and -# its subdirectories and confirms the messages in them have proper Ids. -# The results (except for messages on the exclude list) are written to a file. -require 'find' - -$excl_list = Array.new -# load excluded messages list -# this list includes message keys of messages for which it has been -# confirmed that they should not have a msg id (like debug messages). -IO.foreach("./message-key-excl.txt") { |line| - $excl_list.push line.chomp if line =~ /^[\w\-].*$*/ -} - -hits = [] -file_count = 0 - -puts "GlassFish Home Is: "+ARGV[0] - - -# traverse all files under the following root dir -Find.find(ARGV[0]) do |f| - - # skip directories that store copies of property files - case File.dirname(f) - when /.*\/.svn/ then Find.prune # skip .svn dirs - when /.*\/target/ then Find.prune # skip build dirs - when /.*\/tests/ then Find.prune # skip test dirs - end - - case File.basename(f) - when 'LogStrings.properties' then - file_count += 1 - # print filename using OS specific path - puts "* #{f.gsub(File::SEPARATOR, - File::ALT_SEPARATOR || File::SEPARATOR)}" - - # open each msg properties file and read line by line - File.open(f) do |msgfile| - msgfile.each_line { |line| - # puts "line: #{line}" - if (needs_id(msgfile, line) == true) - hits << line - puts " - no Id: #{line}" - end - } - end - end - - def needs_id(file, line) - # concate multi-line message \ - is_multi_line = false - while (!line.to_s.match(/.+\\\s*$/).nil?) - next_line = file.gets.lstrip - line = line.chop + next_line - is_multi_line = true - end - # puts "\tmulti-line msg: #{line}" if is_multi_line - - id_req = false - case line - - # id.diag.... - when /^\s*[\w_\-]+\.diag\.(cause|check)\..*/ - #puts "diag msg: #{line}" - - # msg.key = PREFIX123: ... (colon may be escaped - LAUNHCER006) - when /^\s*[\w._\-]+\s*[^\\][=:]\s*\w+\d+\s*\\?:.*/ - # puts "msg with key: #{line}" - - # comment saying next message needs no id - # used in web\war-util\src\main\resources\com\sun\logging\enterprise\system\container\web\LogStrings.properties - when /^\s*[#!]no ID on .*/ - #skip next message - line = file.gets - # puts "\tskip next msg: #{line}" - - # comment - when /^\s*[#!].*$/ - - # no msg - when /^\s*$/ - - # msg.key = Message with no prefix - when /^([\w._\-]+\s*[^\\])[=:].*/ - id_req = true unless $excl_list.include?($1) - else - puts " - unknown: #{line}" - - end - id_req - end -end - -puts "\nFinished." -puts "Searched #{file_count} files and found #{hits.size} messages with no Id (with #{$excl_list.size} messages excluded)" -puts "\nResults have been saved to ./msgs-with-no-ids.txt" - -File.open("./msgs-with-no-ids.txt", 'w') { |f| - hits.each { |item| - f.write item - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/README b/appserver/tests/osgi-javaee/osgi-web/README deleted file mode 100644 index 70cd951a25d..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/README +++ /dev/null @@ -1,11 +0,0 @@ -Running the tests : - -1. Set the following environment varaibles: -TEST_HOME : path to the directory where osgi-javaee is present. -S1AS_HOME : path to GlassFish install directory. - -2. use asadmin commands to start the domain and start database. -3. run "ant setup", to setup the osgi framework controller. -4. run "ant all" for executing the tests. -5. run "ant unsetup" for deactivating the osgi framework controller. -6. stop-domain, stop-database. diff --git a/appserver/tests/osgi-javaee/osgi-web/TODO b/appserver/tests/osgi-javaee/osgi-web/TODO deleted file mode 100644 index 6b42cd3eabb..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/TODO +++ /dev/null @@ -1,44 +0,0 @@ - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - - -TODO List - -1. test.log contains the log of last text run only. Need to capture each test output separately. -2. Add instructions for running single test and running a subset of tests. diff --git a/appserver/tests/osgi-javaee/osgi-web/build.xml b/appserver/tests/osgi-javaee/osgi-web/build.xml deleted file mode 100644 index ce39334ad5e..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - -]> - - - - &commonBuild; - &commonProperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/common/BundleUtil.java b/appserver/tests/osgi-javaee/osgi-web/common/BundleUtil.java deleted file mode 100644 index 558b0459a9a..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/common/BundleUtil.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Writer; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLEncoder; - -/** - * - * @author mohit - */ -public class BundleUtil { - -// String installerUrl = "http://localhost:8080/testOSGI/BundleInstaller"; -// String uninstallerUrl = "http://localhost:8080/testOSGI/BundleUninstaller"; - - String installerUrl = "http://localhost:8080/testREST/web/bundleinstaller"; - String uninstallerUrl = "http://localhost:8080/testREST/web/bundleuninstaller"; - - private static Reporter reporter; - private static String testName; - int failCode = 2;//code for deployment failure [see Reporter.java] - - // args[0] contains testname - // args[1] contains testResultFile - // args[2] if there, will contain installUrl. - public static void main(String args[]) { - BundleUtil bundleUtil = new BundleUtil(); - if(args.length == 2) { - testName = args[0]; - reporter = new Reporter(args[1]); - //uninstall the previously installed bundle - bundleUtil.uninstall(); - } else if(args.length == 3) { - testName = args[0]; - reporter = new Reporter(args[1]); - //install the bundle using given arguments. - bundleUtil.install(args[2]); - } else { - System.out.println("Invalid Number of Arguments."); - } - } - - public void install(String installUrl) { - //installerUrl = installerUrl + "?installType=" + installType; - //installerUrl = installerUrl + "&bundlePath=" + bundlePath; - String [] parameters = {"installUrl", installUrl}; - invokeURL(installerUrl, parameters); - } - - public void uninstall() { - invokeURL(uninstallerUrl, new String [] {}); - } - - public void invokeURL(String url, String[] parameters) { - try { - URL u = new URL(url); - HttpURLConnection connection = (HttpURLConnection) u.openConnection(); - connection.setRequestMethod("POST"); - connection.setDoOutput(true); - connection.setDoInput(true); - OutputStream out = connection.getOutputStream(); - Writer writer = new OutputStreamWriter(out, "UTF-8"); - for (int i = 0; i < parameters.length; i++) { - writer.write(parameters[i++]);//first wtire param name, then value - writer.write("="); - writer.write(URLEncoder.encode(parameters[i], "UTF-8")); - writer.write("&"); - } - writer.close(); - out.close(); - - int code = connection.getResponseCode(); - InputStream is = connection.getInputStream(); - BufferedReader input = new BufferedReader(new InputStreamReader(is)); - String line = null; - while ((line = input.readLine()) != null) { - log(line); - if(line.contains("FAIL")){ - fail(); - } - } - - if (code != 200) { - log("Error invoking " + url); - fail(); - } - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - private void log(String message) { - System.out.println("[BundleUtil]:: " + message); - } - - private void fail() { - System.out.println("[BundleUtil]:: TestFailed"); - reporter.printStatus(testName, failCode); - } -} - diff --git a/appserver/tests/osgi-javaee/osgi-web/common/Reporter.java b/appserver/tests/osgi-javaee/osgi-web/common/Reporter.java deleted file mode 100644 index ef86ceeada9..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/common/Reporter.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - - import java.io.BufferedReader; - import java.io.BufferedWriter; - import java.io.File; - import java.io.FileReader; - import java.io.FileWriter; - import java.io.IOException; - import java.util.Iterator; - import java.util.Vector; - - /** - * - * @author Mohit - */ - public class Reporter { - - public static File testResult ; //= new File("/space/v3work/v3/tests/osgi-javaee/testresult.txt"); - public static File testSummaryFile; - public static String[] statusCode = {"Passed", "BuildFailure", "DeploymentFailure", "RuntimeFailure"}; - public static String lineSepatartor = "***********************"; - public static String lineSepatartor2 = "-----------------------"; - static int PASS = 0; - static int BUILDFAIL = 1; - static int DEPLOYMENTFAIL = 2; - static int RUNTIMEFAIL = 3; - - public Reporter() { - } - - public Reporter(String testResultFile, String testSummary) { - testResult = new File(testResultFile); - testSummaryFile = new File(testSummary); - } - - public Reporter(String testResultFile) { - testResult = new File(testResultFile); - } - - /** - * @param args the command line arguments - */ - public static void main(String[] args) { - Reporter reporter; - if (args.length == 2) { - //call is for generating summary. - //args[0] contain testResultFile path. - //args[1] contain testSummaryFile path. - reporter = new Reporter(args[0], args[1]); - reporter.generateSummary(); - } else if(args.length == 3) { - //call is for printing test status. - //args[0] contains testName. - //args[1] contains testResult Code. - //args[2] contains testResult Filename. - reporter = new Reporter(args[2]); - int code = Integer.parseInt(args[1]); - reporter.printStatus(args[0], code); - } - } - - public void printStatus(String testName, int code) { - try { - BufferedWriter out = - new BufferedWriter(new FileWriter(testResult, true)); //opening file in append mode. - out.newLine(); - out.write(lineSepatartor + "\n"); - out.write(testName + " :: " + statusCode[code] + "\n"); - out.write(lineSepatartor + "\n"); - out.newLine(); - out.close(); - } catch (IOException ex) { - System.out.println("REPORTER: Error Writing TestReport"); - } - } - - public void generateSummary() { - Vector[] testSummary = new Vector[4]; - for(int i=0; i< testSummary.length; i++) - testSummary[i] = new Vector(); - try { - BufferedReader in = new BufferedReader(new FileReader(testResult)); - BufferedWriter out = - new BufferedWriter(new FileWriter(testSummaryFile, true)); - String line = null; - while((line = in.readLine()) != null) { - String testName = (line.split("::"))[0]; - if(line.contains(statusCode[PASS])) { - //Pass. - testSummary[0].add(testName); - } else if(line.contains(statusCode[BUILDFAIL])) { - //Build Failed. - testSummary[1].add(testName); - } else if(line.contains(statusCode[DEPLOYMENTFAIL])) { - //Deployment Failed. - testSummary[2].add(testName); - } else if(line.contains(statusCode[RUNTIMEFAIL])) { - //Runtime Failure. - testSummary[3].add(testName); - } - } - out.write("Test Summary : \n \n"); - out.write(lineSepatartor + "\n"); - Iterator itr = null; - for(int i=0;i - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/config/common.properties b/appserver/tests/osgi-javaee/osgi-web/config/common.properties deleted file mode 100644 index 0ce31c9e048..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/config/common.properties +++ /dev/null @@ -1,56 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/config/common.xml b/appserver/tests/osgi-javaee/osgi-web/config/common.xml deleted file mode 100644 index 1e58f8fcc2a..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/config/common.xml +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/framework-controller/MANIFEST.MF deleted file mode 100644 index 4ad5c97ee1d..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Bundle-SymbolicName: TestREST -Bundle-Version: 1.0 -Bundle-ClassPath: WEB-INF/classes -DynamicImport-Package: * -Web-ContextPath: /testREST diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/README b/appserver/tests/osgi-javaee/osgi-web/framework-controller/README deleted file mode 100644 index 933dab00106..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/README +++ /dev/null @@ -1 +0,0 @@ -REST based OSGI framework controller. diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/build.properties b/appserver/tests/osgi-javaee/osgi-web/framework-controller/build.properties deleted file mode 100644 index 44f109472e7..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/build.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/build.xml b/appserver/tests/osgi-javaee/osgi-web/framework-controller/build.xml deleted file mode 100644 index 1e2a687a51c..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/build.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - -]> - - - - &commonBuild; - &commonproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/META-INF/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/META-INF/MANIFEST.MF deleted file mode 100644 index 21b801cc7b6..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,4 +0,0 @@ -Manifest-Version: 1.0 -Ant-Version: Apache Ant 1.7.1 -Created-By: 14.0-b16 (Sun Microsystems Inc.) - diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/WEB-INF/sun-web.xml b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/WEB-INF/sun-web.xml deleted file mode 100644 index 59d92104221..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/WEB-INF/sun-web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - /TestREST - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/WEB-INF/web.xml b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/WEB-INF/web.xml deleted file mode 100644 index 5a19b808e06..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/WEB-INF/web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - ServletAdaptor - com.sun.jersey.spi.container.servlet.ServletContainer - 1 - - - ServletAdaptor - /web/* - - - - 30 - - - - index.jsp - - diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/index.jsp b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/index.jsp deleted file mode 100644 index f067e459967..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/index.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - -<%-- - Document : index - Created on : 10 Nov, 2009, 12:13:01 PM - Author : mohit ---%> - - - - - - - Index Page - - - - - - - - - - -
    - OSGI Framework Controller -
    - Install Bundle

    - Uninstall Bundle

    - View Bundles -
    - -
    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/install.jsp b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/install.jsp deleted file mode 100644 index 95c9d2524d0..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/install.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - -<%-- - Document : install - Created on : 6 Nov, 2009, 2:20:52 PM - Author : mohit ---%> - - - - - - - Bundle Installer - - -
    - Install URL :   
    - -
    -
    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleController.java b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleController.java deleted file mode 100644 index 672ccdc0dda..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleController.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - - /* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package test; - -import java.io.IOException; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.core.Context; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * - * @author mohit - */ - -@Path("/bundlecontroller") -public class BundleController { - - @Context ServletContext ctx; - @Context HttpServletResponse resp; - - @POST - public void bundleController(@FormParam("id") String bundleId, @FormParam("bsubmit") String requestType) { - System.out.println("Controller :" + requestType); - long uninstallId = 0; - BundleContext bundleContext = (BundleContext) ctx.getAttribute("osgi-bundlecontext"); - - if(bundleId == null) { - uninstallId = (Long) ctx.getAttribute("bundleId"); - } else { - uninstallId = Long.parseLong(bundleId); - } - try { - if(uninstallId != 0) { - Bundle bundle = bundleContext.getBundle(uninstallId); - if (bundle != null) { - if (requestType.equalsIgnoreCase("Stop") && bundle.getState() == bundle.ACTIVE) { - bundle.stop(); - } else if (requestType.equalsIgnoreCase("Start") && - (bundle.getState() == bundle.RESOLVED || bundle.getState() == bundle.INSTALLED)) { - bundle.start(); - } else if (requestType.equalsIgnoreCase("Uninstall")) { - bundle.uninstall(); - } - } - } - } catch (Exception ex) { - ex.printStackTrace(); - } finally { - try { - resp.sendRedirect(resp.encodeRedirectURL("bundleviewer")); - } catch (IOException ex) { - ex.printStackTrace(); - } - } - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleInstaller.java b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleInstaller.java deleted file mode 100644 index 21702177def..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleInstaller.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - - /* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package test; - -import javax.servlet.ServletContext; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.core.Context; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * - * @author mohit - */ - -@Path("/bundleinstaller") -public class BundleInstaller { - - @Context ServletContext ctx; - - String returnMessage = "FAIL"; - - @POST - public String installBundle(@FormParam("installUrl") String installUrl) { - BundleContext bundleContext = (BundleContext) ctx.getAttribute("osgi-bundlecontext"); - try { - if (installUrl != null) { - //Examples. - //String installURL = "file:///space/v3work/v3/tests/osgi-javaee/test1/generated/test1.war"; - //String installURL = "reference:file:/space/v3work/v3/tests/osgi-javaee/test6"; - Bundle bundle = bundleContext.installBundle(installUrl); - returnMessage = "Bundle deployed with ID : " + bundle.getBundleId(); - bundle.start(); - returnMessage = returnMessage + " Started : PASS"; - //Save current BundleId. - ctx.setAttribute("bundleId", bundle.getBundleId()); - } else { - returnMessage = "Please specify Installation Type and Bundle Path : FAIL"; - } - } catch (Exception ex) { - returnMessage = "Exception installing the bundle : FAIL"; - ex.printStackTrace(); - } - return returnMessage; - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleUninstaller.java b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleUninstaller.java deleted file mode 100644 index 44cb7e71233..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleUninstaller.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package test; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.core.Context; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * - * @author mohit - */ - -@Path("/bundleuninstaller") -public class BundleUninstaller { - - @Context ServletContext ctx; - String returnMessage = "FAIL"; - - @POST - public String uninstallBundle(@FormParam("bundleId") String bundleId) { - long uninstallId = 0; - BundleContext bundleContext = (BundleContext) ctx.getAttribute("osgi-bundlecontext"); - - if(bundleId == null) { - uninstallId = (Long) ctx.getAttribute("bundleId"); - } else { - uninstallId = Long.parseLong(bundleId); - } - try { - if(uninstallId != 0) { - Bundle bundle = bundleContext.getBundle(uninstallId); - bundle.stop(); - returnMessage = "Stopped Bundle : " + bundle.getSymbolicName(); - bundle.uninstall(); - returnMessage = returnMessage + " Uninstalled Bundle : PASS"; - //Unset current BundleId. - ctx.setAttribute("bundleId", 0); - } else { - returnMessage = "Please specify the bundleId to be uninstalled : FAIL"; - } - } catch (Exception ex) { - returnMessage = "Exception while uninstalling bundle : FAIL"; - ex.printStackTrace(); - } - return returnMessage; - } - -} diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleViewer.java b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleViewer.java deleted file mode 100644 index 6c900f1b7cf..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/main/java/test/BundleViewer.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package test; - -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.core.Context; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * - * @author mohit - */ -@Path("/bundleviewer") -public class BundleViewer { - - @Context ServletContext ctx; - @Context HttpServletResponse resp; - - @GET - public void getBundles() throws IOException { - PrintWriter out = null; - String [] bgcolors = {"#B5EAAA", "#C3FDB8"}; - try { - BundleContext bundleContext = (BundleContext) ctx.getAttribute("osgi-bundlecontext"); - Bundle[] bundles = bundleContext.getBundles(); - resp.setContentType("text/html;charset=UTF-8"); - out = resp.getWriter(); - out.println("
    "); - out.println(""); - out.println(""); - out.println("" + - "" + - "" + - ""); - - try { - for(int i=0; i"); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - } - } catch (Exception ex) { - ex.printStackTrace(); - } - out.println(""); - out.println(""); - out.println(""); - out.println("
    BUNDLEIDSTATEBUNDLE SYMBOLIC NAME
    "+bundles[i].getBundleId() +""+getState(bundles[i].getState()) +""+bundles[i].getSymbolicName() +"
    "); - } catch (IOException ex) { - ex.printStackTrace(); - } finally { - out.close(); - } - } - - private String getState(int state) { - String stateAsString = ""; - switch(state) { - case Bundle.ACTIVE : stateAsString = "Active"; break; - case Bundle.INSTALLED : stateAsString ="Installed"; break; - case Bundle.RESOLVED : stateAsString = "Resolved"; break; - } - return stateAsString; - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/uninstall.jsp b/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/uninstall.jsp deleted file mode 100644 index 25ee09b736c..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/framework-controller/src/uninstall.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - -<%-- - Document : uninstall - Created on : 9 Nov, 2009, 12:26:19 PM - Author : mohit ---%> - - - - - - - Bundle Uninstaller - - -
    - BundleId :   
    - -
    -
    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/build.properties b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/build.properties deleted file mode 100644 index c2e54063fb9..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/build.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/build.xml b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/build.xml deleted file mode 100644 index 6533a6153e2..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/build.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - -]> - - - - &commonBuild; - &commonproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/pom.xml b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/pom.xml deleted file mode 100644 index 96f1f41df03..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/pom.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - 4.0.0 - sahoo - hybridapp.example1 - 1.0-SNAPSHOT - Our first hybrid (OSGi + Java EE) application - war - - hybridapp1 - - - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-war-plugin - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - WEB-INF/classes/ - - - - - - org.apache.felix - maven-bundle-plugin - - - jar - bundle - war - - - sahoo.hybridapp.example1.impl.Activator - sahoo.hybridapp.example1 - - /hybridapp1 - - - - - - bundle-manifest - process-classes - - manifest - - - - - - - - - jakarta.servlet - jakarta.servlet-api - provided - - - org.glassfish - jakarta.ejb - 3.0-Preview - provided - - - org.osgi - osgi_R4_core - 1.0 - provided - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/UserAuthService.java b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/UserAuthService.java deleted file mode 100644 index b0d38108352..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/UserAuthService.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package sahoo.hybridapp.example1; - -/** - * @author Sanjeeb.Sahoo@Sun.COM - */ -public interface UserAuthService -{ - boolean login(String name, String password); - boolean register(String name, String password); -} diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/Activator.java b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/Activator.java deleted file mode 100644 index d3bf1f447a0..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/Activator.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package sahoo.hybridapp.example1.impl; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -import javax.naming.InitialContext; -import javax.sql.DataSource; -import java.sql.Connection; -import java.sql.SQLException; -import java.sql.Statement; - -import sahoo.hybridapp.example1.UserAuthService; - -/** - * @author Sanjeeb.Sahoo@Sun.COM - */ -public class Activator implements BundleActivator -{ - // We should configure this using Config Admin service - public static final String dsName = "jdbc/__default"; - public static final String tableName = "USERINFO"; - - private DataSource ds; - - public void start(BundleContext context) throws Exception - { - InitialContext ctx = new InitialContext(); - Connection c = null; - Statement s = null; - try - { - ds = (DataSource) ctx.lookup(dsName); - c = ds.getConnection(); - s = c.createStatement(); - String sql = "create table " + tableName + - " (NAME VARCHAR(10) NOT NULL, PASSWORD VARCHAR(10) NOT NULL," + - " PRIMARY KEY(NAME))"; - System.out.println("sql = " + sql); - s.executeUpdate(sql); - } - catch (SQLException e) - { - e.printStackTrace(); - } - finally - { - try - { - if (c!= null) c.close(); - if (s!=null) s.close(); - } - catch (Exception e) - { - } - } - } - - public void stop(BundleContext context) throws Exception - { - Connection c = null; - Statement s = null; - try - { - c = ds.getConnection(); - s = c.createStatement(); - String sql = "drop table " + tableName; - System.out.println("sql = " + sql); - s.executeUpdate(sql); - } - catch (SQLException e) - { - e.printStackTrace(); - } - finally - { - try - { - if (c!= null) c.close(); - if (s!=null) s.close(); - } - catch (Exception e) - { - } - } - - } - -} diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/LoginServlet.java b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/LoginServlet.java deleted file mode 100644 index 6e0c747b50b..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/LoginServlet.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package sahoo.hybridapp.example1.impl; - -import sahoo.hybridapp.example1.UserAuthService; - -import javax.ejb.EJB; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.PrintWriter; - -@WebServlet(urlPatterns = "/login") -public class LoginServlet extends HttpServlet -{ - @EJB - UserAuthService userAuthService; - - public void service(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, java.io.IOException - { - resp.setContentType("text/html"); - PrintWriter out = resp.getWriter(); - out.println(" Login " + - " "); - - String name = req.getParameter("name"); - String password = req.getParameter("password"); - try - { - - if (userAuthService.login(name, password)) { - out.println("Welcome " + name); - } else { - out.println("Incorrect user name or password. Try again"); - } - } - catch (Exception e) - { - out.println("Incorrect user name or password."); - } - out.println(" "); - - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/RegistrationServlet.java b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/RegistrationServlet.java deleted file mode 100644 index f6c6ca96078..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/RegistrationServlet.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package sahoo.hybridapp.example1.impl; - -import sahoo.hybridapp.example1.UserAuthService; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ejb.EJB; -import java.io.PrintWriter; - -@WebServlet(urlPatterns = "/registration1") -public class RegistrationServlet extends HttpServlet -{ - @EJB - UserAuthService userAuthService; - - public void service(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, java.io.IOException - { - resp.setContentType("text/html"); - PrintWriter out = resp.getWriter(); - out.println(" Registration " + - " "); - - String name = req.getParameter("name"); - String password = req.getParameter("password"); - try - { - - if (userAuthService.register(name, password)) { - out.println("Registered " + name); - } else { - out.println("Failed to register " + name); - } - } - catch (Exception e) - { - out.println("Failed to register " + name); - } - out.println(" "); - - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/UserAuthServiceEJB.java b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/UserAuthServiceEJB.java deleted file mode 100644 index f4e2a9dac67..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/java/sahoo/hybridapp/example1/impl/UserAuthServiceEJB.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package sahoo.hybridapp.example1.impl; - -import sahoo.hybridapp.example1.UserAuthService; - -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import javax.ejb.Stateless; -import javax.sql.DataSource; -import java.sql.Connection; -import java.sql.Statement; -import java.sql.ResultSet; - -@Stateless -public class UserAuthServiceEJB implements UserAuthService -{ - - @Resource(mappedName= Activator.dsName) - private DataSource ds; - - @PostConstruct - public void postConstruct() { - System.out.println("UserAuthServiceEJB.postConstruct"); - } - - public boolean login(String name, String password) - { - System.out.println("UserAuthServiceEJBuser: logging in " + name); - Connection c = null; - Statement s = null; - try - { - c = ds.getConnection(); - s = c.createStatement(); - String sql = "select count(*) as record_count from " + - Activator.tableName +" where name = '" + name + - "' and password= '" + password + "'"; - System.out.println("sql = " + sql); - ResultSet rs = s.executeQuery(sql); - rs.next(); - if (rs.getInt("record_count") == 1) { - System.out.println("Login successful"); - return true; - } - } - catch (Exception e) - { - e.printStackTrace(); - } - finally - { - try - { - if (c!= null) c.close(); - if (s!=null) s.close(); - } - catch (Exception e) - { - } - } - return false; - } - - public boolean register(String name, String password) - { - System.out.println("UserAuthServiceEJB: registering " + name); - Connection c = null; - Statement s = null; - try - { - c = ds.getConnection(); - s = c.createStatement(); - String sql = "insert into " + Activator.tableName + - " values('" + name + "', '" + password + "')"; - System.out.println("sql = " + sql); - s.executeUpdate(sql); - return true; - } - catch (Exception e) - { - e.printStackTrace(); - } - finally - { - try - { - if (c!= null) c.close(); - if (s!=null) s.close(); - } - catch (Exception e) - { - } - } - return false; - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/WEB-INF/web.xml b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d491381821e..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/index.html b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/index.html deleted file mode 100755 index e2605f4f352..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - If you are already registered, then login, else register first. - - diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/login.html b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/login.html deleted file mode 100644 index cc3ac126e40..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/login.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Login Page - - - -
    -
    -

    User Name:

    -

    Password:

    -
    -

    - - New User? -

    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/registration.html b/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/registration.html deleted file mode 100644 index b4b451674cd..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/hybridapp1/src/main/webapp/registration.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - New User Registation Page - - - -
    -
    -

    User Name:

    -

    Password:

    -
    -

    - - -

    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test1/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/test1/MANIFEST.MF deleted file mode 100644 index 6951b30de91..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test1/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Bundle-SymbolicName: sahoo.rfc66.test1 -Bundle-Version: 1.0 -Bundle-ClassPath: WEB-INF/classes -DynamicImport-Package: * -Web-ContextPath: /test1 diff --git a/appserver/tests/osgi-javaee/osgi-web/test1/README b/appserver/tests/osgi-javaee/osgi-web/test1/README deleted file mode 100644 index 678dae57246..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test1/README +++ /dev/null @@ -1,8 +0,0 @@ -Simple test case with a static resource. -It has an additional twist like this: -When you use webbundle, don't specify Web-ContextPath in the query. -The non-OSGied war has no contextpath set in manifest, so -it uses /FirstV3Test which is set in sun-web.xml. - -When you install using fileinstall, the final war does have contextpath -set in manifest as well as in sun-web.xml. It shows that MANIFEST.MF takes precedence. diff --git a/appserver/tests/osgi-javaee/osgi-web/test1/build.properties b/appserver/tests/osgi-javaee/osgi-web/test1/build.properties deleted file mode 100644 index 0be70a12dc2..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test1/build.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test1/build.xml b/appserver/tests/osgi-javaee/osgi-web/test1/build.xml deleted file mode 100644 index b6df2ff5c19..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test1/build.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - -]> - - - - &commonBuild; - &commonproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test1/src/WEB-INF/sun-web.xml b/appserver/tests/osgi-javaee/osgi-web/test1/src/WEB-INF/sun-web.xml deleted file mode 100644 index a03122e5ae8..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test1/src/WEB-INF/sun-web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - /FirstV3Test - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test1/src/WEB-INF/web.xml b/appserver/tests/osgi-javaee/osgi-web/test1/src/WEB-INF/web.xml deleted file mode 100644 index 089e5df092b..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test1/src/WEB-INF/web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - 30 - - - - index.html - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test1/src/index.html b/appserver/tests/osgi-javaee/osgi-web/test1/src/index.html deleted file mode 100644 index 20be2b87863..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test1/src/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - Hello World - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/test2/MANIFEST.MF deleted file mode 100644 index 7b3e22c86c1..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Bundle-SymbolicName: sahoo.rfc66.test2 -Bundle-Version: 1.0 -Bundle-ClassPath: WEB-INF/classes -Import-Package: javax.servlet; javax.servlet.http; version=2.5 -Web-ContextPath: /test2 diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/README b/appserver/tests/osgi-javaee/osgi-web/test2/README deleted file mode 100644 index 037dd1058f2..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/README +++ /dev/null @@ -1 +0,0 @@ -Simple Servlet test diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/build.properties b/appserver/tests/osgi-javaee/osgi-web/test2/build.properties deleted file mode 100644 index 24784caff8b..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/build.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/build.xml b/appserver/tests/osgi-javaee/osgi-web/test2/build.xml deleted file mode 100644 index 7b601a72f09..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/build.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - -]> - - - - &commonBuild; - &commonproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/src/META-INF/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/test2/src/META-INF/MANIFEST.MF deleted file mode 100644 index 94b1d1e5e04..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Created-By: 1.5.0_13-rev (Sun Microsystems Inc.) - diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/src/WEB-INF/web.xml b/appserver/tests/osgi-javaee/osgi-web/test2/src/WEB-INF/web.xml deleted file mode 100644 index d4a559fb238..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/src/WEB-INF/web.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - LoginServlet - example.LoginServlet - - - LoginServlet - /login - - - RegistrationServlet - example.RegistrationServlet - - - RegistrationServlet - /registration - - - login.html - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/src/login.html b/appserver/tests/osgi-javaee/osgi-web/test2/src/login.html deleted file mode 100644 index cc3ac126e40..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/src/login.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Login Page - - - -
    -
    -

    User Name:

    -

    Password:

    -
    -

    - - New User? -

    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/src/main/java/example/LoginServlet.java b/appserver/tests/osgi-javaee/osgi-web/test2/src/main/java/example/LoginServlet.java deleted file mode 100644 index 6c2cb8e2f00..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/src/main/java/example/LoginServlet.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package example; - -import javax.servlet.http.*; -import javax.servlet.*; - -public class LoginServlet extends HttpServlet { - public void service(HttpServletRequest req, HttpServletResponse res) - throws ServletException, java.io.IOException { - System.out.println(this); - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/src/main/java/example/RegistrationServlet.java b/appserver/tests/osgi-javaee/osgi-web/test2/src/main/java/example/RegistrationServlet.java deleted file mode 100644 index 0f7e0ec5770..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/src/main/java/example/RegistrationServlet.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package example; - -import javax.servlet.http.*; -import javax.servlet.*; - -public class RegistrationServlet extends HttpServlet { - public void service(HttpServletRequest req, HttpServletResponse res) - throws ServletException, java.io.IOException { - System.out.println(this); - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/test2/src/registration.html b/appserver/tests/osgi-javaee/osgi-web/test2/src/registration.html deleted file mode 100644 index 02a5b5bf7b7..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test2/src/registration.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - New User Registation Page - - - -
    -
    -

    User Name:

    -

    Password:

    -
    -

    - - -

    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/test4/MANIFEST.MF deleted file mode 100644 index a5b7373d155..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Import-Package: javax.servlet; -Bundle-SymbolicName: sahoo.rfc66.test4 -Bundle-Version: 1.0 -Bundle-ClassPath: WEB-INF/classes -Web-ContextPath: /test4 diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/README b/appserver/tests/osgi-javaee/osgi-web/test4/README deleted file mode 100644 index bef3835c189..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/README +++ /dev/null @@ -1,2 +0,0 @@ -This is the quickstart sample that's distributed in V2. It uses JSPs which -use JSTL tags. diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/build.properties b/appserver/tests/osgi-javaee/osgi-web/test4/build.properties deleted file mode 100644 index 563c3894bd0..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/build.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/build.xml b/appserver/tests/osgi-javaee/osgi-web/test4/build.xml deleted file mode 100644 index 19f20c71a95..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/build.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - -]> - - - - &commonBuild; - &commonproperties; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/src/META-INF/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/test4/src/META-INF/MANIFEST.MF deleted file mode 100644 index 069d90d9935..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Ant-Version: Apache Ant 1.6.5 -Bundle-ClassPath: WEB-INF/classes -Import-Package2: javax.servlet.http; version=2.5, javax.servlet.jsp; j - avax.servlet.jsp.tagext; javax.el; javax.servlet.jsp.el; version=2.1 -Created-By: 1.5.0_05-b05 (Sun Microsystems Inc.) -Import-Package: javax.servlet; -Bundle-SymbolicName: simple-jsp -Web-ContextPath: /test4 - diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/classes/LocalStrings.properties b/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/classes/LocalStrings.properties deleted file mode 100644 index a69403f54f4..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/classes/LocalStrings.properties +++ /dev/null @@ -1,43 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -#Default resource bundle for english locale -greeting_message=Hi, my name is Duke. What's yours? -greeting_response=Hello diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/sun-web.xml b/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/sun-web.xml deleted file mode 100644 index 6ee78e14089..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/sun-web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - test4 - diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/web.xml b/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/web.xml deleted file mode 100644 index 9dc0ce004fa..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/src/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - hello - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/src/images/duke.waving.gif b/appserver/tests/osgi-javaee/osgi-web/test4/src/images/duke.waving.gif deleted file mode 100644 index 4336a2d05b9a165fa79f239cbfd347a792352c6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1305 zcmbV{>pRm60Dynn>|#TkI7a1cb277wOU`3moU;i@a@LYGDTGP4Nx56wG$Uj*H6m>; ztq^q*$z_vQad~M` zsZ4fx;CPlSvnVI$%t#bBH?<-+H8(YtpLyayT}W(dMFh8_QdaSEz4mwu zQjCc-5?n^k&*LMaykR&R6}K+sWaj1EOE@36g_w*J6Uidjb-sjV-sDZDQpprGH=~)a zAY;6fy85Z4w(djlDjFGCV%(A4?>KY<{)z2C*1I*q_CAuVr^S_hp%exLj9sL=4jY*r$>Z?qDcq>-1WY zH>@DocVai!m}!I}#6XAOL&)XceAqsLwMcJ-5_qJy*T`d(_7&Jd$KiN;Xg2z{%qr|T zhIbBvyZo z-n9h-GbIG7Sxk{(;@SF{ODsi4`s7Y5nh67&%!7~)@_7){NJRudx0>CJcxLkwjo5Om zn;~9U4xPbgVz#Kq69WX!R{#KaH39^2d!+=3NjOEU*%sZTc&#q+VA{Ir9!>tnk9#K} zwWRk@6ta~rFQl;rf#z&b9tWSk>_)BeUp?kn**=BnqTs*@70a!Mbk%B zWl0>(KI?U3UkD%)ORa|7nEFIkB(PuLGq=)gCJ<;GAiV7)k_u&Y0Xg`@<>${g5)y*x zBxo}&$XQfBln{F@ZTUOg(MPU%qlDPWLYx#!+Zn>s55Ej_RxFnocdBpN$NpOSwS7PY zH??x`grSdcCexegda%%Xw@#?;Nb!5`g1)C`Xu)23(4#W`ljDw;?l?zl(Q-OZ`Jypn zn;$j0RQ+TLTsH5rgkal)EFz_v$NuK}_%1)_ zSprZQmV_tyf!WM1ORol3f6+Z(bt`s}qcO^}e;onBjd^gDsSEE6trjyxC1i~BkpQ-J zIIrpp&(`e+*;0nq@NQ6fFFOX?XQOrDc`O0=ub?!6rxEULsj&WVO*#fL#V(nK - -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - - -Hello - - - - - - - -

    -
    - -

    - - -
    - - - <%@include file="response.jsp" %> - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test4/src/response.jsp b/appserver/tests/osgi-javaee/osgi-web/test4/src/response.jsp deleted file mode 100644 index 3b26d1d13aa..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test4/src/response.jsp +++ /dev/null @@ -1,74 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - -<%@ page import="javax.servlet.http.*" %> - -<% - String user = (String)request.getParameter("username"); - HttpSession httpSession = request.getSession(); - String users = (String)httpSession.getAttribute("users"); - if ( users == null ) { - users = user; - } - else { - users = users + ", " + user; - } - httpSession.setAttribute("users", users); -%> - - -

    , <%= users %>!

    - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/META-INF/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/test6/META-INF/MANIFEST.MF deleted file mode 100644 index 1f7d98b4170..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/META-INF/MANIFEST.MF +++ /dev/null @@ -1,7 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ClassPath: WEB-INF/classes -Bundle-SymbolicName: sahoo.rfc66.test6 -Created-By: 1.6.0_07 (Sun Microsystems Inc.) -Web-ContextPath: /test6 -Import-Package: javax.servlet; javax.servlet.http; version=2.5 - diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/README b/appserver/tests/osgi-javaee/osgi-web/test6/README deleted file mode 100644 index 4a88f5eb976..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/README +++ /dev/null @@ -1 +0,0 @@ -This is same as test2, except that it is an exploded dir. diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/WEB-INF/web.xml b/appserver/tests/osgi-javaee/osgi-web/test6/WEB-INF/web.xml deleted file mode 100644 index 66a55d61557..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/WEB-INF/web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - LoginServlet - example.LoginServlet - - - LoginServlet - /login - - - RegistrationServlet - example.RegistrationServlet - - - RegistrationServlet - /registration - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/build.properties b/appserver/tests/osgi-javaee/osgi-web/test6/build.properties deleted file mode 100644 index 82070e608e4..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/build.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/build.xml b/appserver/tests/osgi-javaee/osgi-web/test6/build.xml deleted file mode 100644 index ff9e1942053..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/build.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &commonproperties; - &bundleCommon; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/login.html b/appserver/tests/osgi-javaee/osgi-web/test6/login.html deleted file mode 100644 index cc3ac126e40..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/login.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Login Page - - - -
    -
    -

    User Name:

    -

    Password:

    -
    -

    - - New User? -

    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/registration.html b/appserver/tests/osgi-javaee/osgi-web/test6/registration.html deleted file mode 100644 index 02a5b5bf7b7..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/registration.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - New User Registation Page - - - -
    -
    -

    User Name:

    -

    Password:

    -
    -

    - - -

    - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/src/main/java/example/LoginServlet.java b/appserver/tests/osgi-javaee/osgi-web/test6/src/main/java/example/LoginServlet.java deleted file mode 100644 index 6c2cb8e2f00..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/src/main/java/example/LoginServlet.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package example; - -import javax.servlet.http.*; -import javax.servlet.*; - -public class LoginServlet extends HttpServlet { - public void service(HttpServletRequest req, HttpServletResponse res) - throws ServletException, java.io.IOException { - System.out.println(this); - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/test6/src/main/java/example/RegistrationServlet.java b/appserver/tests/osgi-javaee/osgi-web/test6/src/main/java/example/RegistrationServlet.java deleted file mode 100644 index 0f7e0ec5770..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test6/src/main/java/example/RegistrationServlet.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package example; - -import javax.servlet.http.*; -import javax.servlet.*; - -public class RegistrationServlet extends HttpServlet { - public void service(HttpServletRequest req, HttpServletResponse res) - throws ServletException, java.io.IOException { - System.out.println(this); - } -} diff --git a/appserver/tests/osgi-javaee/osgi-web/test7/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/test7/MANIFEST.MF deleted file mode 100644 index 7ffdc017a84..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test7/MANIFEST.MF +++ /dev/null @@ -1,4 +0,0 @@ -Bundle-SymbolicName: sahoo.rfc66.test7 -Bundle-ClassPath: WEB-INF/classes -Import-Package: javax.servlet; javax.servlet.http; version=2.5 -Web-ContextPath: /NOTUSED diff --git a/appserver/tests/osgi-javaee/osgi-web/test7/README b/appserver/tests/osgi-javaee/osgi-web/test7/README deleted file mode 100644 index abaebd01ecd..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test7/README +++ /dev/null @@ -1 +0,0 @@ -Test for Webbundle protocol, in this test the Web-ContextPath is set via webbundle protocol diff --git a/appserver/tests/osgi-javaee/osgi-web/test7/build.properties b/appserver/tests/osgi-javaee/osgi-web/test7/build.properties deleted file mode 100644 index 3a20d67af31..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test7/build.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test7/build.xml b/appserver/tests/osgi-javaee/osgi-web/test7/build.xml deleted file mode 100644 index 5a4f530e6d0..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test7/build.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -]> - - - - &commonBuild; - &commonproperties; - &bundleCommon; - &testproperties; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test7/src/META-INF/MANIFEST.MF b/appserver/tests/osgi-javaee/osgi-web/test7/src/META-INF/MANIFEST.MF deleted file mode 100644 index 94b1d1e5e04..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test7/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Created-By: 1.5.0_13-rev (Sun Microsystems Inc.) - diff --git a/appserver/tests/osgi-javaee/osgi-web/test7/src/WEB-INF/web.xml b/appserver/tests/osgi-javaee/osgi-web/test7/src/WEB-INF/web.xml deleted file mode 100644 index 835b2c3f51b..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test7/src/WEB-INF/web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - index.html - - - diff --git a/appserver/tests/osgi-javaee/osgi-web/test7/src/index.html b/appserver/tests/osgi-javaee/osgi-web/test7/src/index.html deleted file mode 100644 index 2dde8b74b8c..00000000000 --- a/appserver/tests/osgi-javaee/osgi-web/test7/src/index.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - Index Page - - - -

    Hello World !

    - - diff --git a/appserver/tests/paas/README.txt b/appserver/tests/paas/README.txt deleted file mode 100644 index 87d06d0eba4..00000000000 --- a/appserver/tests/paas/README.txt +++ /dev/null @@ -1,85 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# -Steps to run these automated tests: ------------------------------------ - -1. Unzip latest version of glassfish.zip and set S1AS_HOME enviroment variable to point to the extracted GlassFish location. - - For example: export S1AS_HOME=/tmp/glassfish4/glassfish - -2. Also set PAAS_TESTS_HOME environment variable to point to the location where paas tests are checked out. - - For example: export PAAS_TESTS_HOME=/tmp/main/appserver/tests/paas - -3. If you are using Oracle database, Copy the Oracle database plugin jars into $S1AS_HOME/modules. -If you are using MySQL database, copy the MySQL database plugin jars into $S1AS_HOME/modules directory. -Remove $S1AS_HOME/modules/paas.javadbplugin.jar if a Database other than JavaDB is used. Else do the following : - -When multiple database plugins are present in the modules directory, to register a particular database plugin as the default service provisioning engine, use the register-service-provisioning-engine command. For example, - -asadmin register-service-provisioning-engine --type Database --defaultservice=true org.glassfish.paas.mysqldbplugin.MySQLDBPlugin - -or - -asadmin register-service-provisioning-engine --type Database --defaultservice=true org.glassfish.paas.javadbplugin.DerbyPlugin - -4. [Only for Oracle DB] Copy Oracle jdbc driver (ojdbc14.jar) into $S1AS_HOME/domains/domain1/lib. Ref: http://download.oracle.com/otn/utilities_drivers/jdbc/10205/ojdbc14.jar - -5. [Only for MySQL DB] Copy Mysql jdbc driver (mysql-connector-java-5.0.4-bin.jar) into $S1AS_HOME/domains/domain1/lib. - -6. [Only for Native mode] Copy downloaded lb.zip under $S1AS_HOME/config directory. -[Only for OVM mode] Download and Copy the necessary OVM related jars into $S1AS_HOME/modules directory. - -7. Setup virtualization enviroment for your GlassFish installation. - - For example, run native_setup.sh to configure native IMS config. Modify kvm_setup.sh to suite your system details and run it. - -This step is optional in which case the service(s) required for this PaaS app will be provisioned in non-virtualized environment. - -8. When the load balancer is used, specify the load balancer's port 50080'..eg., -DargLine="-Dhttp.port=50080" - - GF_EMBEDDED_ENABLE_CLI=true mvn -Dhttps.proxyHost=www-proxy.us.oracle.com -Dhttps.proxyPort=80 clean verify surefire-report:report -DargLine="-Dhttp.port=50080" - - Without lb-plugin just skip the argument part.Deafult port of 28080 will be used. - - GF_EMBEDDED_ENABLE_CLI=true mvn -Dhttps.proxyHost=www-proxy.us.oracle.com -Dhttps.proxyPort=80 clean verify surefire-report:report - - The arguments -Dhttps.proxyHost=www-proxy.us.oracle.com -Dhttps.proxyPort=80 are included for the test 'mq-shared-service-test' to work properly. - diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/README.txt b/appserver/tests/paas/appscoped-db-with-resources-xml/README.txt deleted file mode 100644 index ee31fab732f..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/README.txt +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test bundles init.sql file as part of application archive. A glassfish-resources.xml file is included in the WEB-INF directory that describes the jdbc-connection-pool/jdbc-resource to be used during provisioning. - -The init.sql file is used by the service provisioning engine to load data into database that is created during provisioning. Application reads data from this database table and prints the contents onto a servlet. - -The database service that is provisioned is an application scoped service, service description is provided in the glassfish-services.xml file. - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/pom.xml b/appserver/tests/paas/appscoped-db-with-resources-xml/pom.xml deleted file mode 100644 index aefd1888cc3..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - appscoped-db-with-resources-xml - 4.1-SNAPSHOT - Appscoped DB Service with glassfish-resources.xml sample - war - - appscoped_db_with_resources_xml - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/java/org/glassfish/tests/paas/appscopeddbwithresourcesxml/CoffeeServlet.java b/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/java/org/glassfish/tests/paas/appscopeddbwithresourcesxml/CoffeeServlet.java deleted file mode 100644 index 08b633b75c9..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/java/org/glassfish/tests/paas/appscopeddbwithresourcesxml/CoffeeServlet.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.appscopeddbwithresourcesxml; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class CoffeeServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/CoffeeRes") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Appscoped Db service with glassfish-resources.xml PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Appscoped Db service with glassfish-resources.xml PaaS Application

    "); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - - DatabaseMetaData dbMetadata = stmt.getConnection().getMetaData(); - String dbUrl = dbMetadata.getURL(); - writer.println("DB URL : " + dbUrl + "\n"); - if (dbUrl.indexOf("foobar") == -1) { - throw new Exception("Custom Database [foobar] is not created while provisioning."); - } - - - ResultSet rs = stmt.executeQuery("SELECT c_id, c_name from coffee"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "Data retrieved from table \"coffee\"" + "
    " + "Coffee ID" + "" + "Coffee Name" + "
    " + rs.getObject(1) + "" + rs.getObject(2) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - } - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index d001d16fa8a..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 1b126275aff..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/init.sql b/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/init.sql deleted file mode 100644 index 75944ed21a0..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/init.sql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE coffee ( - c_id integer not null, - c_name char(16) -); - -INSERT INTO coffee VALUES(1, 'cuppa'); -INSERT INTO coffee VALUES(2, 'choco'); -INSERT INTO coffee VALUES(3, 'mocha'); -INSERT INTO coffee VALUES(4, 'java'); -INSERT INTO coffee VALUES(5, 'frappe'); diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index ae3f103737e..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - CoffeeServlet - org.glassfish.tests.paas.appscopeddbwithresourcesxml.CoffeeServlet - - - CoffeeServlet - /CoffeeServlet - - - - 30 - - - - java:app/jdbc/CoffeeRes - javax.sql.DataSource - - diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/images/Coffee.jpg b/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/images/Coffee.jpg deleted file mode 100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_lJcLq-Urb&|R0E^0qbW)GvM zch9W)!x|fk*hzvHtDpo;{;eaI|!L zfRJmm>aIb*uj|y%@5APQefY!i9b;Zx$`87Ko?Q6B-zO)*NR?Qvzx|V9@1WYcste+u z!G|n^X5KBbTG`@Jk=Lnzo8HzF%<7M@+%XYcM95w^WUZ;CgJFb5J zL|r|O3+*bO$v2zF9&ge%ao5nZAh!!?F#aR>9k~6Yqx&QH-Ms&+qx&QHbwT-e!SA#{ zdXrJjKS1v#f0RN)$?F`k`t%6cvHk>OA{CPY4&T|UBZ359;%IH zG5V#_S9Mvti5U(Ao6`iLtFNY>f0lHf`j(l(kp2B>-R<#Ni(#;4=T(p{*aE(4n0(%m zTs<$Yao_5VOiH6B&o%%t=HAyIspD6oVX&e0*2DRZlr}0u-E`-(d3999)Y(NHti7?u z1`eBTU6OP3I=@D-bnMk;>v&7meiyby{A?V*p&l8JbalBQsOvO!A{}$wcqP<0iiNPT zpV`Gz#yHPwmR{%G^6R%ux(8uo+(k<%P9EQQjtDl%-cO)9XaSH9UskTQ>hsHDtqH=e z0>gtPZRt}!w3MW#$ST{sx78M`gp_Qy`{{?NVy-%0zB2Mv(XVGrq+zPV;X@Zn_)9O% zQM9rnggfO%-%{OgjePhLpc$=a0~wyj*3;8pbdcmV=zF1h!2h^e6p@g}qTpd^j$p3l z{=8!p%sF}LR9*cG`oobi?VYU10)!%3R%{RuT`2Jt;0`Z$Ha)n}FX7{{a(6 B(aQh; diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/index.html b/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/index.html deleted file mode 100644 index 64e5c571f8a..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the Basic DB with glassfish-resources.xml PaaS sample.

    -

    Deployed servlets:

    -

    CoffeeServlet

    - - diff --git a/appserver/tests/paas/appscoped-db-with-resources-xml/src/test/java/org/glassfish/tests/paas/appscopeddbwithresourcesxml/CoffeeTest.java b/appserver/tests/paas/appscoped-db-with-resources-xml/src/test/java/org/glassfish/tests/paas/appscopeddbwithresourcesxml/CoffeeTest.java deleted file mode 100644 index c35952f0199..00000000000 --- a/appserver/tests/paas/appscoped-db-with-resources-xml/src/test/java/org/glassfish/tests/paas/appscopeddbwithresourcesxml/CoffeeTest.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.appscopeddbwithresourcesxml; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class CoffeeTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/appscoped_db_with_resources_xml.war"); - // TODO :: use mvn apis to get the archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/appscoped_db_with_resources_xml/CoffeeServlet", - "Coffee ID"); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - System.out.println("Destroying the resources created"); - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/basic-bookstore-dns/.settings/org.eclipse.jdt.core.prefs b/appserver/tests/paas/basic-bookstore-dns/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index eef5a5e7a9e..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Mon Apr 02 15:36:00 IST 2012 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.source=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 diff --git a/appserver/tests/paas/basic-bookstore-dns/Kkey-glassfish.+157+05094.key b/appserver/tests/paas/basic-bookstore-dns/Kkey-glassfish.+157+05094.key deleted file mode 100644 index 8e94784d6fe..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/Kkey-glassfish.+157+05094.key +++ /dev/null @@ -1 +0,0 @@ -key-glassfish. IN KEY 512 3 157 yF2NxML8Vbfes1uQa85A2XHQJ0XkA61yvpCzVv4wHeI= diff --git a/appserver/tests/paas/basic-bookstore-dns/Kkey-glassfish.+157+05094.private b/appserver/tests/paas/basic-bookstore-dns/Kkey-glassfish.+157+05094.private deleted file mode 100644 index b3797ee10fe..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/Kkey-glassfish.+157+05094.private +++ /dev/null @@ -1,3 +0,0 @@ -Private-key-format: v1.2 -Algorithm: 157 (HMAC_MD5) -Key: yF2NxML8Vbfes1uQa85A2XHQJ0XkA61yvpCzVv4wHeI= diff --git a/appserver/tests/paas/basic-bookstore-dns/README.txt b/appserver/tests/paas/basic-bookstore-dns/README.txt deleted file mode 100644 index 002fe477615..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/README.txt +++ /dev/null @@ -1,44 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -Basic PaaS application that runs across all virtualization environments. - -Add 10.178.214.173 to the /etc/resolv.conf.This is the Domain Name Server.This should be the first entry among all nameservers. -Please refer ../README.txt for details on configuration of virtualization environments and how to execute individual test. diff --git a/appserver/tests/paas/basic-bookstore-dns/basic_paas_sample.war b/appserver/tests/paas/basic-bookstore-dns/basic_paas_sample.war deleted file mode 100644 index 969be91729c2853c387c5aabf8336987ee0e1337..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11377 zcmbVy1yo$gx;5_Z7TjHfOXKeD?!h%kaDoSi;2tytCqQs_2`-HV2<{N!t>Z| zzw_qI>hbGWj~B-8-Q)oBQsQDNs*G~tr*cDsvN8;eR8;oS+`jiLSIa&=+2FJpxc6cj-q@K6kI5wZB^t3-j?+^R0+8bE0ye`DBT z;#tavkVXGV7k}WG>M9+^*u zsKp8T&X`wm9v~w7ZQv-wWM7E7q`5?jvKzHdRT;$Ekrd9M5G-!wSssWu$vGq3XCFBF z3C4`l{a$(<8S{PVSyl#zcwZCzBw81(X9@k@u&uFh_FMK_Ry(w~$B0vruPkiXQ@c3g z=bkkJjacNCn#dU8y8;tR)d4zW*mUjSuT8C&P$0@UaFt`ha|)AScXbQ{%am0+Sg?IL zODxkG-ZxfvuTaoZ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{THl1oTwk%-#6@E-KZbz`TkOm7U8GG{Jz|Oobh+= uKb@*yPxQNW{p%_7YltX{|DPd#ojHm!kdJ?grwU;VkOxQ*5M9crPyY`zPX)FB diff --git a/appserver/tests/paas/basic-bookstore-dns/bookstore.war b/appserver/tests/paas/basic-bookstore-dns/bookstore.war deleted file mode 100644 index 987502f742c8c5ad318ae12897d92c037369d41a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26391 zcmb5V18^r_*De}PY}>YN+sVYXjfw4vZQJ<8wr$(a#5wbSKb-g0sr%h~x~fstYpq_p zYxlFCg;taS1%n3qXA3kN68zW2e;%Ozp5??;h3KT@#TgX;Qw$O);IG)#!26@+-`jqF zchr9ulM|Ac5*JfZrI!6@H|3@={Fb5`xw8#F!s5r#)0W*g^I`gn8~| zJlNpkF#3D<^6(LrJk&9wS2f-ev|rO8DkLtDtBFcS3W}&VP$;^0}?WG z9H9I&@24;eWXsr2JdZ;LJtA%fwRcFMZ-#^0=Pjy#jZ(fLa)}&0cob&63h>AW=0?K^oao4qP*7XB z;1#9b<(!g0crVC-)NDYdc`U-E^s#&$s_-Dik~P@Iia7f-q@e}rJfSUB}-D^gnE?|iO{$Zt*p}Py205; zsl~`}o%h@eBU>UiGI+E<)CvL%tbu_;OuY7%52K9dV<$>1#I~H;g^qyFG`xNt3K~^ z%X5#C0_~x%_-W&GA%mmG*|%VoH5vF2FT8Jf3C!!iZ=X)MlP!$`T5(kZZ$Y@UP@a$*n5oR$NcS|Az+S-N{Po_44_Ub{_=JoJVt>gnfQ|PL&zAwO4_i4^ z9P`X?_H@phm609Xc^BePJ^!x1rqv^B=hHZd**ng@E0;K z2PuZ~Q9jAf4}X1%*asRLi5NyPi(k&+oMq4}L~wDqXmHclPIYh$t#_VHD&}W^`)1Os z4}&o53lktLsS1 zua%X;Bj-wYB;1|(?%QX3=hbD+xBEeNIThmjzZV}!AosuPq6M1XZq{G?lK;D+{yXgd zH`LQPn>x8!8k;)*17#s$1v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i#^GAFB>`%M-b_lTVvhzDTUYKz5G$-2bLT}vU?0`mwC>65mccA0 zEW*tay+`(4llqX<8;BK*o%;lWG<`JyY^B91FKQO`EQMIJJ;{Dj6n`4kF51OKQ`i#v z;xjaRpG|US7Py%KZdV7K@1aWxx4oR(Q$!z1fgr=WxO5O~lQ9QB^2Qxc5M~3|1+EC5 zdZ)g(17el=e7z<4tKFHQu#O_U0o8&EB3H8E33OIR@2mc$71H9NC2HXUHeU`^{ZKwX zd+NsQCDSoR!?qs5O;yGH7qWvuup6yolxbu>r1hiE8mEvGjTM!Ri>GF(|F;z-k64o-ceHbdhjGc};r{ObJU&@inLlt%Yz%d+ z5xYgKB`574A5ulCRap{P!E!i6^U>t9 zeo#;%p}P#fkF(NHwjw%%kP>|cjt=q9i3J`G?V+H6?Y)0|{xy+!GW+{P1CKjDmUK7r zhsR%Lzoi{`Qur&o{~_}EcX@Q&^057rj9SYo0jMQSL|5EYaGrfP7eatuTB#Q|C_s#Zn(0>6W{-;)W%s=oXuJR!MD;vSj8vT7f zf}dvTZmz%8=(p?yPhS5X2>v9%`%sCW{piR9c~Y2>{ry*yC%eB7j{dNF{8A7o{dTJQ87lqkXn!?+43?gZMgMC2 zA3~>pR(%Yfo>asB3)Nq(_1l@{?}MqI9@5>G{!jY<4y~SA_K!i}&tu|~8#m3rwCq1N f&eLH$x_KHQr9>eg;z2Ml%!ga - - - - - 4.0.0 - org.glassfish.tests.paas - basic-bookstore-dns - 4.1-SNAPSHOT - Basic Bookstore DNS sample - war - - basic_bookstore_dns - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.tests.paas.basetest - base-test - ${project.version} - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 098cb43aebd..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index f54c555e83f..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 689465fd101..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - BasicPaaSServlet - org.glassfish.tests.paas.basic.BasicPaaSServlet - - - BasicPaaSServlet - /BasicPaaSServlet - - - - 30 - - - diff --git a/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/index.html b/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/index.html deleted file mode 100644 index 247c053283c..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the basic PaaS sample.

    -

    Deployed servlets:

    -

    BasicPaaSServlet

    - - diff --git a/appserver/tests/paas/basic-bookstore-dns/src/test/java/org/glassfish/tests/paas/dns/BasicbookstoreDnsPaasTest.java b/appserver/tests/paas/basic-bookstore-dns/src/test/java/org/glassfish/tests/paas/dns/BasicbookstoreDnsPaasTest.java deleted file mode 100644 index 0672c782347..00000000000 --- a/appserver/tests/paas/basic-bookstore-dns/src/test/java/org/glassfish/tests/paas/dns/BasicbookstoreDnsPaasTest.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.dns; - -import junit.framework.Assert; - -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.internal.api.Globals; -import org.junit.Test; -import org.glassfish.hk2.api.ServiceLocator; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.ArrayList; -import java.util.regex.*; -import org.glassfish.tests.paas.basetest.BaseTest; - -/** - * @author Shyamant Hegde - */ - -public class BasicbookstoreDnsPaasTest { - - @Test - public void test() throws Exception { - - // Bootstrap GlassFish DAS in embedded mode. - GlassFish glassfish = bootstrap(); - - // Deploy the Basic and bookstore app and verify it. - runTests(glassfish); - - - - // 5. Stop the GlassFish DAS - glassfish.dispose(); - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private void runTests(GlassFish glassfish) throws Exception { - // 2. Deploy the PaaS application. - File basicArchive = new File(System.getProperty("basedir") - + "/basic_paas_sample.war"); // TODO :: use mvn apis to - - File bookArchive = new File(System.getProperty("basedir") - + "/bookstore.war"); - - Assert.assertTrue(basicArchive.exists()); - Assert.assertTrue(bookArchive.exists()); - Deployer deployer = null; - String firstappName = null; - String secondappName = null; - BaseTest firstBaseTest = new BaseTest(glassfish); - BaseTest secondBaseTest = new BaseTest(glassfish); - try { - CreateDNSExternalService(); - CreateLbSharedService(glassfish); - firstappName = firstBaseTest.deploy(basicArchive,"basic_paas_sample",null); - - - System.err.println("Deployed [" + firstappName + "]"); - Assert.assertNotNull(firstappName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - firstappName = firstappName.replaceAll("_","-"); - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - get("http://" + firstappName +".hudson.com:" + HTTP_PORT - + "/BasicPaaSServlet", - "Request headers from the request:"); - - - secondappName = secondBaseTest.deploy(bookArchive,"bookstore",null); - System.err.println("Deployed [" + secondappName + "]"); - Assert.assertNotNull(secondappName); - secondappName = secondappName.replaceAll("_","-"); - get("http://" + secondappName +".hudson.com:" + HTTP_PORT - + "/BookStoreServlet", - "Please wait while accessing the bookstore database....."); - - get("http://" - + secondappName +".hudson.com:" - + HTTP_PORT - + "/BookStoreServlet?title=Advanced+guide+for+developing+PaaS+components&authors=Shalini+M&price=100%24", - "Here are the list of books available in our store:"); - - get("http://" + secondappName+".hudson.com:" + HTTP_PORT - + "/BookStoreServlet", - "Advanced guide for developing PaaS components"); - get("http://" + firstappName +".hudson.com:" + HTTP_PORT - + "/BasicPaaSServlet", - "Request headers from the request:"); - if (secondappName != null) { - secondBaseTest.undeploy(); - System.err.println("Undeployed [" + secondappName + "]"); - } - - get("http://" + firstappName +".hudson.com:" + HTTP_PORT - + "/BasicPaaSServlet", - "Request headers from the request:"); - - // 4. Undeploy the PaaS application . TODO :: use cloud-undeploy?? - } finally { - if (firstappName != null) { - firstappName = firstappName.replaceAll("-","_"); - - firstBaseTest.undeploy(); - System.err.println("Undeployed [" + firstappName + "]"); - deleteSharedLbandDNSexternalSerivce(); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - - } - - - } - - } - - private GlassFish bootstrap() throws Exception { - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - return glassfish; - } - - /* Creates LB as a shared service */ - public void CreateLbSharedService(GlassFish glassfish) throws Exception { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat - .getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - String template = checkMode(glassfish); - if(template.equalsIgnoreCase("Native")){ - template = "LBNative"; - }else if(template.equalsIgnoreCase("kvm")){ - template = "apachemodjk"; - }else{ - template = "otd-new"; - } - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner - .getCommandInvocation("create-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("template", template); - parameterMap.add("configuration", "http-port=50080:https-port=50081:ssl-enabled=true:health-check-interval=60:health-check-timeout=10"); - parameterMap.add("servicetype", "LB"); - parameterMap.add("DEFAULT","hudson-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'hudson-shared-lb-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - } - - /*Create DNS external shared service*/ - - public void CreateDNSExternalService(){ - - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat - .getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner - .getCommandInvocation("create-external-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("servicetype", "DNS"); - parameterMap.add("configuration", "domain-name=hudson.com:dns-ip=10.178.214.173:dns-private-key-file-loc="+System.getenv("PAAS_TESTS_HOME")+"/basic-bookstore-dns/Kkey-glassfish.+157+05094.private"); - parameterMap.add("DEFAULT","hudson-dns-external-services"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created external service 'hudson-dns-external-services' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - } - - /* Check the mode of test execution */ - public String checkMode(GlassFish glassfish) throws Exception { - ArrayList params = new ArrayList(); - CommandResult result = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - params.clear(); - params.add("--virtualization"); - params.add("Native"); - result = commandRunner.run("list-templates", - (String[]) params.toArray(new String[params.size()])); - if (result.getOutput().contains("Native")) { - return "Native"; - } - params.clear(); - params.add("--virtualization"); - params.add("kvm"); - result = commandRunner.run("list-templates", - (String[]) params.toArray(new String[params.size()])); - if (result.getOutput().contains("apachemodjk")) { - return "kvm"; - } else { - return "ovm"; - } - - } - - /*Delete shared LB service*/ - private void deleteSharedLbandDNSexternalSerivce() { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - //Try stopping a shared service, referenced by the app. Should 'FAIL' - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("delete-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "hudson-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - invocation = commandRunner.getCommandInvocation("delete-external-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "hudson-dns-external-services"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - } - - - -} diff --git a/appserver/tests/paas/basic-db-initsql/README.txt b/appserver/tests/paas/basic-db-initsql/README.txt deleted file mode 100644 index 83e1cdbb7d7..00000000000 --- a/appserver/tests/paas/basic-db-initsql/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test verifies the init sql feature using derby database. - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/basic-db-initsql/initsql.sql b/appserver/tests/paas/basic-db-initsql/initsql.sql deleted file mode 100644 index ad14bc5140c..00000000000 --- a/appserver/tests/paas/basic-db-initsql/initsql.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE customer ( - c_id integer not null, - c_name char(16) -); - -INSERT INTO customer VALUES(1, 'xxxx'); -INSERT INTO customer VALUES(2, 'rrrr'); -INSERT INTO customer VALUES(3, 'eeee'); -INSERT INTO customer VALUES(4, 'yyyy'); -INSERT INTO customer VALUES(5, 'zzzz'); diff --git a/appserver/tests/paas/basic-db-initsql/pom.xml b/appserver/tests/paas/basic-db-initsql/pom.xml deleted file mode 100644 index 5f29d1307bb..00000000000 --- a/appserver/tests/paas/basic-db-initsql/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic-db-initsql - 4.1-SNAPSHOT - Basic InitSQL PaaS sample - war - - basic_db_initsql_paas_sample - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - maven-antrun-plugin - - - test - - run - - - - - - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/basic-db-initsql/src/main/java/org/glassfish/tests/paas/basicdbinitsql/BasicDBInitSqlServlet.java b/appserver/tests/paas/basic-db-initsql/src/main/java/org/glassfish/tests/paas/basicdbinitsql/BasicDBInitSqlServlet.java deleted file mode 100644 index b8304ae82ab..00000000000 --- a/appserver/tests/paas/basic-db-initsql/src/main/java/org/glassfish/tests/paas/basicdbinitsql/BasicDBInitSqlServlet.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicdbinitsql; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class BasicDBInitSqlServlet extends HttpServlet { - - @Resource(mappedName = "jdbc/__basic_db_initsql_paas_sample") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Basic DB InitSQL PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Basic DB InitSQL PaaS Application

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - ResultSet rs = stmt.executeQuery("SELECT c_id, c_name from customer"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "Data retrieved from table \"customer\"" + "
    " + "Customer ID" + "" + "Customer Name" + "
    " + rs.getObject(1) + "" + rs.getObject(2) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 46de5924b57..00000000000 --- a/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 66a8a270039..00000000000 --- a/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - jdbc/__basic_db_initsql_paas_sample - jdbc/__basic_db_initsql_paas_sample - - diff --git a/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 11e7982e955..00000000000 --- a/appserver/tests/paas/basic-db-initsql/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - BasicDBInitSqlServlet - org.glassfish.tests.paas.basicdbinitsql.BasicDBInitSqlServlet - - - BasicDBInitSqlServlet - /BasicDBInitSqlServlet - - - - 30 - - - - jdbc/__basic_db_initsql_paas_sample - javax.sql.DataSource - - - diff --git a/appserver/tests/paas/basic-db-initsql/src/main/webapp/index.html b/appserver/tests/paas/basic-db-initsql/src/main/webapp/index.html deleted file mode 100644 index e484e6dac04..00000000000 --- a/appserver/tests/paas/basic-db-initsql/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the basic DB InitSQL PaaS sample.

    -

    Deployed servlets:

    -

    BasicDBInitSqlServlet

    - - diff --git a/appserver/tests/paas/basic-db-initsql/src/test/java/org/glassfish/tests/paas/basicdbinitsql/BasicDBInitSqlTest.java b/appserver/tests/paas/basic-db-initsql/src/test/java/org/glassfish/tests/paas/basicdbinitsql/BasicDBInitSqlTest.java deleted file mode 100644 index 77ae31596c9..00000000000 --- a/appserver/tests/paas/basic-db-initsql/src/test/java/org/glassfish/tests/paas/basicdbinitsql/BasicDBInitSqlTest.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicdbinitsql; - -import junit.framework.Assert; -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.embeddable.*; -import org.glassfish.internal.api.Globals; -import org.junit.Test; -import org.glassfish.hk2.api.ServiceLocator; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class BasicDBInitSqlTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/basic_db_initsql_paas_sample.war"); // TODO :: use - // mvn apis to - // get the - // archive - // location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic_db_initsql_paas_sample/BasicDBInitSqlServlet", - "Customer ID"); - - testListServices(); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.out.println("Destroying the resources created"); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - -private void testListServices() { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - - - //Testing for the '--output' option of lst-services sub-commands - { - List outputOptions = new ArrayList(); - outputOptions.add("SERVICE-NAME"); - outputOptions.add("VM-ID"); - outputOptions.add("SERVER-TYPE"); - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("list-services", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("output", "service-name,vm-id,server-type"); - invocation.parameters(parameterMap).execute(); - List> list = (List>) report.getExtraProperties().get("list"); - Map map = list.get(0); - Set set = map.keySet(); - outputOptions.removeAll(set); - boolean isEmpty = outputOptions.isEmpty(); - System.out.println("list-services --output option test passed:: " + isEmpty); - Assert.assertTrue(isEmpty); - } - - //Testing for the '--key' option of lst-services sub-commands - { - String key = "VM-ID"; - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("list-services", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("key", key); - parameterMap.add("output", key); - invocation.parameters(parameterMap).execute(); - List> list = (List>) report.getExtraProperties().get("list"); - ListIterator listIterator = list.listIterator(); - List valueList = new ArrayList(); - Map map; - while (listIterator.hasNext()) { - map = (Map) listIterator.next(); - valueList.add(map.get(key)); - } - boolean isSorted = isSortedList(valueList); - System.out.println("list-services --key option test passed:: " + isSorted); - Assert.assertTrue(isSorted); - - } - - //Testing for the '--type' option of lst-services sub-commands - { - String type = "DATABASE"; - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("list-services", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("type", type); - parameterMap.add("output", "SERVER-TYPE"); - invocation.parameters(parameterMap).execute(); - List> list = (List>) report.getExtraProperties().get("list"); - ListIterator listIterator = list.listIterator(); - List valueList = new ArrayList(); - Map map; - String typeFound = null; - boolean onlyTypeFound = false; - while (listIterator.hasNext()) { - map = (Map) listIterator.next(); - typeFound = (String) map.get("SERVER-TYPE"); - if (type.equals(typeFound)) { - onlyTypeFound = true; - } else { - onlyTypeFound = false; - break; - } - } - if (valueList.isEmpty()) { - onlyTypeFound = true; - } - - System.out.println("list-services --type option test passed:: " + onlyTypeFound); - Assert.assertTrue(onlyTypeFound); - - } - - //Testing for the '--scope' option of lst-services sub-commands - //Here, the war deployed is 'basic_db_initsql_paas_sample.war', hence using it as the appname. - { - String scope = "application"; - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("list-services", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("scope", scope); - parameterMap.add("output", "SCOPE"); - parameterMap.add("appname", "basic_db_initsql_paas_sample"); - invocation.parameters(parameterMap).execute(); - List> list = (List>) report.getExtraProperties().get("list"); - ListIterator listIterator = list.listIterator(); - List valueList = new ArrayList(); - Map map; - String scopeFound = null; - boolean onlyScopeFound = false; - while (listIterator.hasNext()) { - map = (Map) listIterator.next(); - scopeFound = (String) map.get("SCOPE"); - if (scope.equals(scopeFound)) { - onlyScopeFound = true; - } else { - onlyScopeFound = false; - break; - } - } - if (valueList.isEmpty()) { - onlyScopeFound = true; - } - - System.out.println("list-services --scope option test passed:: " + onlyScopeFound); - Assert.assertTrue(onlyScopeFound); - - } - - // test the option --terse=false. - { - - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("list-services", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("output", "service-name,vm-id,server-type"); - parameterMap.add("terse", "true"); - invocation.parameters(parameterMap).execute(); - List> list = (List>) report.getExtraProperties().get("list"); - boolean headersNotFound = false; - for (Map map : list) { - headersNotFound = false; - Set headers = map.keySet(); - for (String header : headers) { - if ("".equals(header)) { - headersNotFound = true; - } else { - headersNotFound = false; - break; - } - } - if (!headersNotFound) { - break; - } - } - System.out.println("list-services --terse=true option test passed:: " + headersNotFound); - Assert.assertTrue(headersNotFound); - - - } - - - // test --type option - { - String typeValue="Javaee"; - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("list-services", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("output", "server-type"); - parameterMap.add("type",typeValue); - invocation.parameters(parameterMap).execute(); - List> list = (List>) report.getExtraProperties().get("list"); - boolean otherTypeFound = false; - for (Map map : list) { - String value= map.get("SERVER-TYPE"); - if(!value.equalsIgnoreCase(typeValue)){ - otherTypeFound=true; - break; - } - } - System.out.println("list-services --type option test passed:: " + !otherTypeFound); - Assert.assertFalse(otherTypeFound); - } - - - } - - private boolean isSortedList(List list) { - ListIterator list_iter = list.listIterator(); - if (!list_iter.hasNext()) { - return true; - } - String t = (String) list_iter.next(); - while (list_iter.hasNext()) { - String t2 = (String) list_iter.next(); - if (t.compareTo(t2) > 0) { - return false; - } - t = t2; - } - return true; - - - } - -} diff --git a/appserver/tests/paas/basic-db-teardown-sql/README.txt b/appserver/tests/paas/basic-db-teardown-sql/README.txt deleted file mode 100644 index 1905c728984..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/README.txt +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test bundles init.sql and teardown.sql files as part of application archive. A glassfish-resources.xml file is included in the WEB-INF directory that describes the jdbc-connection-pool/jdbc-resource to be used during provisioning. - -The init.sql file is used by the service provisioning engine to load data into database that is created during provisioning. Application reads data from this database table and prints the contents onto a servlet. - -While undeployment happens, before app is undeployed, the service provisioning engine executes the teardown.sql. This test also does DriverManager.getConnection to check if the database contents have been cleared. - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/basic-db-teardown-sql/pom.xml b/appserver/tests/paas/basic-db-teardown-sql/pom.xml deleted file mode 100644 index f5404e7dcee..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic-db-teardown-sql - 4.1-SNAPSHOT - Basic DB Tear down SQL PaaS sample - war - - basic_db_teardown_sql - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/java/org/glassfish/tests/paas/basicdbteardownsql/CoffeeServlet.java b/appserver/tests/paas/basic-db-teardown-sql/src/main/java/org/glassfish/tests/paas/basicdbteardownsql/CoffeeServlet.java deleted file mode 100644 index c54cce1efbc..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/java/org/glassfish/tests/paas/basicdbteardownsql/CoffeeServlet.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicdbteardownsql; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class CoffeeServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/CoffeeRes") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Basic Db with glassfish-resources.xml PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Basic Db with glassfish-resources.xml PaaS Application

    "); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - - DatabaseMetaData dbMetadata = stmt.getConnection().getMetaData(); - String dbUrl = dbMetadata.getURL(); - writer.println("DB URL : " + dbUrl + "\n"); - if (dbUrl.indexOf("foobar") == -1) { - throw new Exception("Custom Database [foobar] is not created while provisioning."); - } - - - ResultSet rs = stmt.executeQuery("SELECT c_id, c_name from coffee"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "Data retrieved from table \"coffee\"" + "
    " + "Coffee ID" + "" + "Coffee Name" + "
    " + rs.getObject(1) + "" + rs.getObject(2) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - } - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/java/org/glassfish/tests/paas/basicdbteardownsql/DbConnectionDetailsServlet.java b/appserver/tests/paas/basic-db-teardown-sql/src/main/java/org/glassfish/tests/paas/basicdbteardownsql/DbConnectionDetailsServlet.java deleted file mode 100644 index 076599ab8c3..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/java/org/glassfish/tests/paas/basicdbteardownsql/DbConnectionDetailsServlet.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.paas.basicdbteardownsql; - -import javax.annotation.Resource; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.DatabaseMetaData; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.HashMap; -import java.util.Map; - -public class DbConnectionDetailsServlet extends HttpServlet{ - - @Resource(mappedName = "java:app/jdbc/CoffeeRes") - private DataSource ds = null; - - private static Map userCredentials = new HashMap(); - - static { - userCredentials.put("APP", "APP"); - userCredentials.put("root", "mysql"); - userCredentials.put("scott", "tiger"); - } - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws java.io.IOException if an input/output error occurs - * @throws javax.servlet.ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - - DatabaseMetaData dbMetadata = stmt.getConnection().getMetaData(); - - writer.println(dbMetadata.getURL()); - writer.println(dbMetadata.getUserName()); - writer.println(userCredentials.get(dbMetadata.getUserName())); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } - } -} diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index a34bfe7c2e9..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 1bb256cf833..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/init.sql b/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/init.sql deleted file mode 100644 index 75944ed21a0..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/init.sql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE coffee ( - c_id integer not null, - c_name char(16) -); - -INSERT INTO coffee VALUES(1, 'cuppa'); -INSERT INTO coffee VALUES(2, 'choco'); -INSERT INTO coffee VALUES(3, 'mocha'); -INSERT INTO coffee VALUES(4, 'java'); -INSERT INTO coffee VALUES(5, 'frappe'); diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/teardown.sql b/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/teardown.sql deleted file mode 100644 index 0471057f13d..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/teardown.sql +++ /dev/null @@ -1,40 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -DROP TABLE coffee; diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 6d4d4eaf18c..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - CoffeeServlet - org.glassfish.tests.paas.basicdbteardownsql.CoffeeServlet - - - CoffeeServlet - /CoffeeServlet - - - DbConnectionDetailsServlet - org.glassfish.tests.paas.basicdbteardownsql.DbConnectionDetailsServlet - - - DbConnectionDetailsServlet - /DbConnectionDetailsServlet - - - - 30 - - - - java:app/jdbc/CoffeeRes - javax.sql.DataSource - - diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/images/Coffee.jpg b/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/images/Coffee.jpg deleted file mode 100644 index 8e5cb9f3251414798ddde34b8d0d3fc365e05f62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46270 zcmcG$b#NTd(k(b*h7mK2$YN$@W@ZM9Sr#)hlVve8vnlK-O# z{(1RNKL7|1@dV)r1pxv;0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RN)$?F`k`t%6cvHk>OA{CPY4&T|UBZ359;%IH zG5V#_S9Mvti5U(Ao6`iLtFNY>f0lHf`j(l(kp2B>-R<#Ni(#;4=T(p{*aE(4n0(%m zTs<$Yao_5VOiH6B&o%%t=HAyIspD6oVX&e0*2DRZlr}0u-E`-(d3999)Y(NHti7?u z1`eBTU6OP3I=@D-bnMk;>v&7meiyby{A?V*p&l8JbalBQsOvO!A{}$wcqP<0iiNPT zpV`Gz#yHPwmR{%G^6R%ux(8uo+(k<%P9EQQjtDl%-cO)9XaSH9UskTQ>hsHDtqH=e z0>gtPZRt}!w3MW#$ST{sx78M`gp_Qy`{{?NVy-%0zB2Mv(XVGrq+zPV;X@Zn_)9O% zQM9rnggfO%-%{OgjePhLpc$=a0~wyj*3;8pbdcmV=zF1h!2h^e6p@g}qTpd^j$p3l z{=8!p%sF}LR9*cG`oobi?VYU10)!%3R%{RuT`2Jt;0`Z$Ha)n}FX7{{a(6 B(aQh; diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/index.html b/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/index.html deleted file mode 100644 index 499ec03a91b..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the Basic DB Tear down SQL PaaS sample.

    -

    Deployed servlets:

    -

    CoffeeServlet

    - - diff --git a/appserver/tests/paas/basic-db-teardown-sql/src/test/java/org/glassfish/tests/paas/basicdbteardownsql/CoffeeTest.java b/appserver/tests/paas/basic-db-teardown-sql/src/test/java/org/glassfish/tests/paas/basicdbteardownsql/CoffeeTest.java deleted file mode 100644 index eabcfe713d2..00000000000 --- a/appserver/tests/paas/basic-db-teardown-sql/src/test/java/org/glassfish/tests/paas/basicdbteardownsql/CoffeeTest.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicdbteardownsql; - -import java.util.ArrayList; -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.sql.*; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class CoffeeTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/basic_db_teardown_sql.war"); - // TODO :: use mvn apis to get the archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - List dbConnectionDetails = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - - //2.1. Create the shared DB service - CommandResult createSharedServiceResult = commandRunner.run( - "create-shared-service", "--characteristics", "service-type=Database", - "--configuration", "database.name=foobar", "--servicetype", - "Database", "coffee-service"); - System.out.println("\ncreate-shared-service command output [ " + - createSharedServiceResult.getOutput() + "]"); - - //2.2. List services to check for the shared service - CommandResult listSharedServicesResult = commandRunner.run( - "list-services", "--scope", "shared", "--output", "service-name, state"); - System.out.println("\nlist-services command output [ " - + listSharedServicesResult.getOutput() + "]"); - - //2.3. Deploy app - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic_db_teardown_sql/CoffeeServlet", - "Coffee ID"); - - dbConnectionDetails = getDbConnectionDetails("http://" + instanceIP + ":" + HTTP_PORT + - "/basic_db_teardown_sql/DbConnectionDetailsServlet"); - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - testTearDownSql(dbConnectionDetails); - System.out.println("Destroying the resources created"); - //4.1. Delete Shared DB Service. - CommandResult deleteResult = commandRunner.run( - "delete-shared-service", "coffee-service"); - System.out.println("\ndelete-shared-service command output [" + - deleteResult.getOutput() + "]"); - } - } - - } - - private void testTearDownSql(List dbConnectionDetails) throws SQLException { - boolean notFound = false; - Connection con = null; - Statement stmt = null; - System.out.println("DB Connection Details = " + dbConnectionDetails); - Assert.assertEquals(dbConnectionDetails.size(), 3); - try { - con = DriverManager.getConnection(dbConnectionDetails.get(0) , - dbConnectionDetails.get(1), dbConnectionDetails.get(2)); - System.out.println("Autocommit : " + con.getAutoCommit()); - stmt = con.createStatement(); - ResultSet rs = stmt.executeQuery("Select * from coffee"); - System.out.println("Result set empty : " + rs.next()); - } catch (SQLSyntaxErrorException ex) { - //Expected. - notFound = true; - } finally { - if(con != null) { - con.close(); - } - if(stmt != null) { - stmt.close(); - } - } - Assert.assertTrue(notFound); - System.out.println("\n***** SUCCESS **** Tear Down SQL Successful.*****\n"); - } - - private List getDbConnectionDetails(String urlStr) throws Exception { - List dbConnectionDetails = new ArrayList(); - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - while ((line = in.readLine()) != null) { - dbConnectionDetails.add(line); - } - return dbConnectionDetails; - } - - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/basic-db-with-resources-xml/README.txt b/appserver/tests/paas/basic-db-with-resources-xml/README.txt deleted file mode 100644 index 87e7160154c..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/README.txt +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test bundles init.sql file as part of application archive. A glassfish-resources.xml file is included in the WEB-INF directory that describes the jdbc-connection-pool/jdbc-resource to be used during provisioning. - -The init.sql file is used by the service provisioning engine to load data into database that is created during provisioning. Application reads data from this database table and prints the contents onto a servlet. - -The Database service is created as a shared service in this test case. - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/basic-db-with-resources-xml/pom.xml b/appserver/tests/paas/basic-db-with-resources-xml/pom.xml deleted file mode 100644 index f637d9e37a8..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic-db-with-resources-xml - 4.1-SNAPSHOT - Basic DB with glassfish-resources.xml sample - war - - basic_db_with_resources_xml - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/main/java/org/glassfish/tests/paas/basicdbwithresourcesxml/CoffeeServlet.java b/appserver/tests/paas/basic-db-with-resources-xml/src/main/java/org/glassfish/tests/paas/basicdbwithresourcesxml/CoffeeServlet.java deleted file mode 100644 index 43b17dc6b19..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/src/main/java/org/glassfish/tests/paas/basicdbwithresourcesxml/CoffeeServlet.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicdbwithresourcesxml; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class CoffeeServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/CoffeeRes") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Basic Db with glassfish-resources.xml PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Basic Db with glassfish-resources.xml PaaS Application

    "); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - - DatabaseMetaData dbMetadata = stmt.getConnection().getMetaData(); - String dbUrl = dbMetadata.getURL(); - writer.println("DB URL : " + dbUrl + "\n"); - if (dbUrl.indexOf("foobar") == -1) { - throw new Exception("Custom Database [foobar] is not created while provisioning."); - } - - - ResultSet rs = stmt.executeQuery("SELECT c_id, c_name from coffee"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "Data retrieved from table \"coffee\"" + "
    " + "Coffee ID" + "" + "Coffee Name" + "
    " + rs.getObject(1) + "" + rs.getObject(2) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - } - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 15922a2cbdc..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/init.sql b/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/init.sql deleted file mode 100644 index 75944ed21a0..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/init.sql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE coffee ( - c_id integer not null, - c_name char(16) -); - -INSERT INTO coffee VALUES(1, 'cuppa'); -INSERT INTO coffee VALUES(2, 'choco'); -INSERT INTO coffee VALUES(3, 'mocha'); -INSERT INTO coffee VALUES(4, 'java'); -INSERT INTO coffee VALUES(5, 'frappe'); diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/payara-resources.xml b/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/payara-resources.xml deleted file mode 100644 index d001d16fa8a..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/payara-resources.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 0ef043fe516..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - CoffeeServlet - org.glassfish.tests.paas.basicdbwithresourcesxml.CoffeeServlet - - - CoffeeServlet - /CoffeeServlet - - - - 30 - - - - java:app/jdbc/CoffeeRes - javax.sql.DataSource - - diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/images/Coffee.jpg b/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/images/Coffee.jpg deleted file mode 100644 index 8e5cb9f3251414798ddde34b8d0d3fc365e05f62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46270 zcmcG$b#NTd(k(b*h7mK2$YN$@W@ZM9Sr#)hlVve8vnlK-O# z{(1RNKL7|1@dV)r1pxv;0wJJ)5PyaNga8NtB-G!p{eLb5L^yaP7}&oz<=uwI7DbzC;$uq3K|v;5*`}?3kL!d7ZC%9M?gVIMWeHd&&{L#C8M00jorp0tD=47 zgj3VqlS@WjD{72GT;uO#M1L3gXQlsPDOfltXc%}1$iH_bfB;AcXh;Ys$bS}qg@XV< zKtchaVSpIqu$UlLI8iJLHZfIAQ*0bcc8+u|H8b~=g+*L(376z1_2AT!=J_R!KN|pK zsK09fp@0Bk!1qBA)u*UvIS@!KDk`n$e;!1{uY2@vDDC)mT{GwYp0%*@Ph8Ggy8N^@ z=hbgodSnCY19A_P8pB&Q?mjVo zdMr5t-LFth$rOFv2Xz-dLxh28xj%ou>eiKBB*ptDhqx2y>eQ$dQivY8EB>1F*O;s^ zOleNQ8WLch;tj>wPozBb^E#{vRxi4L6E>av*{5P)OgnNH%1bi#Y)xWH=!!6zq`Vz6y67a;5&^9V4K|rIbC`ab}Sy-B4mkI0*(8QnJ2T-D*^u%TwDDk7%s%V90awKwPD1#jCcnhD1` z7NRGhHa#UP{FJltj9)PgODG|-3V7H#VP5ShYOk@uyxtp~RU#lwHft zg938$E>;;RQu;eXr+eGt-m;so*0>8IrQh4X^!ga^ZI@AjMo3?~gRhIb+ro|wv$ZZr z-)(GwkiLuElKt0KR4kxF zDnBk9Cqi_sQYlls+~}|5mL4zVYL&_X-x-o}`TFQ;Er~lyDjf3BU^oo;4#8X5#b|{q zv(|0&Y&!El0KaTB-a1|L*!$QA?Fs8qPIr8>_O{lP6N~to?~w@`ltjMj7fRyp^Odkg zUY*KtjmfFFLA=!KS{eJt*Zd9;4f6pY`D}xTv)~YvgcT`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!%$2S4#g{RVKu>1(;J$-W2uZDr?%>RMSiFP++ql0Et_lJcLq-Urb&|R0E^0qbW)GvM zch9W)!x|fk*hzvHtDpo;{;eaI|!L zfRJmm>aIb*uj|y%@5APQefY!i9b;Zx$`87Ko?Q6B-zO)*NR?Qvzx|V9@1WYcste+u z!G|n^X5KBbTG`@Jk=Lnzo8HzF%<7M@+%XYcM95w^WUZ;CgJFb5J zL|r|O3+*bO$v2zF9&ge%ao5nZAh!!?F#aR>9k~6Yqx&QH-Ms&+qx&QHbwT-e!SA#{ zdXrJjKS1v#f0RN)$?F`k`t%6cvHk>OA{CPY4&T|UBZ359;%IH zG5V#_S9Mvti5U(Ao6`iLtFNY>f0lHf`j(l(kp2B>-R<#Ni(#;4=T(p{*aE(4n0(%m zTs<$Yao_5VOiH6B&o%%t=HAyIspD6oVX&e0*2DRZlr}0u-E`-(d3999)Y(NHti7?u z1`eBTU6OP3I=@D-bnMk;>v&7meiyby{A?V*p&l8JbalBQsOvO!A{}$wcqP<0iiNPT zpV`Gz#yHPwmR{%G^6R%ux(8uo+(k<%P9EQQjtDl%-cO)9XaSH9UskTQ>hsHDtqH=e z0>gtPZRt}!w3MW#$ST{sx78M`gp_Qy`{{?NVy-%0zB2Mv(XVGrq+zPV;X@Zn_)9O% zQM9rnggfO%-%{OgjePhLpc$=a0~wyj*3;8pbdcmV=zF1h!2h^e6p@g}qTpd^j$p3l z{=8!p%sF}LR9*cG`oobi?VYU10)!%3R%{RuT`2Jt;0`Z$Ha)n}FX7{{a(6 B(aQh; diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/index.html b/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/index.html deleted file mode 100644 index 64e5c571f8a..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the Basic DB with glassfish-resources.xml PaaS sample.

    -

    Deployed servlets:

    -

    CoffeeServlet

    - - diff --git a/appserver/tests/paas/basic-db-with-resources-xml/src/test/java/org/glassfish/tests/paas/basicdbwithresourcesxml/CoffeeTest.java b/appserver/tests/paas/basic-db-with-resources-xml/src/test/java/org/glassfish/tests/paas/basicdbwithresourcesxml/CoffeeTest.java deleted file mode 100644 index 206d919ae3a..00000000000 --- a/appserver/tests/paas/basic-db-with-resources-xml/src/test/java/org/glassfish/tests/paas/basicdbwithresourcesxml/CoffeeTest.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicdbwithresourcesxml; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class CoffeeTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/basic_db_with_resources_xml.war"); - // TODO :: use mvn apis to get the archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - - //2.1. Create the shared DB service - CommandResult createSharedServiceResult = commandRunner.run( - "create-shared-service", "--characteristics", "service-type=Database", - "--configuration", "database.name=foobar", "--servicetype", - "Database", "coffee-service"); - System.out.println("\ncreate-shared-service command output [ " + - createSharedServiceResult.getOutput() + "]"); - - //2.2. List services to check for the shared service - CommandResult listSharedServicesResult = commandRunner.run( - "list-services", "--scope", "shared", "--output", "service-name, state"); - System.out.println("\nlist-services command output [ " - + listSharedServicesResult.getOutput() + "]"); - - //2.3. Deploy app - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic_db_with_resources_xml/CoffeeServlet", - "Coffee ID"); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - System.out.println("Destroying the resources created"); - //4.1. Delete Shared DB Service. - CommandResult deleteResult = commandRunner.run( - "delete-shared-service", "coffee-service"); - System.out.println("\ndelete-shared-service command output [" + - deleteResult.getOutput() + "]"); - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/basic-db/README.txt b/appserver/tests/paas/basic-db/README.txt deleted file mode 100644 index ff3b1649223..00000000000 --- a/appserver/tests/paas/basic-db/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This is a Basic PaaS application to test JavaDB database. The test displays some values from a system table in JavaDB database. - -Please refer ../README.txt for more generic guidelines on how to run this test. diff --git a/appserver/tests/paas/basic-db/pom.xml b/appserver/tests/paas/basic-db/pom.xml deleted file mode 100644 index 50eb7dfdc6e..00000000000 --- a/appserver/tests/paas/basic-db/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic-db - 4.1-SNAPSHOT - Basic PaaS sample - war - - basic_db_paas_sample - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/basic-db/src/main/java/org/glassfish/tests/paas/basicdb/BasicDBPaaSServlet.java b/appserver/tests/paas/basic-db/src/main/java/org/glassfish/tests/paas/basicdb/BasicDBPaaSServlet.java deleted file mode 100644 index 41c57e16603..00000000000 --- a/appserver/tests/paas/basic-db/src/main/java/org/glassfish/tests/paas/basicdb/BasicDBPaaSServlet.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicdb; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class BasicDBPaaSServlet extends HttpServlet { - - @Resource(mappedName = "jdbc/__basic_db_paas_sample") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Basic DB PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Basic DB PaaS Application

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - ResultSet rs = stmt.executeQuery("SELECT TABLENAME from sys.systables"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "List of Tables in Database" + "
    " + " " + "" + rs.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 2b7254b6a5e..00000000000 --- a/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index e7605c7bf37..00000000000 --- a/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - jdbc/__basic_db_paas_sample - jdbc/__basic_db_paas_sample - - diff --git a/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index adbb41e4b6e..00000000000 --- a/appserver/tests/paas/basic-db/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - BasicDBPaaSServlet - org.glassfish.tests.paas.basicdb.BasicDBPaaSServlet - - - BasicDBPaaSServlet - /BasicDBPaaSServlet - - - - 30 - - - - jdbc/__basic_db_paas_sample - javax.sql.DataSource - - - diff --git a/appserver/tests/paas/basic-db/src/main/webapp/index.html b/appserver/tests/paas/basic-db/src/main/webapp/index.html deleted file mode 100644 index 2d0374b117e..00000000000 --- a/appserver/tests/paas/basic-db/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the basic DB PaaS sample.

    -

    Deployed servlets:

    -

    BasicDBPaaSServlet

    - - diff --git a/appserver/tests/paas/basic-db/src/test/java/org/glassfish/tests/paas/basicdb/BasicDBPaaSTest.java b/appserver/tests/paas/basic-db/src/test/java/org/glassfish/tests/paas/basicdb/BasicDBPaaSTest.java deleted file mode 100644 index 6bcee14c12d..00000000000 --- a/appserver/tests/paas/basic-db/src/test/java/org/glassfish/tests/paas/basicdb/BasicDBPaaSTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicdb; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class BasicDBPaaSTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/basic_db_paas_sample.war"); // TODO :: use mvn apis - // to get the archive - // location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - /** - * Look for a table entry by name SYSFILES in the output to ensure - * DB is provisioned - * - */ - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic_db_paas_sample/BasicDBPaaSServlet", "SYSFILES"); - // 4. Undeploy the PaaS-DB application using undeploy. - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - -} diff --git a/appserver/tests/paas/basic-jpa/README.txt b/appserver/tests/paas/basic-jpa/README.txt deleted file mode 100644 index 9764c5490c5..00000000000 --- a/appserver/tests/paas/basic-jpa/README.txt +++ /dev/null @@ -1,45 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -1. This is a simple PaaS test for JPA with Oracle/JavaDB/MySQL database. This test creates a table ZOO_DIRECTORY which displays the a list of animals when called from the servlet. - -2. The context root for this application is "/basic-jpa" - -3. Follow the general guidelines for running PaaS tests provided at ../README.txt diff --git a/appserver/tests/paas/basic-jpa/pom.xml b/appserver/tests/paas/basic-jpa/pom.xml deleted file mode 100644 index afc1d664bc7..00000000000 --- a/appserver/tests/paas/basic-jpa/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic-jpa - 4.1-SNAPSHOT - Basic JPA PaaS sample - war - - basic-jpa - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - jakarta.persistence - jakarta.persistence-api - 2.2.2 - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - jakarta.transaction - jta - 1.1 - - - diff --git a/appserver/tests/paas/basic-jpa/src/main/java/org/glassfish/tests/paas/basicjpa/Animal.java b/appserver/tests/paas/basic-jpa/src/main/java/org/glassfish/tests/paas/basicjpa/Animal.java deleted file mode 100644 index c4b90766251..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/java/org/glassfish/tests/paas/basicjpa/Animal.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicjpa; - -import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; - - - -/** - * - * @author ishan.vishnoi@java.net - */ -@Entity -@Table(name = "ZOO_DIRECTORY") -public class Animal implements Serializable { - - @Id - private int ID; - - private String name; - - private String species; - - private String cageNumber; - - private String yearOfBirth; - - public int getID() { - return ID; - } - - public void setID(int ID) { - this.ID = ID; - } - - public String getCageNumber() { - return cageNumber; - } - - public void setCageNumber(String cageNumber) { - this.cageNumber = cageNumber; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getSpecies() { - return species; - } - - public void setSpecies(String species) { - this.species = species; - } - - public String getYearOfBirth() { - return yearOfBirth; - } - - public void setYearOfBirth(String yearOfBirth) { - this.yearOfBirth = yearOfBirth; - } - - @Override - public String toString() { - return "entity.NewEntity[id=" + ID + "]"; - } - -} diff --git a/appserver/tests/paas/basic-jpa/src/main/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSServlet.java b/appserver/tests/paas/basic-jpa/src/main/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSServlet.java deleted file mode 100644 index 5ce4dd8e90b..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSServlet.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.paas.basicjpa; - -import java.io.IOException; -import java.io.PrintWriter; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceUnit; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.Iterator; -//import javax.management.*; -import static javax.persistence.CascadeType.ALL; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.Id; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.Temporal; -import static javax.persistence.TemporalType.TIMESTAMP; -import javax.persistence.Transient; -import javax.persistence.EntityManager; - -import javax.persistence.EntityManagerFactory; - -import javax.persistence.EntityTransaction; - -import javax.persistence.Persistence; - - - - -import java.util.Iterator; - -import java.util.List; -import javax.annotation.Resource; -import javax.persistence.Query; -import javax.transaction.UserTransaction; - -/** - * - * @author ishan.vishnoi@java.net - */ -public class BasicJPAPaaSServlet extends HttpServlet { - - @PersistenceUnit(unitName = "BasicJPAPU") - private EntityManagerFactory emf; - @Resource - UserTransaction utx; - - /** - * Processes requests for both HTTP GET and POST methods. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws IOException if an I/O error occurs - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/html;charset=UTF-8"); - PrintWriter out = response.getWriter(); - Animal firstAnimal = new Animal(); - firstAnimal.setName("Shera"); - firstAnimal.setCageNumber("A1"); - firstAnimal.setID(1); - firstAnimal.setSpecies("Lion"); - firstAnimal.setYearOfBirth("2001"); - Boolean x = addAnimal(firstAnimal); - Animal secondAnimal = new Animal(); - secondAnimal.setName("Bhola"); - secondAnimal.setCageNumber("A2"); - secondAnimal.setID(2); - secondAnimal.setSpecies("Bear"); - secondAnimal.setYearOfBirth("2004"); - x = addAnimal(secondAnimal); - Animal thirdAnimal = new Animal(); - thirdAnimal.setName("Ringa"); - thirdAnimal.setCageNumber("A3"); - thirdAnimal.setID(3); - thirdAnimal.setSpecies("Rhino"); - thirdAnimal.setYearOfBirth("2007"); - x = addAnimal(thirdAnimal); - - try { - out.println(""); - out.println(""); - out.println(""); - out.println("Servlet NewServlet"); - out.println(""); - out.println(""); - out.println("Here is a list of animals in the zoo."); - - List dir = sortByName(); - Iterator dirIterator = dir.iterator(); - out.println(""); - - while (dirIterator.hasNext()) { - out.println(""); - Animal animal = (Animal) dirIterator.next(); - - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - } - - out.println("
    id:" + animal.getID() + " name:" + animal.getName() + " species:" + animal.getSpecies() + " cage_number:" + animal.getCageNumber() + " year_of_birth:" + animal.getYearOfBirth() + "
    "); - - out.println("
    Back"); - out.println(""); - out.println(""); - } finally { - out.close(); - } - } - - public List sortByName() { - EntityManager em = emf.createEntityManager(); - Query q = em.createQuery("SELECT x FROM Animal x order by x.name"); - List results = q.getResultList(); - return (results); - } - - public boolean addAnimal(Animal animal) { - EntityManager em = emf.createEntityManager(); - try { - utx.begin(); - em.persist(animal); - utx.commit(); - } finally { - em.close(); - return false; - } - } - - // - /** - * Handles the HTTP GET method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws IOException if an I/O error occurs - */ - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws IOException if an I/O error occurs - */ - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Returns a short description of the servlet. - * @return a String containing servlet description - */ - @Override - public String getServletInfo() { - return "Short description"; - }// -} diff --git a/appserver/tests/paas/basic-jpa/src/main/webapp/META-INF/MANIFEST.MF b/appserver/tests/paas/basic-jpa/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce4a2..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml b/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml deleted file mode 100644 index bec779448b0..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - org.eclipse.persistence.jpa.PersistenceProvider - jdbc/__basic_jpa_paas_sample - - - - - diff --git a/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index c46dd2c7926..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index fe7bef6fc17..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 20ad1423aec..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - javax.faces.PROJECT_STAGE - Development - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - list - org.glassfish.tests.paas.basicjpa.BasicJPAPaaSServlet - - - Faces Servlet - /faces/* - - - list - /list - - - - 30 - - - - index.jsp - - diff --git a/appserver/tests/paas/basic-jpa/src/main/webapp/index.jsp b/appserver/tests/paas/basic-jpa/src/main/webapp/index.jsp deleted file mode 100644 index dd587c081d4..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/webapp/index.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%-- - Document : index - Created on : Nov 8, 2011, 4:59:56 PM - Author : ishan ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - - - - - - - Zoo Directory - - -

    Zoo Directory

    - Get a sorted list of all animals and their details -
    - - diff --git a/appserver/tests/paas/basic-jpa/src/main/webapp/newcss.css b/appserver/tests/paas/basic-jpa/src/main/webapp/newcss.css deleted file mode 100644 index d4450236359..00000000000 --- a/appserver/tests/paas/basic-jpa/src/main/webapp/newcss.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - Document : newcss - Created on : 9 Nov, 2011, 3:26:45 PM - Author : ishan - Description: - Purpose of the stylesheet follows. -*/ - -body { - background-color: #ffffff; - font-size: 12px; - font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - color: #000000; - margin: 10px; -} - -h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - border-bottom: 1px solid #AFAFAF; - font-size: 16px; - font-weight: bold; - margin: 0px; - padding: 0px; - color: #D20005; -} - -a:link, a:visited { - color: #045491; - font-weight : bold; - text-decoration: none; -} - -a:link:hover, a:visited:hover { - color: #045491; - font-weight : bold; - text-decoration : underline; -} - -th { - font-weight: bold; - text-align: center; -} - -td { - text-align: center; -} - diff --git a/appserver/tests/paas/basic-jpa/src/test/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSTest.java b/appserver/tests/paas/basic-jpa/src/test/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSTest.java deleted file mode 100644 index 40f6cfd9443..00000000000 --- a/appserver/tests/paas/basic-jpa/src/test/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSTest.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicjpa; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author ishan.vishnoi@java.net - */ - -public class BasicJPAPaaSTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. - File archive = new File(System.getProperty("basedir") - + "/target/basic-jpa.war"); // TODO :: use mvn apis to get the - // archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS-basic-jpa app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic-jpa/list","Here is a list of animals in the zoo."); - - // 4. Undeploy the Zoo catalogue application . - - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - -} diff --git a/appserver/tests/paas/basic-service-discovery/README.txt b/appserver/tests/paas/basic-service-discovery/README.txt deleted file mode 100644 index b1bc67f396c..00000000000 --- a/appserver/tests/paas/basic-service-discovery/README.txt +++ /dev/null @@ -1,48 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -1. This is a simple PaaS test for testing the following three CLIs - i. _get-service-description - ii. _get-service-metadata - iii._generate-glassfish-services-deployment-plan - -2. The context root for this application is "/basic_sd_paas_sample" - -3. Follow the general guidelines for running PaaS tests provided at ../README.txt diff --git a/appserver/tests/paas/basic-service-discovery/pom.xml b/appserver/tests/paas/basic-service-discovery/pom.xml deleted file mode 100644 index 13863f46df8..00000000000 --- a/appserver/tests/paas/basic-service-discovery/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic-sd - 4.1-SNAPSHOT - Basic Service Discovery PaaS sample - war - - basic_sd_paas_sample - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/basic-service-discovery/src/main/java/org/glassfish/tests/paas/basicsd/BasicSDPaaSServlet.java b/appserver/tests/paas/basic-service-discovery/src/main/java/org/glassfish/tests/paas/basicsd/BasicSDPaaSServlet.java deleted file mode 100644 index bf578817af0..00000000000 --- a/appserver/tests/paas/basic-service-discovery/src/main/java/org/glassfish/tests/paas/basicsd/BasicSDPaaSServlet.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicsd; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class BasicSDPaaSServlet extends HttpServlet { - - @Resource(mappedName = "jdbc/__basic_sd_paas_sample") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Basic DB PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Basic DB PaaS Application

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - ResultSet rs = stmt.executeQuery("SELECT TABLENAME from sys.systables"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "List of Tables in Database" + "
    " + " " + "" + rs.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 53b54f0b8c3..00000000000 --- a/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index dfd0d42859f..00000000000 --- a/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - jdbc/__basic_sd_paas_sample - jdbc/__basic_sd_paas_sample - - diff --git a/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 384f0a3b265..00000000000 --- a/appserver/tests/paas/basic-service-discovery/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - BasicSDPaaSServlet - org.glassfish.tests.paas.basicsd.BasicSDPaaSServlet - - - BasicSDPaaSServlet - /BasicSDPaaSServlet - - - - 30 - - - - jdbc/__basic_sd_paas_sample - javax.sql.DataSource - - - diff --git a/appserver/tests/paas/basic-service-discovery/src/main/webapp/index.html b/appserver/tests/paas/basic-service-discovery/src/main/webapp/index.html deleted file mode 100644 index 2d0374b117e..00000000000 --- a/appserver/tests/paas/basic-service-discovery/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the basic DB PaaS sample.

    -

    Deployed servlets:

    -

    BasicDBPaaSServlet

    - - diff --git a/appserver/tests/paas/basic-service-discovery/src/test/java/org/glassfish/tests/paas/basicsd/BasicServiceDiscoveryPaaSTest.java b/appserver/tests/paas/basic-service-discovery/src/test/java/org/glassfish/tests/paas/basicsd/BasicServiceDiscoveryPaaSTest.java deleted file mode 100644 index 81542fc2d30..00000000000 --- a/appserver/tests/paas/basic-service-discovery/src/test/java/org/glassfish/tests/paas/basicsd/BasicServiceDiscoveryPaaSTest.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicsd; - -import junit.framework.Assert; -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.internal.api.Globals; -import org.glassfish.paas.orchestrator.provisioning.util.JSONUtil; -import org.junit.Test; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.List; -import java.util.Map; - -/** - * @author Sandhya Kripalani K - */ - -public class BasicServiceDiscoveryPaaSTest { - - - @Test - public void test() throws Exception { - - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/basic_sd_paas_sample.war"); // TODO :: use mvn apis - // to get the archive - // location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - testGetServiceMetadata(archive); - testGenerateGFDeploymentPlan(archive); - - // 4. Undeploy the PaaS-DB application using undeploy. - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - - //Test for CLI : '_get-service-description'' - private void testGetServiceDescription(String appName, String serviceName) { - - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - - ActionReport report = habitat.getService(ActionReport.class); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("appname", appName); - parameterMap.add("DEFAULT", serviceName); - - boolean testPassed = false; - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("_get-service-description", report); - invocation.parameters(parameterMap).execute(); - - - Map SDMap = (Map) report.getExtraProperties().get("list"); - if (serviceName.equalsIgnoreCase((String) SDMap.get("name"))) { - if ("lazy".equalsIgnoreCase((String) SDMap.get("init-type"))) { - Map serviceCharacteristicsMap = (Map) SDMap.get("characteristics"); - if ("JavaEE".equals(serviceCharacteristicsMap.get("service-type"))) { - Map serviceConfigurationsMap = (Map) SDMap.get("configurations"); - String minclustersize = serviceConfigurationsMap.get("min.clustersize"); - String maxclustersize = serviceConfigurationsMap.get("max.clustersize"); - if (Integer.parseInt(minclustersize) == 1 && Integer.parseInt(maxclustersize) == 2) { - testPassed = true; - } - } - } - } - - System.out.println("CLI 'get-service-description' test passed? :: " + testPassed); - Assert.assertTrue(testPassed); - } - - - //Test for CLI : '_get-service-metadata'' - /* - The war file contains the following service definition and service reference - 1.In glassfish-services.xml - - - - - - - - - - - - - - - - - - - - 2.In web.xml - - jdbc/__basic_db_paas_sample - javax.sql.DataSource - - */ - - private void testGetServiceMetadata(File archive) { - - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("_get-service-metadata", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", System.getProperty("basedir") + "/target/basic_sd_paas_sample.war"); - boolean testPassed = false; - invocation.parameters(parameterMap).execute(); - testPassed=!report.hasFailures(); - - String appName = "basic_sd_paas_sample"; - String serviceName = "basic-sd"; - - testGetServiceDescription(appName, serviceName); - - - List> serviceDescList = (List>) report.getExtraProperties().get("list"); - - Map serviceDescMap = serviceDescList.get(1); - serviceName = (String) serviceDescMap.get("name"); - String init_type = (String) serviceDescMap.get("init-type"); - Map svcCharacteristicMap = (Map) serviceDescMap.get("characteristics"); - String serviceType = (String) svcCharacteristicMap.get("service-type"); - - Map svcConfigurationMap = (Map) serviceDescMap.get("configurations"); - - if (serviceName.equalsIgnoreCase("db-service")) { - if ("lazy".equalsIgnoreCase(init_type)) { - if ("Database".equals(serviceType)) { - Map serviceConfigurationsMap = (Map) serviceDescMap.get("configurations"); - if (serviceConfigurationsMap.containsKey("database.init.sql") && serviceConfigurationsMap.containsKey("database.name")) { - testPassed = true; - } - } - } - } - - System.out.println("CLI 'get-service-metadata' test passed? :: " + testPassed); - Assert.assertTrue(testPassed); - } - - - // Test CLI '_generate-glassfish-services-deployment-plan' - - private void testGenerateGFDeploymentPlan(File archive) { - - //Execute the '_get-service-metadata' command and obtain the SDs. Change the configuration of one of the SD. - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("_get-service-metadata", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", System.getProperty("basedir") + "/target/basic_sd_paas_sample.war"); - boolean testPassed = false; - invocation.parameters(parameterMap).execute(); - - String newDBname = "UserDB"; - String newSQLFilename = "User.sql"; - String DATABASE_NAME_PROP = "database.name"; - String SQL_FILE_PROP = "database.init.sql"; - - List> serviceDescList = (List>) report.getExtraProperties().get("list"); - for (Map serviceDescMap : serviceDescList) { - if ("db-service".equals(serviceDescMap.get("name"))) { - int index = serviceDescList.indexOf(serviceDescMap); - Map configurations = (Map) serviceDescMap.get("configurations"); - configurations.put(DATABASE_NAME_PROP, newDBname); - configurations.put(SQL_FILE_PROP, newSQLFilename); - serviceDescMap.put("configurations", configurations); - break; - } - } - - String modifiedServiceDesc = JSONUtil.javaToJSON(serviceDescList, 10); - //System.out.println("Modified service description:: "+modifiedServiceDesc); - parameterMap = new ParameterMap(); - parameterMap.add("archive", System.getProperty("basedir") + "/target/basic_sd_paas_sample.war"); - parameterMap.add("modifiedServiceDesc", modifiedServiceDesc); - report = habitat.getService(ActionReport.class); - invocation = commandRunner.getCommandInvocation("_generate-glassfish-services-deployment-plan", report); - invocation.parameters(parameterMap).execute(); - - String jarFilePath = (String) report.getExtraProperties().get("deployment-plan-file-path"); - - report = habitat.getService(ActionReport.class); - invocation = commandRunner.getCommandInvocation("undeploy", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "basic_sd_paas_sample"); - invocation.parameters(parameterMap).execute(); - Assert.assertFalse(report.hasFailures()); - - invocation = commandRunner.getCommandInvocation("deploy", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", System.getProperty("basedir") + "/target/basic_sd_paas_sample.war"); - parameterMap.add("deploymentplan", jarFilePath); - invocation.parameters(parameterMap).execute(); - - System.out.println("App deployed with new plan ::" + !report.hasFailures()); - - String appname = "basic_sd_paas_sample"; - String servicename = "db-service"; - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", servicename); - parameterMap.add("appname", appname); - invocation = commandRunner.getCommandInvocation("_get-service-description", report); - invocation.parameters(parameterMap).execute(); - - Map SDMap = (Map) report.getExtraProperties().get("list"); - - Map serviceConfigurationsMap = (Map) SDMap.get("configurations"); - String sql_filename = serviceConfigurationsMap.get(SQL_FILE_PROP); - String db_name = serviceConfigurationsMap.get(DATABASE_NAME_PROP); - if (newSQLFilename.equals(sql_filename) && newDBname.equals(db_name)) { - testPassed = true; - } - - - System.out.println("CLI _generate-glassfish-services-deployment-plan passed " + testPassed); - Assert.assertTrue(testPassed); - - } - - -} diff --git a/appserver/tests/paas/basic-shared-service-test/README.txt b/appserver/tests/paas/basic-shared-service-test/README.txt deleted file mode 100644 index 9ee389fb115..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/README.txt +++ /dev/null @@ -1,52 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -1. This is a simple PaaS Shared Service test.Re-uses the basic-jpa war with a few additions to the glassfish-services.xml -The test creates 2 shared service: 1 for lb and 1 for db. The application references these services. -The test basically aims at the following commands: - i. create-shared-service - ii. delete-shared-service - iii. start-shared-service - iv.stop-shared-service - This test creates a table ZOO_DIRECTORY which displays the a list of animals when called from the servlet. - -2. The context root for this application is "/basic-shared-service-test" - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/basic-shared-service-test/pom.xml b/appserver/tests/paas/basic-shared-service-test/pom.xml deleted file mode 100644 index d21fe0c86fc..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic-shared-service-test - 4.1-SNAPSHOT - Basic Shared Sevice Test - war - - basic-shared-service-test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - jakarta.persistence - jakarta.persistence-api - 2.2.2 - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - jakarta.transaction - jta - 1.1 - - - diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/java/org/glassfish/tests/paas/basicjpa/Animal.java b/appserver/tests/paas/basic-shared-service-test/src/main/java/org/glassfish/tests/paas/basicjpa/Animal.java deleted file mode 100644 index 6c74519e589..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/java/org/glassfish/tests/paas/basicjpa/Animal.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicjpa; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import java.io.Serializable; - - -/** - * - * @author ishan.vishnoi@java.net - */ -@Entity -@Table(name = "ZOO_DIRECTORY") -public class Animal implements Serializable { - - @Id - private int ID; - - private String name; - - private String species; - - private String cageNumber; - - private String yearOfBirth; - - public int getID() { - return ID; - } - - public void setID(int ID) { - this.ID = ID; - } - - public String getCageNumber() { - return cageNumber; - } - - public void setCageNumber(String cageNumber) { - this.cageNumber = cageNumber; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getSpecies() { - return species; - } - - public void setSpecies(String species) { - this.species = species; - } - - public String getYearOfBirth() { - return yearOfBirth; - } - - public void setYearOfBirth(String yearOfBirth) { - this.yearOfBirth = yearOfBirth; - } - - @Override - public String toString() { - return "entity.NewEntity[id=" + ID + "]"; - } - -} diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSServlet.java b/appserver/tests/paas/basic-shared-service-test/src/main/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSServlet.java deleted file mode 100644 index e793e2614bd..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/java/org/glassfish/tests/paas/basicjpa/BasicJPAPaaSServlet.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.paas.basicjpa; - -import javax.annotation.Resource; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceUnit; -import javax.persistence.Query; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.transaction.UserTransaction; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Iterator; -import java.util.List; - -//import javax.management.*; - -/** - * - * @author ishan.vishnoi@java.net - */ -public class BasicJPAPaaSServlet extends HttpServlet { - - @PersistenceUnit(unitName = "BasicJPAPU") - private EntityManagerFactory emf; - @Resource - UserTransaction utx; - - /** - * Processes requests for both HTTP GET and POST methods. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/html;charset=UTF-8"); - PrintWriter out = response.getWriter(); - Animal firstAnimal = new Animal(); - firstAnimal.setName("Shera"); - firstAnimal.setCageNumber("A1"); - firstAnimal.setID(1); - firstAnimal.setSpecies("Lion"); - firstAnimal.setYearOfBirth("2001"); - Boolean x = addAnimal(firstAnimal); - Animal secondAnimal = new Animal(); - secondAnimal.setName("Bhola"); - secondAnimal.setCageNumber("A2"); - secondAnimal.setID(2); - secondAnimal.setSpecies("Bear"); - secondAnimal.setYearOfBirth("2004"); - x = addAnimal(secondAnimal); - Animal thirdAnimal = new Animal(); - thirdAnimal.setName("Ringa"); - thirdAnimal.setCageNumber("A3"); - thirdAnimal.setID(3); - thirdAnimal.setSpecies("Rhino"); - thirdAnimal.setYearOfBirth("2007"); - x = addAnimal(thirdAnimal); - - try { - out.println(""); - out.println(""); - out.println(""); - out.println("Servlet NewServlet"); - out.println(""); - out.println(""); - out.println("Here is a list of animals in the zoo."); - - List dir = sortByName(); - Iterator dirIterator = dir.iterator(); - out.println(""); - - while (dirIterator.hasNext()) { - out.println(""); - Animal animal = (Animal) dirIterator.next(); - - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - } - - out.println("
    id:" + animal.getID() + " name:" + animal.getName() + " species:" + animal.getSpecies() + " cage_number:" + animal.getCageNumber() + " year_of_birth:" + animal.getYearOfBirth() + "
    "); - - out.println("
    Back"); - out.println(""); - out.println(""); - } finally { - out.close(); - } - } - - public List sortByName() { - EntityManager em = emf.createEntityManager(); - Query q = em.createQuery("SELECT x FROM Animal x order by x.name"); - List results = q.getResultList(); - return (results); - } - - public boolean addAnimal(Animal animal) { - EntityManager em = emf.createEntityManager(); - try { - utx.begin(); - em.persist(animal); - utx.commit(); - } finally { - em.close(); - return false; - } - } - - // - /** - * Handles the HTTP GET method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Returns a short description of the servlet. - * @return a String containing servlet description - */ - @Override - public String getServletInfo() { - return "Short description"; - }// -} diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/META-INF/MANIFEST.MF b/appserver/tests/paas/basic-shared-service-test/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce4a2..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml b/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml deleted file mode 100644 index 5b0689db422..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - org.eclipse.persistence.jpa.PersistenceProvider - jdbc/__basic_shared_service_paas_sample - - - - - diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index d6a282b0f36..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index fe7bef6fc17..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 20ad1423aec..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - javax.faces.PROJECT_STAGE - Development - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - list - org.glassfish.tests.paas.basicjpa.BasicJPAPaaSServlet - - - Faces Servlet - /faces/* - - - list - /list - - - - 30 - - - - index.jsp - - diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/index.jsp b/appserver/tests/paas/basic-shared-service-test/src/main/webapp/index.jsp deleted file mode 100644 index dd587c081d4..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/index.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%-- - Document : index - Created on : Nov 8, 2011, 4:59:56 PM - Author : ishan ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - - - - - - - Zoo Directory - - -

    Zoo Directory

    - Get a sorted list of all animals and their details -
    - - diff --git a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/newcss.css b/appserver/tests/paas/basic-shared-service-test/src/main/webapp/newcss.css deleted file mode 100644 index d4450236359..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/main/webapp/newcss.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - Document : newcss - Created on : 9 Nov, 2011, 3:26:45 PM - Author : ishan - Description: - Purpose of the stylesheet follows. -*/ - -body { - background-color: #ffffff; - font-size: 12px; - font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - color: #000000; - margin: 10px; -} - -h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - border-bottom: 1px solid #AFAFAF; - font-size: 16px; - font-weight: bold; - margin: 0px; - padding: 0px; - color: #D20005; -} - -a:link, a:visited { - color: #045491; - font-weight : bold; - text-decoration: none; -} - -a:link:hover, a:visited:hover { - color: #045491; - font-weight : bold; - text-decoration : underline; -} - -th { - font-weight: bold; - text-align: center; -} - -td { - text-align: center; -} - diff --git a/appserver/tests/paas/basic-shared-service-test/src/test/java/org/glassfish/tests/paas/basicjpa/BasicSharedServiceTest.java b/appserver/tests/paas/basic-shared-service-test/src/test/java/org/glassfish/tests/paas/basicjpa/BasicSharedServiceTest.java deleted file mode 100644 index 1bed2f7707c..00000000000 --- a/appserver/tests/paas/basic-shared-service-test/src/test/java/org/glassfish/tests/paas/basicjpa/BasicSharedServiceTest.java +++ /dev/null @@ -1,500 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basicjpa; - -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.internal.api.Globals; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Assert; -import org.junit.Test; -import org.glassfish.hk2.api.ServiceLocator; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Sandhya Kripalani - */ - -public class BasicSharedServiceTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. - File archive = new File(System.getProperty("basedir") - + "/target/basic-shared-service-test.war"); // TODO :: use mvn apis to get the - // archive location. - org.junit.Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - - //Create the shared services first, as these services will be referenced by the application - createSharedServices(); - - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS-basic-shared-service-test app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic-shared-service-test/list", "Here is a list of animals in the zoo."); - - testSharedService(); - - // 4. Access the app to make sure PaaS-basic-shared-service-test app is correctly - // provisioned after running Shared-Services test - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic-shared-service-test/list", "Here is a list of animals in the zoo."); - - // 5. Undeploy the Zoo catalogue application . - - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - deleteSharedService(); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - System.out.println(commandResult.getOutput().toString()); - if (commandResult.getOutput().contains("Nothing to list")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - - private void createSharedServices() { - - System.out.println("################### Trying to Create Shared Service #######################"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("create-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("servicetype","JavaEE"); - parameterMap.add("characteristics","service-type=JavaEE"); - parameterMap.add("configuration","min.clustersize=2:max.clustersize=4"); - parameterMap.add("DEFAULT","my-shared-gf-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-gf-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - - //Create shared service of type Database - // asadmin create-shared-service --characteristics service-type=Database --configuration database.name=my-shared-db-service --servicetype Database my-shared-db-service - parameterMap=new ParameterMap(); - parameterMap.add("servicetype", "Database"); - parameterMap.add("characteristics", "service-type=Database"); - parameterMap.add("configuration", "database.name=my-shared-db-service"); - parameterMap.add("DEFAULT", "my-shared-db-service"); - - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-db-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - // Create shared service of type LB - //asadmin create-shared-service --characteristics service-type=LB --configuration http-port=50080:https-port=50081:ssl-enabled=true --servicetype LB my-shared-lb-service - parameterMap = new ParameterMap(); - parameterMap.add("servicetype", "LB"); - parameterMap.add("characteristics", "service-type=LB"); - parameterMap.add("configuration", "http-port=50080:https-port=50081:ssl-enabled=true"); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-lb-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - //List the services and check the status of both the services - it should be 'RUNNING' - invocation = commandRunner.getCommandInvocation("list-services", report); - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStarted = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStarted = false; - String state = map.get("STATE"); - if ("RUNNING".equalsIgnoreCase(state)) { - sharedServiceStarted = true; - }else{ - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - - //Try starting an uncreated service. Should fail - - /* parameterMap=new ParameterMap(); - parameterMap.add("DEFAULT","Uncreated-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Started uncreated db shared service"+!report.hasFailures()); - //Assert.assertTrue(report.hasFailures());*/ - - } - - private void testSharedService() { - - System.out.println("$$$$$$$$$$$$$ TEST SHARED SERVICES $$$$$$$$$$$$$$$"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - //Try stopping a shared service, referenced by the app. Should 'FAIL' - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("stop-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.print("Expected Failure message: " + report.getMessage()); - Assert.assertTrue(report.hasFailures()); - - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - System.out.print("Expected Failure message: " + report.getMessage()); - Assert.assertTrue(report.hasFailures()); - - - //Try deleting a shared service, referenced by the app. Should 'FAIL' - report = habitat.getService(ActionReport.class); - invocation = commandRunner.getCommandInvocation("delete-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.print("Expected Failure message: " + report.getMessage()); - Assert.assertTrue(report.hasFailures()); - - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Expected Failure message: " + report.getMessage()); - Assert.assertTrue(report.hasFailures()); - - - - //List the services and check the status of both the services - it should be 'RUNNING' - invocation = commandRunner.getCommandInvocation("list-services", report); - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStarted = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStarted = false; - String state = map.get("STATE"); - if ("RUNNING".equalsIgnoreCase(state)) { - sharedServiceStarted = true; - }else{ - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - - /* //Disable the application and try stopping the shared service. Command should succeed - invocation = commandRunner.getCommandInvocation("disable", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","basic-shared-service-test"); - invocation.parameters(parameterMap).execute(); - - System.out.print("Disabled application basic-shared-service-test: "+!report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - - invocation = commandRunner.getCommandInvocation("stop-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.print("MSG: "+report.getMessage()); - - invocation = commandRunner.getCommandInvocation("stop-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","my-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.print("MSG: "+report.getMessage()); - - //List the services and check the status of both the services - it should be 'STOPPED' - parameterMap=new ParameterMap(); - parameterMap.add("scope","shared"); - parameterMap.add("output","service-name,state"); - invocation=commandRunner.getCommandInvocation("list-services",report); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStopped=false; - list = (List>) report.getExtraProperties().get("list"); - for(Map map:list){ - sharedServiceStopped=false; - String state=map.get("STATE"); - if("STOPPED".equalsIgnoreCase(state)){ - sharedServiceStopped=true; - }else{ - sharedServiceStopped = false; - break; - } - } - Assert.assertTrue(sharedServiceStopped);//check if the shared services are stopped - - // Start the shared services. - invocation = commandRunner.getCommandInvocation("start-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.print("MSG: "+report.getMessage()); - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","my-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.print("MSG: "+report.getMessage()); - - //List the services and check the status of both the services - it should be 'STARTED' - parameterMap=new ParameterMap(); - parameterMap.add("scope","shared"); - parameterMap.add("output","service-name,state"); - invocation=commandRunner.getCommandInvocation("list-services",report); - invocation.parameters(parameterMap).execute(); - - sharedServiceStarted=false; - list = (List>) report.getExtraProperties().get("list"); - for(Map map:list){ - sharedServiceStopped=false; - String state=map.get("STATE"); - if("STARTED".equalsIgnoreCase(state) || "RUNNING".equalsIgnoreCase(state) ){ - sharedServiceStarted=true; - }else{ - sharedServiceStarted = false; - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - - //Enable the application and try stopping accessing - invocation = commandRunner.getCommandInvocation("enable", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","basic-shared-service-test"); - invocation.parameters(parameterMap).execute(); - - System.out.print("Enabled application basic-shared-service-test: "+!report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - -*/ - /* - - - invocation = commandRunner.getCommandInvocation("delete-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","my-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.print("MSG: "+report.getMessage()); - - - - invocation = commandRunner.getCommandInvocation("delete-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","my-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.print("MSG: "+report.getMessage());*/ - - } - - private void deleteSharedService() { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - //Try stopping a shared service, referenced by the app. Should 'FAIL' - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("delete-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-gf-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - } - -} diff --git a/appserver/tests/paas/basic/README.txt b/appserver/tests/paas/basic/README.txt deleted file mode 100644 index 4351ff1846c..00000000000 --- a/appserver/tests/paas/basic/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -Basic PaaS application that runs across all virtualization environments. - -Please refer ../README.txt for details on configuration of virtualization environments and how to execute individual test. diff --git a/appserver/tests/paas/basic/native_setup.sh b/appserver/tests/paas/basic/native_setup.sh deleted file mode 100755 index 9e322882c65..00000000000 --- a/appserver/tests/paas/basic/native_setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# -GF_HOME=${GF_HOME:-$S1AS_HOME} -echo "Your GlassFish is at $GF_HOME" -$GF_HOME/bin/asadmin start-domain --debug -$GF_HOME/bin/asadmin create-ims-config-native -#$GF_HOME/bin/asadmin create-server-pool --virtualization Native --subnet 192.168.1.102/250 --portName "br0" Native -$GF_HOME/bin/asadmin stop-domain -#$GF_HOME/bin/asadmin create-template --indexes ServiceType=JavaEE,VirtualizationType=Native Native -#$GF_HOME/bin/asadmin create-template --indexes ServiceType=Database,VirtualizationType=Native DBNative diff --git a/appserver/tests/paas/basic/pom.xml b/appserver/tests/paas/basic/pom.xml deleted file mode 100644 index 6c6ab488882..00000000000 --- a/appserver/tests/paas/basic/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic - 4.1-SNAPSHOT - Basic PaaS sample - war - - basic_paas_sample - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/basic/src/main/java/org/glassfish/tests/paas/basic/BasicPaaSServlet.java b/appserver/tests/paas/basic/src/main/java/org/glassfish/tests/paas/basic/BasicPaaSServlet.java deleted file mode 100644 index f26ef6781c9..00000000000 --- a/appserver/tests/paas/basic/src/main/java/org/glassfish/tests/paas/basic/BasicPaaSServlet.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basic; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Enumeration; - - -public final class BasicPaaSServlet extends HttpServlet { - - // @Resource(mappedName = "jdbc/__basic_paas_sample") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Simple Servlet"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Simple Servlet

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - ResultSet rs = stmt.executeQuery("SELECT TABLENAME from sys.systables"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "List of Tables in Database" + "
    " + " " + "" + rs.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/basic/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/basic/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 098cb43aebd..00000000000 --- a/appserver/tests/paas/basic/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/basic/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/basic/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index f54c555e83f..00000000000 --- a/appserver/tests/paas/basic/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/basic/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/basic/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 689465fd101..00000000000 --- a/appserver/tests/paas/basic/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - BasicPaaSServlet - org.glassfish.tests.paas.basic.BasicPaaSServlet - - - BasicPaaSServlet - /BasicPaaSServlet - - - - 30 - - - diff --git a/appserver/tests/paas/basic/src/main/webapp/index.html b/appserver/tests/paas/basic/src/main/webapp/index.html deleted file mode 100644 index 247c053283c..00000000000 --- a/appserver/tests/paas/basic/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the basic PaaS sample.

    -

    Deployed servlets:

    -

    BasicPaaSServlet

    - - diff --git a/appserver/tests/paas/basic/src/test/java/org/glassfish/tests/paas/basic/BasicPaaSTest.java b/appserver/tests/paas/basic/src/test/java/org/glassfish/tests/paas/basic/BasicPaaSTest.java deleted file mode 100644 index 781c954cf47..00000000000 --- a/appserver/tests/paas/basic/src/test/java/org/glassfish/tests/paas/basic/BasicPaaSTest.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basic; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.regex.*; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class BasicPaaSTest { - - @Test - public void test() throws Exception { - - // Bootstrap GlassFish DAS in embedded mode. - GlassFish glassfish = bootstrap(); - - // Deploy the PaaS app and verify it. - runTests(glassfish); - - // Re-deploy the PaaS app and verify it. - String testScenarios = System.getProperty("test.scenarios"); - if (testScenarios == null - || "all".contains(testScenarios.toLowerCase())) { - runTests(glassfish); - } - - // 5. Stop the GlassFish DAS - glassfish.dispose(); - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private void runTests(GlassFish glassfish) throws Exception { - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/basic_paas_sample.war"); // TODO :: use mvn apis to - // get the archive location. - Assert.assertTrue(archive.exists()); - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic_paas_sample/BasicPaaSServlet", - "Request headers from the request:"); - - // 4. Undeploy the PaaS application . TODO :: use cloud-undeploy?? - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - - } - } - - } - - private GlassFish bootstrap() throws Exception { - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - return glassfish; - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - -} diff --git a/appserver/tests/paas/bookstore/README.txt b/appserver/tests/paas/bookstore/README.txt deleted file mode 100644 index ba98e03c11b..00000000000 --- a/appserver/tests/paas/bookstore/README.txt +++ /dev/null @@ -1,44 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This is a simple Paas test for Oracle/JavaDB/MySQL Database. The test creates 2 tables DEMO_TABLE and BOOKS_TABLE. DEMO_TABLE is used to update and get the last accessed time of the database. BOOKS_TABLE is used to add more books into the database table and display them as a list in the Servlet. The application also displays the version of the database that is used for the test. - -Please refer ../README.txt for more generic guidelines. - diff --git a/appserver/tests/paas/bookstore/pom.xml b/appserver/tests/paas/bookstore/pom.xml deleted file mode 100644 index dbd61f49d9d..00000000000 --- a/appserver/tests/paas/bookstore/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - bookstore - 4.1-SNAPSHOT - Bookstore PaaS sample - war - - bookstore - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/bookstore/src/main/java/org/glassfish/tests/paas/basic/BookStoreServlet.java b/appserver/tests/paas/bookstore/src/main/java/org/glassfish/tests/paas/basic/BookStoreServlet.java deleted file mode 100644 index c8f34b20516..00000000000 --- a/appserver/tests/paas/bookstore/src/main/java/org/glassfish/tests/paas/basic/BookStoreServlet.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basic; - -import javax.annotation.Resource; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.lang.String; -import java.util.Enumeration; - - -public final class BookStoreServlet extends HttpServlet { - - @Resource(mappedName = "jdbc/__bookstore") - private DataSource ds = null; - private boolean createdTables = false; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void service(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Simple PaaS Enabled BookStore Application"); - writeCSS(writer); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Simple PaaS Enabled BookStore Application

    "); - writer.println("
    "); - - writer.println(""); - writer.println("

    This application is served by " + - getServletContext().getServerInfo() + " [" + - System.getProperty("com.sun.aas.instanceName") + "]

    "); - writer.println("Please wait while accessing the bookstore database....."); - writer.println("
    "); - if (ds != null) { - DatabaseOperations operations = new DatabaseOperations(); - String userName = "World";//System.getenv("USER"); - - operations.createAccessInfoTable(ds, writer); - operations.createBookStoreTable(ds, writer); - operations.updateAccessInfo(ds, userName, writer); - - operations.addBookToTable(ds, request.getParameter("title"), - request.getParameter("authors"), request.getParameter("price")); - operations.printBooksTable(ds, writer); - generateNewBookForm(writer); - - } - - writer.println("

    My Home"); - writer.println("

    Thanks for using Oracle PaaS Solutions

    "); - writer.println(""); - writer.println(""); - - } - - private void writeCSS(PrintWriter out) { - out.println(""); - } - - - private void generateNewBookForm(PrintWriter out) { - out.println("
    "); - out.println("

    Add a new book to the store:"); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println("
    Title:
    Author(s):
    Price:
    "); - out.println("

    "); - } -} - diff --git a/appserver/tests/paas/bookstore/src/main/java/org/glassfish/tests/paas/basic/DatabaseOperations.java b/appserver/tests/paas/bookstore/src/main/java/org/glassfish/tests/paas/basic/DatabaseOperations.java deleted file mode 100644 index ae402ef1b31..00000000000 --- a/appserver/tests/paas/bookstore/src/main/java/org/glassfish/tests/paas/basic/DatabaseOperations.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basic; - -import javax.sql.DataSource; -import java.io.PrintWriter; -import java.sql.*; -import java.util.HashMap; -import java.util.Map; - - -/** - * - * @author Shalini M - */ -public class DatabaseOperations { - - Map resultsMap = new HashMap(); - - public void printDBDetails(DataSource ds, PrintWriter out) { - Connection conn = null; - Statement stmt = null; - try { - out.println("
    "); - - conn = ds.getConnection(); - DatabaseMetaData dmd = conn.getMetaData(); - out.println("Database : " + dmd.getDatabaseProductName() + "
    "); - - } catch (Exception e) { - out.println("Exception : " + e.getMessage() + "
    "); - } finally { - if (stmt != null) { - try { - stmt.close(); - } catch (Exception e1) { - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception e1) { - } - } - } - } - - public void updateAccessInfo(DataSource ds, String userName, PrintWriter out) { - Connection conn = null; - Statement stmt = null; - - String tableName = "DEMO_TABLE"; - try { - out.println("
    "); -// out.println("Trying to establish connection to bookstore database...
    "); - - if(ds != null) { - conn = ds.getConnection(); - DatabaseMetaData dmd = conn.getMetaData(); - - out.println("Successfully established connection to " + dmd.getDatabaseProductName() + " Version : " + dmd.getDatabaseProductVersion()); - -// out.println("Database : " + dmd.getDatabaseProductName() + "
    "); -// out.println("Product Version : " + dmd.getDatabaseProductVersion() + "
    "); -// out.println("
    "); - - stmt = conn.createStatement(); - String query = "Select * from " + tableName + " where Name = \'" + userName + "\'"; - ResultSet rs = stmt.executeQuery(query); - boolean foundUser = false; - while(rs.next()) { - String name = rs.getString("Name"); - if(userName.equals(name.trim())) { // use trimmed name for comparison. -// out.println("Welcome back " + userName + "!!! You have accessed our database earlier
    "); - foundUser = true; - //row exists - Timestamp curDate = rs.getTimestamp("Current_Accessed"); - Timestamp lastDate = rs.getTimestamp("Last_Accessed"); - out.println("
    "); -// out.println("Retrieving your database access times
    "); - out.println("Hello " + userName + "!!! Your last access of this database is " + - (lastDate != null ? lastDate.toString() : curDate.toString()) + "
    "); - lastDate = curDate; - curDate = new Timestamp(System.currentTimeMillis()); - out.println("
    "); -// out.println("Updating your database access times
    "); - PreparedStatement prep1 = conn.prepareStatement("update " + tableName + - " set Current_Accessed = ?, Last_Accessed = ?" + - " where Name = ?"); - prep1.setTimestamp(1, curDate); - prep1.setTimestamp(2, lastDate); - prep1.setString(3, name); // use the name with space characters. - prep1.executeUpdate(); - prep1.close(); -// out.println("Database updated ! Thank you !
    "); - } - } - if(!foundUser) { - out.println("
    Hello " + userName + "!!! You are accessing our database for the first time
    "); - out.println("
    "); - PreparedStatement prep1 = conn.prepareStatement("INSERT INTO " + tableName + " values(?,?,?)"); - prep1.setString(1, userName); - prep1.setTimestamp(3, new Timestamp(System.currentTimeMillis())); - prep1.setTimestamp(2, null); - prep1.executeUpdate(); - prep1.close(); -// out.println("Added you to our database
    "); - } - rs.close(); -// out.println("
    "); -// out.println("

    JDBC driver details

    "); -// out.println("Driver name : " + dmd.getDriverName() + "
    "); -// out.println("Driver version : " + dmd.getDriverVersion() + "
    "); -// out.println("Driver minor version : " + dmd.getDriverMinorVersion() + "
    "); -// out.println("Driver major version : " + dmd.getDriverMajorVersion() + "
    "); - } - } catch (Exception e) { - out.println("Exception : " + e.getMessage() + "
    "); - } finally { - if (stmt != null ) { - try {stmt.close(); } catch( Exception e1) { - } - } - if (conn != null ) { - try {conn.close();} catch( Exception e1) { - } - } - } - } - - - public boolean createTable(DataSource ds1, String tableName, - String createQuery, PrintWriter out) { - boolean tableCreated = true; - Connection con = null; - Statement stmt = null; - try { - - con = ds1.getConnection(); - stmt = con.createStatement(); - String selectQuery = "SELECT * FROM " + tableName; - try { - stmt.executeQuery(selectQuery); - } catch(Exception ex) { - //does not exist. - tableCreated = false; - } - - if (!tableCreated) { - try { - System.out.println("Executing SQL command [" + createQuery.toString() + "]"); - stmt.executeUpdate(createQuery.toString()); - tableCreated = true; - } catch (Exception ex) { - ex.printStackTrace(); // print trace in case of error creating table. - tableCreated = false; - } - } - } catch (Exception e) { - tableCreated = false; - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - } - - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - } - } - return tableCreated; - } - - public boolean createBookStoreTable(DataSource ds, PrintWriter out) { - String query = "create table BOOKS_TABLE (Title char(100), " + - "Authors char(100), Price char(16))"; - return createTable(ds, "BOOKS_TABLE", query, out); - } - - public boolean createAccessInfoTable(DataSource ds, PrintWriter out) { - String query = "create table DEMO_TABLE" + - "(Name char(50) PRIMARY KEY NOT NULL, " + - "Last_Accessed timestamp, Current_Accessed timestamp)"; - return createTable(ds, "DEMO_TABLE", query, out); - } - - public boolean addBookToTable(DataSource ds, - String title, String authors, String price) { - if(title == null || authors == null || price == null) { - return false; - } - String sql = "INSERT INTO BOOKS_TABLE values(\'" + title + "\', \'" + - authors + "\', \'" + price + "\')"; - return execute(ds, sql); - } - - // format and write the entire books_table to the printwriter. - public void printBooksTable(DataSource ds, PrintWriter out) { - Connection con = null; - Statement stmt = null; - try { - con = ds.getConnection(); - stmt = con.createStatement(); - String query = "SELECT * from BOOKS_TABLE"; - ResultSet rs = stmt.executeQuery(query); - - boolean printHeaders = true; - - while(rs.next()) { - if(printHeaders) { - printHeaders = false; - out.println("Here are the list of books available in our store:
    "); - out.println(""); - out.println("" + - ""); - } - out.println(""); - for (int i = 1; i <= 3; i++) { - out.println(""); - } - out.println(""); - } - - if(!printHeaders) { // atleast one row was there. - out.println("
    TitleAuthor(s)Price
    " + rs.getString(i) + "
    "); - } else { - out.println("Currently there are no books in our store."); - } - } catch (Exception e) { - // ignore?? - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - } - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - } - } - } - - private boolean execute(DataSource ds1, String sql) { - Connection con = null; - Statement stmt = null; - try { - - con = ds1.getConnection(); - stmt = con.createStatement(); - return stmt.execute(sql); - } catch (Exception e) { - return false; - // ignore?? - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - } - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - } - } - } -} diff --git a/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 0ee6964c5ea..00000000000 --- a/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 54768ab12de..00000000000 --- a/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - jdbc/__bookstore - jdbc/__bookstore - - diff --git a/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1646f2215b9..00000000000 --- a/appserver/tests/paas/bookstore/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - BookStoreServlet - org.glassfish.tests.paas.basic.BookStoreServlet - - - BookStoreServlet - /BookStoreServlet - - - - 30 - - - - jdbc/__bookstore - javax.sql.DataSource - - - diff --git a/appserver/tests/paas/bookstore/src/main/webapp/images/bookstore.gif b/appserver/tests/paas/bookstore/src/main/webapp/images/bookstore.gif deleted file mode 100644 index 583c8ccf87e4c86b180c20c60ab018420e98b457..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9948 zcmX9?bySmY8=eaO00B`#k#H)FpmfXV2I+t4w5C{eW0U$641crdXFc263q3<9N5CjH- z03av`1ciX0Fc1{@R|tcEU@#C20Kq{ZI0OWTf#3iL2?8M@AS4Wg1V8|K7z6~sKmY(n zj|4%$AQ%_~fWaUz7y<^vz+eE3#(_Y<5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J0Y4u=ftq~b+>lnQFrqE9` z99hA6{fD3?RpF>qfxl_kBDa4NS5E330#F$tpOBm+8`&68h(r$WX@511?elm4^yuf; z$KhWka}hY!^+a*9cvZuA{$G&`gPu=DbF~{MO0!>bjGi2f(1s2W$Me^u4!!mt!CHKp z`jM0@U7@*Okz!GisH?~2i4p-*^E+xKQVyjC%}%Ns#SWt}8YiW8A0_%pr98s17NA-w z$3f`z>=;X)1l2RtC(QBBnAofj3aEKLc1*|*4B2?7GKm=V>1lah94InZZt3|B1(& z6Fg$WDg|sMCDG{ntn{{jJlZKlR z{mBVAyeVVi@fVKDM*eC~MW?<|tC|>3y$hSNk{d98P=(e^O?9YQ6RWqZt5w`*L9ILb z$funqN4|4RJLEMwT7UhKr~ch(TI+((6%*yQIc?UY9yOtUd@$|3*z0B72h&Yg_fggG z;?RJlxB2_ea9L~EQ?&-wXb7Zh1U^iJZqAquX!xF1MG(*8-Ot2o=0=OnQhb~}t4xn` znw8O=Ju=Eo%+vfDu9>`8oiaJAi_pBBpUw22$}lE_Q_sOIh_!m?wInF!yanbqq~_E= zu(?^!0R~!x#M4EG?}V8&jk@L}zK@hsgll5XSC+}DQqTX!9OM<9uVI>BG@7q7mJ9Zu tZ;;bY&Y5qT9IWr0M+|Bot - - - - -

    Warm welcome to the basic PaaS sample.

    -

    Deployed servlets:

    -

    BookStoreServlet

    - - diff --git a/appserver/tests/paas/bookstore/src/test/java/org/glassfish/tests/paas/basic/BookStoreTest.java b/appserver/tests/paas/bookstore/src/test/java/org/glassfish/tests/paas/basic/BookStoreTest.java deleted file mode 100644 index 5a7465b9fb9..00000000000 --- a/appserver/tests/paas/bookstore/src/test/java/org/glassfish/tests/paas/basic/BookStoreTest.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.bookstore; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class BookStoreTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. - File archive = new File(System.getProperty("basedir") - + "/target/bookstore.war"); // TODO :: use mvn apis to get the - // archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS-bookstore app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/bookstore/BookStoreServlet", - "Please wait while accessing the bookstore database....."); - - get("http://" - + instanceIP - + ":" - + HTTP_PORT - + "/bookstore/BookStoreServlet?title=Advanced+guide+for+developing+PaaS+components&authors=Shalini+M&price=100%24", - "Here are the list of books available in our store:"); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/bookstore/BookStoreServlet", - "Advanced guide for developing PaaS components"); - - // 4. Undeploy the Bookstore application . - - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - -} diff --git a/appserver/tests/paas/deployment-rollback/README.txt b/appserver/tests/paas/deployment-rollback/README.txt deleted file mode 100644 index 454427dbd58..00000000000 --- a/appserver/tests/paas/deployment-rollback/README.txt +++ /dev/null @@ -1,46 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This is a PaaS application to test atomic deployment. -Orchestrator deploys the application via various steps and some of the steps with the aid of Service Provisioning engines. -This test-case will use FailureInducer exposed by Orchestrator to induce failures at various states of deployment of the application -and checks whether the deployment is failed and no services/artifacts are left in the application server (DAS). - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/deployment-rollback/initsql.sql b/appserver/tests/paas/deployment-rollback/initsql.sql deleted file mode 100644 index ad14bc5140c..00000000000 --- a/appserver/tests/paas/deployment-rollback/initsql.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE customer ( - c_id integer not null, - c_name char(16) -); - -INSERT INTO customer VALUES(1, 'xxxx'); -INSERT INTO customer VALUES(2, 'rrrr'); -INSERT INTO customer VALUES(3, 'eeee'); -INSERT INTO customer VALUES(4, 'yyyy'); -INSERT INTO customer VALUES(5, 'zzzz'); diff --git a/appserver/tests/paas/deployment-rollback/pom.xml b/appserver/tests/paas/deployment-rollback/pom.xml deleted file mode 100644 index fa557701f37..00000000000 --- a/appserver/tests/paas/deployment-rollback/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - rollback-test - 4.1-SNAPSHOT - Deployment Rollback Test - war - - rollback-test-sample - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/deployment-rollback/src/main/java/org/glassfish/tests/paas/rollbacktest/RollbackTestServlet.java b/appserver/tests/paas/deployment-rollback/src/main/java/org/glassfish/tests/paas/rollbacktest/RollbackTestServlet.java deleted file mode 100644 index 1da2269e89e..00000000000 --- a/appserver/tests/paas/deployment-rollback/src/main/java/org/glassfish/tests/paas/rollbacktest/RollbackTestServlet.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.rollbacktest; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class RollbackTestServlet extends HttpServlet { - - @Resource(mappedName = "jdbc/rollback-test") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Basic DB PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Basic DB PaaS Application

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - ResultSet rs = stmt.executeQuery("SELECT TABLENAME from sys.systables"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "List of Tables in Database" + "
    " + " " + "" + rs.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 52a5445d29d..00000000000 --- a/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 2fe4ed08ad2..00000000000 --- a/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - jdbc/rollback-test - jdbc/rollback-test - - diff --git a/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 419633ef6ec..00000000000 --- a/appserver/tests/paas/deployment-rollback/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - RollbackTestServlet - org.glassfish.tests.paas.rollbacktest.RollbackTestServlet - - - RollbackTestServlet - /RollbackTestServlet - - - - 30 - - - - jdbc/rollback-test - javax.sql.DataSource - - - diff --git a/appserver/tests/paas/deployment-rollback/src/main/webapp/index.html b/appserver/tests/paas/deployment-rollback/src/main/webapp/index.html deleted file mode 100644 index d2616684b51..00000000000 --- a/appserver/tests/paas/deployment-rollback/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the basic DB PaaS sample.

    -

    Deployed servlets:

    -

    RollbackTestServlet

    - - diff --git a/appserver/tests/paas/deployment-rollback/src/test/java/org/glassfish/tests/paas/rollbacktest/RollbackTest.java b/appserver/tests/paas/deployment-rollback/src/test/java/org/glassfish/tests/paas/rollbacktest/RollbackTest.java deleted file mode 100644 index 902594f0b4c..00000000000 --- a/appserver/tests/paas/deployment-rollback/src/test/java/org/glassfish/tests/paas/rollbacktest/RollbackTest.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.rollbacktest; - -import junit.framework.Assert; -import org.glassfish.embeddable.*; -import org.glassfish.paas.orchestrator.provisioning.util.FailureInducer; -import org.glassfish.paas.orchestrator.state.*; -import org.junit.Test; - -import java.io.File; -import java.io.PrintStream; - -public class RollbackTest { - - private File archive = new File(System.getProperty("basedir") - + "/target/rollback-test-sample.war"); // TODO :: use mvn apis - // to get the archive - // location. - private GlassFish glassfish = null; - String appName = "rollback-test"; - boolean initialized = false; - - public void initialize() throws Exception { - if (!initialized) { - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - Assert.assertNotNull(glassfish); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - initialized = true; - } - } - - @Test - public void test() throws Exception { - - initialize(); - // 2. Deploy the PaaS application. - Assert.assertTrue(archive.exists()); - - testDeploymentRollback(); - testEnableRollback(); - testDisableRollback(); - tearDown(); - } - - public void testDeploymentRollback() throws Exception { - Class[] states = {ServiceDependencyDiscoveryState.class, ProvisioningState.class, PreDeployAssociationState.class, - PostDeployAssociationState.class, DeploymentCompletionState.class}; - - for (Class state : states) { - testRollback(glassfish, archive, appName, state); - } - } - - public void testEnableRollback() throws Exception { - Class[] states = {ServiceDependencyDiscoveryState.class, EnableState.class, PostEnableState.class}; - FailureInducer.setFailureState(null); - - System.out.println("Archive absolute path : " + archive.getAbsolutePath()); - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("deploy", "--name=" + appName, archive.getAbsolutePath()); - System.out.println("Deploy command result : " + result.getOutput()); - System.out.println("Deploy command exit-status : " + result.getExitStatus()); - System.out.println("Deploy command failure-cause : " + result.getFailureCause()); - Assert.assertTrue(result.getExitStatus() == CommandResult.ExitStatus.SUCCESS); - - result = commandRunner.run("disable", appName); - - System.out.println("disable command result : " + result.getOutput()); - System.out.println("disable command exit-status : " + result.getExitStatus()); - System.out.println("disable command failure-cause : " + result.getFailureCause()); - Assert.assertTrue(result.getExitStatus() == CommandResult.ExitStatus.SUCCESS); - - result = commandRunner.run("list-services", "appname=" + appName, "output=STATE"); - System.out.println("list-services --appname=[" + appName + "] : status : " + result.getExitStatus()); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - boolean notRunning = result.getOutput().toLowerCase().contains("notrunning"); - boolean stopped = result.getOutput().toLowerCase().contains("stopped"); - Assert.assertTrue(stopped || notRunning); - - for (Class state : states) { - try { - System.out.println("Setting failure inducer with state : " + state.getSimpleName()); - FailureInducer.setFailureState(state); - result = commandRunner.run("enable", appName); - - System.out.println("enable command result : " + result.getOutput()); - System.out.println("enable command exit-status : " + result.getExitStatus()); - System.out.println("enable command failure-cause : " + result.getFailureCause()); - Assert.assertTrue(result.getExitStatus() == CommandResult.ExitStatus.FAILURE); - - result = commandRunner.run("list-services", "appname=" + appName, "output=STATE"); - System.out.println("list-services --appname=[" + appName + "] : status : " + result.getExitStatus()); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - notRunning = result.getOutput().toLowerCase().contains("notrunning"); - stopped = result.getOutput().toLowerCase().contains("stopped"); - Assert.assertTrue(stopped || notRunning); - - - } catch (Exception gfe) { - System.out.println("Failure while testing enable-rollback on application [" + archive.getName() + "] " + gfe.getLocalizedMessage()); - gfe.printStackTrace(); - } - } - - FailureInducer.setFailureState(null); - result = commandRunner.run("enable", appName); - - System.out.println("enable command result : " + result.getOutput()); - System.out.println("enable command exit-status : " + result.getExitStatus()); - System.out.println("enable command failure-cause : " + result.getFailureCause()); - Assert.assertTrue(result.getExitStatus() == CommandResult.ExitStatus.SUCCESS); - - result = commandRunner.run("list-services", "appname=" + appName, "output=STATE"); - System.out.println("list-services --appname=[" + appName + "] : status : " + result.getExitStatus()); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - notRunning = result.getOutput().toLowerCase().contains("notrunning"); - Assert.assertTrue(!notRunning); - stopped = result.getOutput().toLowerCase().contains("stopped"); - Assert.assertTrue(!stopped); - - } - - public void testDisableRollback() throws Exception { - Class[] states = {DisableState.class, PostDisableState.class}; - FailureInducer.setFailureState(null); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = null; - for (Class state : states) { - - try { - System.out.println("Setting failure inducer with state : " + state.getSimpleName()); - FailureInducer.setFailureState(state); - result = commandRunner.run("disable", appName); - - System.out.println("disable command result : " + result.getOutput()); - System.out.println("disable command exit-status : " + result.getExitStatus()); - System.out.println("disable command failure-cause : " + result.getFailureCause()); - Assert.assertTrue(result.getExitStatus() == CommandResult.ExitStatus.FAILURE); - - result = commandRunner.run("list-services", "appname=" + appName, "output=STATE"); - System.out.println("list-services --appname=[" + appName + "] : status : " + result.getExitStatus()); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - boolean notRunning = result.getOutput().toLowerCase().contains("notrunning"); - boolean stopped = result.getOutput().toLowerCase().contains("stopped"); - Assert.assertTrue(!stopped && !notRunning); - - - } catch (Exception gfe) { - System.out.println("Failure while testing disable-rollback on application [" + archive.getName() + "] " + gfe.getLocalizedMessage()); - gfe.printStackTrace(); - } - } - } - - public void tearDown() throws Exception { - FailureInducer.setFailureState(null); - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("undeploy", appName); - - System.out.println("undeploy command result : " + result.getOutput()); - System.out.println("undeploy command exit-status : " + result.getExitStatus()); - System.out.println("undeploy command failure-cause : " + result.getFailureCause()); - Assert.assertTrue(result.getExitStatus() == CommandResult.ExitStatus.SUCCESS); - } - - - private void testRollback(GlassFish glassfish, File archive, String appName, Class state) throws GlassFishException { - - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - System.out.println("Setting failure inducer with state : " + state.getSimpleName()); - FailureInducer.setFailureState(state); - System.out.println("Archive absolute path : " + archive.getAbsolutePath()); - CommandResult result = commandRunner.run("deploy", "--name=" + appName, archive.getAbsolutePath()); - System.out.println("Deploy command result : " + result.getOutput()); - System.out.println("Deploy command exit-status : " + result.getExitStatus()); - System.out.println("Deploy command failure-cause : " + result.getFailureCause()); - - validateResult(appName, commandRunner); - - } catch (Exception gfe) { - System.out.println("Failure while deploying application [" + archive.getName() + "] " + gfe.getLocalizedMessage()); - gfe.printStackTrace(); - validateResult(appName, commandRunner); - } - } - - private void validateResult(String appName, CommandRunner commandRunner) { - CommandResult result; - result = commandRunner.run("list-services", "--appname=" + appName); - System.out.println("list-services --appname=[" + appName + "] : status : " + result.getExitStatus()); - Assert.assertEquals(result.getExitStatus(), CommandResult.ExitStatus.FAILURE); - - result = commandRunner.run("list-services"); - System.out.println("list-services : status : " + result.getExitStatus()); - boolean containsNothingToList = result.getOutput().contains("Nothing to list"); - Assert.assertTrue(containsNothingToList); - - result = commandRunner.run("list-applications", "domain"); - boolean applicationFound = result.getOutput().contains(appName); - Assert.assertTrue(!applicationFound); - } -} diff --git a/appserver/tests/paas/enable-disable-test/README.txt b/appserver/tests/paas/enable-disable-test/README.txt deleted file mode 100644 index 533061d5e30..00000000000 --- a/appserver/tests/paas/enable-disable-test/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test verifies the enable and disable feature of a PaaS enabled application - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/enable-disable-test/initsql.sql b/appserver/tests/paas/enable-disable-test/initsql.sql deleted file mode 100644 index ad14bc5140c..00000000000 --- a/appserver/tests/paas/enable-disable-test/initsql.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE customer ( - c_id integer not null, - c_name char(16) -); - -INSERT INTO customer VALUES(1, 'xxxx'); -INSERT INTO customer VALUES(2, 'rrrr'); -INSERT INTO customer VALUES(3, 'eeee'); -INSERT INTO customer VALUES(4, 'yyyy'); -INSERT INTO customer VALUES(5, 'zzzz'); diff --git a/appserver/tests/paas/enable-disable-test/pom.xml b/appserver/tests/paas/enable-disable-test/pom.xml deleted file mode 100644 index edeef2dd431..00000000000 --- a/appserver/tests/paas/enable-disable-test/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - enable-disable-test - 4.1-SNAPSHOT - Enable Disable Test - war - - enable-disable-sample - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - maven-antrun-plugin - - - test - - run - - - - - - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/enable-disable-test/src/main/java/org/glassfish/tests/paas/enable_disable_test/EnableDisableServlet.java b/appserver/tests/paas/enable-disable-test/src/main/java/org/glassfish/tests/paas/enable_disable_test/EnableDisableServlet.java deleted file mode 100644 index 9c9ac63aa51..00000000000 --- a/appserver/tests/paas/enable-disable-test/src/main/java/org/glassfish/tests/paas/enable_disable_test/EnableDisableServlet.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.enable_disable_test; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class EnableDisableServlet extends HttpServlet { - - @Resource(mappedName = "jdbc/enable-disable-test-resource") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Basic DB InitSQL PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Basic DB InitSQL PaaS Application

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - ResultSet rs = stmt.executeQuery("SELECT c_id, c_name from customer"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "Data retrieved from table \"customer\"" + "
    " + "Customer ID" + "" + "Customer Name" + "
    " + rs.getObject(1) + "" + rs.getObject(2) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index d7433469b06..00000000000 --- a/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 9e7008ee789..00000000000 --- a/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - jdbc/enable-disable-test-resource - jdbc/enable-disable-test-resource - - diff --git a/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 83e3e0c59bd..00000000000 --- a/appserver/tests/paas/enable-disable-test/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - EnableDisableServlet - org.glassfish.tests.paas.enable_disable_test.EnableDisableServlet - - - EnableDisableServlet - /EnableDisableServlet - - - - 30 - - - - jdbc/enable-disable-test-resource - javax.sql.DataSource - - diff --git a/appserver/tests/paas/enable-disable-test/src/main/webapp/index.html b/appserver/tests/paas/enable-disable-test/src/main/webapp/index.html deleted file mode 100644 index b08f755b3bc..00000000000 --- a/appserver/tests/paas/enable-disable-test/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the Enable Disable Test.

    -

    Deployed servlets:

    -

    EnableDisableServlet

    - - diff --git a/appserver/tests/paas/enable-disable-test/src/test/java/org/glassfish/tests/paas/enable_disable_test/EnableDisableTest.java b/appserver/tests/paas/enable-disable-test/src/test/java/org/glassfish/tests/paas/enable_disable_test/EnableDisableTest.java deleted file mode 100644 index a98e4f7cfa5..00000000000 --- a/appserver/tests/paas/enable-disable-test/src/test/java/org/glassfish/tests/paas/enable_disable_test/EnableDisableTest.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.enable_disable_test; - -import junit.framework.Assert; -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.embeddable.*; -import org.glassfish.internal.api.Globals; -import org.junit.Test; -import org.glassfish.hk2.api.ServiceLocator; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class EnableDisableTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/enable-disable-sample.war"); // TODO :: use - // mvn apis to - // get the - // archive - // location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandResult result = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - { - result = commandRunner.run("list-services", "appname=" - + appName, "output=STATE"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - boolean notRunning = result.getOutput().toLowerCase() - .contains("notrunning"); - Assert.assertTrue(!notRunning); - boolean stopped = result.getOutput().toLowerCase() - .contains("stopped"); - Assert.assertTrue(!stopped); - } - - //2.a.Check if all services of the application are in ONLY running state. - - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner1 = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner1.getCommandInvocation("list-services", report); - ParameterMap parameterMap=new ParameterMap(); - parameterMap.add("appname",appName); - parameterMap.add("output","state"); - parameterMap.add("scope","application"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - List> listOfMap= (List>) report.getExtraProperties().get("list"); - String state=null; - boolean servicesRunning=false; - for(Map map:listOfMap){ - servicesRunning=false; - state=map.get("STATE"); - if(state.equalsIgnoreCase("running")){ - servicesRunning=true; - }else { - break; - } - } - Assert.assertTrue(servicesRunning); - System.out.println("All services in RUNNING state"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/enable-disable-sample/EnableDisableServlet", - "Customer ID"); - - - //4.Disable application - ParameterMap parameterMap1=new ParameterMap(); - parameterMap1.add("DEFAULT",appName); - invocation = commandRunner1.getCommandInvocation("disable", report); - invocation.parameters(parameterMap1).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.println("Disabled application ' "+appName+" ' "); - - //5.Check if NONE of the application of the service are in 'RUNNING' state - invocation = commandRunner1.getCommandInvocation("list-services", report); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - listOfMap= (List>) report.getExtraProperties().get("list"); - for(Map map:listOfMap){ - servicesRunning=true; - state=map.get("STATE"); - if(state.equalsIgnoreCase("running")){ - break; - }else { - servicesRunning=false; - } - } - Assert.assertFalse(servicesRunning); - System.out.println("No service in RUNNING state"); - - - //6.Enable application - invocation = commandRunner1.getCommandInvocation("enable", report); - parameterMap1=new ParameterMap(); - parameterMap1.add("DEFAULT",appName); - invocation.parameters(parameterMap1).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.println("Enabled application ' "+appName+" ' "); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/enable-disable-sample/EnableDisableServlet", - "Customer ID"); - - // 8.. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.out.println("Destroying the resources created"); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - glassfish.dispose(); - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.contains(result)) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/README.txt b/appserver/tests/paas/ext-shared-service-enable-disable-test/README.txt deleted file mode 100644 index 8211739050b..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/README.txt +++ /dev/null @@ -1,53 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -1. This is a simple test to test the behaviour of External and Shared Services when an application that uses these services are enabled -and disabled.Re-uses the basic-jpa war(renamed in this to ext-shared-service-enable-disable-test.war) with a few additions to the glassfish-services.xml -The test creates 2 shared service: 1 for lb and 1 for db. The application references these services. -The test basically aims at testing the following commands after disabling and enabling the application: - i. delete-external-service - ii. delete-shared-service - iii. stop-external-service - iv.stop-shared-service - This test creates a table ZOO_DIRECTORY which displays the a list of animals when called from the servlet. - -2. The context root for this application is "/basic-shared-service-test" - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/pom.xml b/appserver/tests/paas/ext-shared-service-enable-disable-test/pom.xml deleted file mode 100644 index 582b5e41e17..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - ext-shared-service-enable-disable-test - 4.1-SNAPSHOT - Enable Disable External and Shared Service Test - war - - ext-shared-service-enable-disable-test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - jakarta.persistence - jakarta.persistence-api - 2.2.2 - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - jakarta.transaction - jta - 1.1 - - - diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/java/org/glassfish/tests/paas/enabledisable/Animal.java b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/java/org/glassfish/tests/paas/enabledisable/Animal.java deleted file mode 100644 index 3e7d191673f..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/java/org/glassfish/tests/paas/enabledisable/Animal.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.enabledisable; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import java.io.Serializable; - - -/** - * - * @author ishan.vishnoi@java.net - */ -@Entity -@Table(name = "ZOO_DIRECTORY") -public class Animal implements Serializable { - - @Id - private int ID; - - private String name; - - private String species; - - private String cageNumber; - - private String yearOfBirth; - - public int getID() { - return ID; - } - - public void setID(int ID) { - this.ID = ID; - } - - public String getCageNumber() { - return cageNumber; - } - - public void setCageNumber(String cageNumber) { - this.cageNumber = cageNumber; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getSpecies() { - return species; - } - - public void setSpecies(String species) { - this.species = species; - } - - public String getYearOfBirth() { - return yearOfBirth; - } - - public void setYearOfBirth(String yearOfBirth) { - this.yearOfBirth = yearOfBirth; - } - - @Override - public String toString() { - return "entity.NewEntity[id=" + ID + "]"; - } - -} diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/java/org/glassfish/tests/paas/enabledisable/ExtSharedServiceEnableDisableServlet.java b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/java/org/glassfish/tests/paas/enabledisable/ExtSharedServiceEnableDisableServlet.java deleted file mode 100644 index ede0290b1ac..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/java/org/glassfish/tests/paas/enabledisable/ExtSharedServiceEnableDisableServlet.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.paas.enabledisable; - -import javax.annotation.Resource; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceUnit; -import javax.persistence.Query; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.transaction.UserTransaction; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Iterator; -import java.util.List; - - -public class ExtSharedServiceEnableDisableServlet extends HttpServlet { - - @PersistenceUnit(unitName = "BasicJPAPU") - private EntityManagerFactory emf; - @Resource - UserTransaction utx; - - /** - * Processes requests for both HTTP GET and POST methods. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/html;charset=UTF-8"); - PrintWriter out = response.getWriter(); - Animal firstAnimal = new Animal(); - firstAnimal.setName("Shera"); - firstAnimal.setCageNumber("A1"); - firstAnimal.setID(1); - firstAnimal.setSpecies("Lion"); - firstAnimal.setYearOfBirth("2001"); - Boolean x = addAnimal(firstAnimal); - Animal secondAnimal = new Animal(); - secondAnimal.setName("Bhola"); - secondAnimal.setCageNumber("A2"); - secondAnimal.setID(2); - secondAnimal.setSpecies("Bear"); - secondAnimal.setYearOfBirth("2004"); - x = addAnimal(secondAnimal); - Animal thirdAnimal = new Animal(); - thirdAnimal.setName("Ringa"); - thirdAnimal.setCageNumber("A3"); - thirdAnimal.setID(3); - thirdAnimal.setSpecies("Rhino"); - thirdAnimal.setYearOfBirth("2007"); - x = addAnimal(thirdAnimal); - - try { - out.println(""); - out.println(""); - out.println(""); - out.println("Servlet NewServlet"); - out.println(""); - out.println(""); - out.println("Here is a list of animals in the zoo."); - - List dir = sortByName(); - Iterator dirIterator = dir.iterator(); - out.println(""); - - while (dirIterator.hasNext()) { - out.println(""); - Animal animal = (Animal) dirIterator.next(); - - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - } - - out.println("
    id:" + animal.getID() + " name:" + animal.getName() + " species:" + animal.getSpecies() + " cage_number:" + animal.getCageNumber() + " year_of_birth:" + animal.getYearOfBirth() + "
    "); - - out.println("
    Back"); - out.println(""); - out.println(""); - } finally { - out.close(); - } - } - - public List sortByName() { - EntityManager em = emf.createEntityManager(); - Query q = em.createQuery("SELECT x FROM Animal x order by x.name"); - List results = q.getResultList(); - return (results); - } - - public boolean addAnimal(Animal animal) { - EntityManager em = emf.createEntityManager(); - try { - utx.begin(); - em.persist(animal); - utx.commit(); - } finally { - em.close(); - return false; - } - } - - // - /** - * Handles the HTTP GET method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Returns a short description of the servlet. - * @return a String containing servlet description - */ - @Override - public String getServletInfo() { - return "Short description"; - }// -} diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/META-INF/MANIFEST.MF b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce4a2..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml deleted file mode 100644 index f379651f7aa..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - org.eclipse.persistence.jpa.PersistenceProvider - jdbc/__shared_ext_enable_disable_paas_sample - - - - - diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 3e8ba9f1fed..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index fe7bef6fc17..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 0e5cf3d6eed..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - javax.faces.PROJECT_STAGE - Development - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - list - org.glassfish.tests.paas.enabledisable.ExtSharedServiceEnableDisableServlet - - - Faces Servlet - /faces/* - - - list - /list - - - - 30 - - - - index.jsp - - diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/index.jsp b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/index.jsp deleted file mode 100644 index dd587c081d4..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/index.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%-- - Document : index - Created on : Nov 8, 2011, 4:59:56 PM - Author : ishan ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - - - - - - - Zoo Directory - - -

    Zoo Directory

    - Get a sorted list of all animals and their details -
    - - diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/newcss.css b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/newcss.css deleted file mode 100644 index d4450236359..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/main/webapp/newcss.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - Document : newcss - Created on : 9 Nov, 2011, 3:26:45 PM - Author : ishan - Description: - Purpose of the stylesheet follows. -*/ - -body { - background-color: #ffffff; - font-size: 12px; - font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - color: #000000; - margin: 10px; -} - -h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - border-bottom: 1px solid #AFAFAF; - font-size: 16px; - font-weight: bold; - margin: 0px; - padding: 0px; - color: #D20005; -} - -a:link, a:visited { - color: #045491; - font-weight : bold; - text-decoration: none; -} - -a:link:hover, a:visited:hover { - color: #045491; - font-weight : bold; - text-decoration : underline; -} - -th { - font-weight: bold; - text-align: center; -} - -td { - text-align: center; -} - diff --git a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/test/java/org/glassfish/tests/paas/enabledisable/ExtSharedServiceEnableDisableTest.java b/appserver/tests/paas/ext-shared-service-enable-disable-test/src/test/java/org/glassfish/tests/paas/enabledisable/ExtSharedServiceEnableDisableTest.java deleted file mode 100644 index 824b9fa8a54..00000000000 --- a/appserver/tests/paas/ext-shared-service-enable-disable-test/src/test/java/org/glassfish/tests/paas/enabledisable/ExtSharedServiceEnableDisableTest.java +++ /dev/null @@ -1,505 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.enabledisable; - -import com.sun.enterprise.util.ExecException; -import com.sun.enterprise.util.OS; -import com.sun.enterprise.util.ProcessExecutor; -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.internal.api.Globals; -import org.glassfish.internal.api.ServerContext; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Assert; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.*; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Sandhya Kripalani - */ - -public class ExtSharedServiceEnableDisableTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. - File archive = new File(System.getProperty("basedir") - + "/target/ext-shared-service-enable-disable-test.war"); // TODO :: use mvn apis to get the - // archive location. - Assert.assertTrue(archive.exists()); - - //Obtaining the IP address of the DAS - String ip_address="127.0.0.1"; - try{ - Enumeration netint_enum= NetworkInterface.getNetworkInterfaces(); - for (Iterator it = Collections.list(netint_enum).iterator(); it.hasNext();) { - NetworkInterface netint = (NetworkInterface) it.next(); - if(netint.getName().equals("virbr0")){ - Enumeration inetAddresses=netint.getInetAddresses(); - if(inetAddresses.hasMoreElements()) - { - InetAddress inetAddress=(InetAddress)inetAddresses.nextElement(); - ip_address=inetAddress.toString(); - ip_address=ip_address.substring(1,ip_address.length()); - break; - } - - } - } - }catch(SocketException socketException){ - socketException.printStackTrace(); - } - - Deployer deployer = null; - String appName = null; - - try { - - { - //start-database - ServiceLocator habitat = Globals.getDefaultHabitat(); - ServerContext serverContext = habitat.getService(ServerContext.class); - String[] startdbArgs = {serverContext.getInstallRoot().getAbsolutePath() + - File.separator + "bin" + File.separator + "asadmin" + (OS.isWindows() ? ".bat" : ""), "start-database", - "--dbhome" , serverContext.getInstallRoot().getAbsolutePath() + File.separator + "databases","--dbhost",ip_address}; - ProcessExecutor startDatabase = new ProcessExecutor(startdbArgs); - - try { - startDatabase.execute(); - } catch (ExecException e) { - e.printStackTrace(); - } - } - - //Create the shared & external services first, as these services will be referenced by the application - createSharedAndExternalServices(ip_address); - - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS-ext-shared-service-enable-disable-test app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/ext-shared-service-enable-disable-test/list", "Here is a list of animals in the zoo."); - - testSharedAndExternalService(); - - - // 4. Access the app to make sure PaaS-ext-shared-service-enable-disable-test app is correctly - // provisioned after running Shared-Services test - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/ext-shared-service-enable-disable-test/list", "Here is a list of animals in the zoo."); - - // 5. Undeploy the Zoo catalogue application . - - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - deleteSharedAndExternalService(); - { - //stop-database - ServiceLocator habitat = Globals.getDefaultHabitat(); - ServerContext serverContext = habitat.getService(ServerContext.class); - String[] stopDbArgs = {serverContext.getInstallRoot().getAbsolutePath() + - File.separator + "bin" + File.separator + "asadmin" + (OS.isWindows() ? ".bat" : ""), "stop-database","--dbhost",ip_address}; - ProcessExecutor stopDatabase = new ProcessExecutor(stopDbArgs); - - try { - stopDatabase.execute(); - } catch (ExecException e) { - e.printStackTrace(); - } - } - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - System.out.println(commandResult.getOutput().toString()); - if (commandResult.getOutput().contains("Nothing to list")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - - private void createSharedAndExternalServices(String ipAddress_DAS) { - - System.out.println("################### Trying to Create External and Shared Service #######################"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - //Created external service of type JavaEE - //asadmin create-shared-service --servicetype=JavaEE --configuration min.clustersize=2:max.clustersize=4 --characteristics service-type=JavaEE my-shared-gf-service. - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("create-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("servicetype","JavaEE"); - parameterMap.add("characteristics","service-type=JavaEE"); - parameterMap.add("configuration","min.clustersize=2:max.clustersize=4"); - parameterMap.add("DEFAULT","my-shared-gf-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-gf-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - - //Create external service of type Database - // asadmin create-external-service --servicetype=Database --configuration ip-address=127.0.0.1:databasename=sun-appserv-samples:port=1527:user=APP:password=APP:host=127.0.0.1:classname=org.apache.derby.jdbc.ClientXADataSource:resourcetype=javax.sql.XADataSource my-external-db-service - invocation = commandRunner.getCommandInvocation("create-external-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("servicetype", "Database"); - parameterMap.add("configuration", "ip-address="+ipAddress_DAS+":databasename=sun-appserv-samples:connectionAttributes=;'create=true':port=1527:user=APP:password=APP:host="+ipAddress_DAS+":classname=org.apache.derby.jdbc.ClientXADataSource:resourcetype=javax.sql.XADataSource"); - //parameterMap.add("configuration", "ip-address=127.0.0.1:databasename=${com.sun.aas.installRoot}/databases/sun-appserv-samples:port=1527:user=APP:password=APP:connectionAttributes=;'create\\=true':host=127.0.0.1:classname=org.apache.derby.jdbc.EmbeddedXADataSource:resourcetype=javax.sql.XADataSource"); - parameterMap.add("DEFAULT", "my-external-db-service"); - - invocation.parameters(parameterMap).execute(); - System.out.println("Created external service 'my-external-db-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - - - // Create shared service of type LB - //asadmin create-shared-service --characteristics service-type=LB --configuration http-port=50080:https-port=50081:ssl-enabled=true --servicetype LB my-shared-lb-service - invocation = commandRunner.getCommandInvocation("create-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("servicetype", "LB"); - parameterMap.add("characteristics", "service-type=LB"); - parameterMap.add("configuration", "http-port=50080:https-port=50081:ssl-enabled=true"); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-lb-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - //List the services and check the status of both the services - it should be 'RUNNING' - invocation = commandRunner.getCommandInvocation("list-services", report); - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStarted = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStarted = false; - String state = map.get("STATE"); - if ("RUNNING".equalsIgnoreCase(state)) { - sharedServiceStarted = true; - }else{ - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - - } - - private void testSharedAndExternalService() { - - System.out.println("$$$$$$$$$$$$$ TEST SHARED AND EXTERNAL SERVICES $$$$$$$$$$$$$$$"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - //Disable the application and try stopping the shared service. Command should succeed - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("disable", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "ext-shared-service-enable-disable-test"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Disabled application ext-shared-service-enable-disable-test: " + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - - invocation = commandRunner.getCommandInvocation("stop-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.println("MSG: " + report.getMessage()); - - - //try deleting a external service when an app is using it. it should 'FAIL' - invocation = commandRunner.getCommandInvocation("delete-external-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-external-db-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertTrue(report.hasFailures()); - System.out.println("Expected Failure Msg: " + report.getMessage()); - - invocation = commandRunner.getCommandInvocation("stop-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-gf-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.println("MSG: " + report.getMessage()); - - - //List the services and check the status of both the services - it should be 'STOPPED' - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation = commandRunner.getCommandInvocation("list-services", report); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStopped = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStopped = false; - String state = map.get("STATE"); - if ("STOPPED".equalsIgnoreCase(state)) { - sharedServiceStopped = true; - } else { - sharedServiceStopped = false; - break; - } - } - Assert.assertTrue(sharedServiceStopped);//check if the shared services are stopped - - // Start the shared services. - report = habitat.getService(ActionReport.class); - invocation = commandRunner.getCommandInvocation("start-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-gf-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.println("MSG: " + report.getMessage()); - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.println("MSG: " + report.getMessage()); - - //List the services and check the status of both the services - it should be 'STARTED' - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation = commandRunner.getCommandInvocation("list-services", report); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStarted = false; - list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStarted = false; - String state = map.get("STATE"); - if ("STARTED".equalsIgnoreCase(state) || "RUNNING".equalsIgnoreCase(state)) { - sharedServiceStarted = true; - } else { - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - - //Enable the application and try stopping accessing - invocation = commandRunner.getCommandInvocation("enable", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "ext-shared-service-enable-disable-test"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Enabled application ext-shared-service-enable-disable-test: " + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - { - //List the services and check the status of both the services - it should be 'RUNNING' - invocation = commandRunner.getCommandInvocation("list-services", report); - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - sharedServiceStarted = false; - list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStarted = false; - String state = map.get("STATE"); - if ("RUNNING".equalsIgnoreCase(state)) { - sharedServiceStarted = true; - }else{ - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - } - - } - - private void deleteSharedAndExternalService() { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = - commandRunner.getCommandInvocation("delete-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - Assert.assertFalse(report.hasFailures()); - - invocation = commandRunner.getCommandInvocation("delete-external-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-external-db-service"); - invocation.parameters(parameterMap).execute(); - Assert.assertFalse(report.hasFailures()); - - invocation =commandRunner.getCommandInvocation("delete-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-gf-service"); - invocation.parameters(parameterMap).execute(); - Assert.assertFalse(report.hasFailures()); - } - - - -} diff --git a/appserver/tests/paas/external-and-shared-service/README.txt b/appserver/tests/paas/external-and-shared-service/README.txt deleted file mode 100644 index ad51c694b3a..00000000000 --- a/appserver/tests/paas/external-and-shared-service/README.txt +++ /dev/null @@ -1,56 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -1. This is a simple PaaS Shared and External Service test.Re-uses the basic-jpa war with a few additions to the glassfish-services.xml -The test creates a shared LB service and external DB service (derby): The application references these services. -The test basically aims at the following commands: - i. create-shared-service - ii. delete-shared-service - iii. start-shared-service - iv.stop-shared-service - v. create-external-service - vi. delete-external-service - This test creates a table ZOO_DIRECTORY which displays the a list of animals when called from the servlet. - -TODO : Change the pool creation to DAS (CPAS)'s IP Address instead of local host. - -2. The context root for this application is "/external-and-shared-service" - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/external-and-shared-service/pom.xml b/appserver/tests/paas/external-and-shared-service/pom.xml deleted file mode 100644 index 1e1bd6e4e91..00000000000 --- a/appserver/tests/paas/external-and-shared-service/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - external-and-shared-service-test - 4.1-SNAPSHOT - External and Shared Service Test - war - - external-and-shared-service-test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - jakarta.persistence - jakarta.persistence-api - 2.2.2 - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - jakarta.transaction - jta - 1.1 - - - diff --git a/appserver/tests/paas/external-and-shared-service/src/main/java/org/glassfish/tests/paas/external_and_shared_service/Animal.java b/appserver/tests/paas/external-and-shared-service/src/main/java/org/glassfish/tests/paas/external_and_shared_service/Animal.java deleted file mode 100644 index fc69fbec8c1..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/java/org/glassfish/tests/paas/external_and_shared_service/Animal.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.external_and_shared_service; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import java.io.Serializable; - - -/** - * - * @author ishan.vishnoi@java.net - */ -@Entity -@Table(name = "ZOO_DIRECTORY") -public class Animal implements Serializable { - - @Id - private int ID; - - private String name; - - private String species; - - private String cageNumber; - - private String yearOfBirth; - - public int getID() { - return ID; - } - - public void setID(int ID) { - this.ID = ID; - } - - public String getCageNumber() { - return cageNumber; - } - - public void setCageNumber(String cageNumber) { - this.cageNumber = cageNumber; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getSpecies() { - return species; - } - - public void setSpecies(String species) { - this.species = species; - } - - public String getYearOfBirth() { - return yearOfBirth; - } - - public void setYearOfBirth(String yearOfBirth) { - this.yearOfBirth = yearOfBirth; - } - - @Override - public String toString() { - return "entity.NewEntity[id=" + ID + "]"; - } - -} diff --git a/appserver/tests/paas/external-and-shared-service/src/main/java/org/glassfish/tests/paas/external_and_shared_service/ExternalAndSharedServiceTestServlet.java b/appserver/tests/paas/external-and-shared-service/src/main/java/org/glassfish/tests/paas/external_and_shared_service/ExternalAndSharedServiceTestServlet.java deleted file mode 100644 index ef2c9837f3b..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/java/org/glassfish/tests/paas/external_and_shared_service/ExternalAndSharedServiceTestServlet.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.paas.external_and_shared_service; - -import javax.annotation.Resource; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceUnit; -import javax.persistence.Query; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.transaction.UserTransaction; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Iterator; -import java.util.List; - -//import javax.management.*; - -/** - * - * @author ishan.vishnoi@java.net - */ -public class ExternalAndSharedServiceTestServlet extends HttpServlet { - - @PersistenceUnit(unitName = "BasicJPAPU") - private EntityManagerFactory emf; - @Resource - UserTransaction utx; - - /** - * Processes requests for both HTTP GET and POST methods. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/html;charset=UTF-8"); - PrintWriter out = response.getWriter(); - Animal firstAnimal = new Animal(); - firstAnimal.setName("Shera"); - firstAnimal.setCageNumber("A1"); - firstAnimal.setID(1); - firstAnimal.setSpecies("Lion"); - firstAnimal.setYearOfBirth("2001"); - Boolean x = addAnimal(firstAnimal); - Animal secondAnimal = new Animal(); - secondAnimal.setName("Bhola"); - secondAnimal.setCageNumber("A2"); - secondAnimal.setID(2); - secondAnimal.setSpecies("Bear"); - secondAnimal.setYearOfBirth("2004"); - x = addAnimal(secondAnimal); - Animal thirdAnimal = new Animal(); - thirdAnimal.setName("Ringa"); - thirdAnimal.setCageNumber("A3"); - thirdAnimal.setID(3); - thirdAnimal.setSpecies("Rhino"); - thirdAnimal.setYearOfBirth("2007"); - x = addAnimal(thirdAnimal); - - try { - out.println(""); - out.println(""); - out.println(""); - out.println("Servlet NewServlet"); - out.println(""); - out.println(""); - out.println("Here is a list of animals in the zoo."); - - List dir = sortByName(); - Iterator dirIterator = dir.iterator(); - out.println(""); - - while (dirIterator.hasNext()) { - out.println(""); - Animal animal = (Animal) dirIterator.next(); - - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - } - - out.println("
    id:" + animal.getID() + " name:" + animal.getName() + " species:" + animal.getSpecies() + " cage_number:" + animal.getCageNumber() + " year_of_birth:" + animal.getYearOfBirth() + "
    "); - - out.println("
    Back"); - out.println(""); - out.println(""); - } finally { - out.close(); - } - } - - public List sortByName() { - EntityManager em = emf.createEntityManager(); - Query q = em.createQuery("SELECT x FROM Animal x order by x.name"); - List results = q.getResultList(); - return (results); - } - - public boolean addAnimal(Animal animal) { - EntityManager em = emf.createEntityManager(); - try { - utx.begin(); - em.persist(animal); - utx.commit(); - } finally { - em.close(); - return false; - } - } - - // - /** - * Handles the HTTP GET method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Returns a short description of the servlet. - * @return a String containing servlet description - */ - @Override - public String getServletInfo() { - return "Short description"; - }// -} diff --git a/appserver/tests/paas/external-and-shared-service/src/main/webapp/META-INF/MANIFEST.MF b/appserver/tests/paas/external-and-shared-service/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce4a2..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml b/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml deleted file mode 100644 index a1f08c2777b..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - org.eclipse.persistence.jpa.PersistenceProvider - jdbc/external-and-shared-service-resource - - - - - diff --git a/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index e92c0c96270..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index fe7bef6fc17..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index f145325da9e..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - javax.faces.PROJECT_STAGE - Development - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - list - org.glassfish.tests.paas.external_and_shared_service.ExternalAndSharedServiceTestServlet - - - Faces Servlet - /faces/* - - - list - /list - - - - 30 - - - - index.jsp - - diff --git a/appserver/tests/paas/external-and-shared-service/src/main/webapp/index.jsp b/appserver/tests/paas/external-and-shared-service/src/main/webapp/index.jsp deleted file mode 100644 index dd587c081d4..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/webapp/index.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%-- - Document : index - Created on : Nov 8, 2011, 4:59:56 PM - Author : ishan ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - - - - - - - Zoo Directory - - -

    Zoo Directory

    - Get a sorted list of all animals and their details -
    - - diff --git a/appserver/tests/paas/external-and-shared-service/src/main/webapp/newcss.css b/appserver/tests/paas/external-and-shared-service/src/main/webapp/newcss.css deleted file mode 100644 index d4450236359..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/main/webapp/newcss.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - Document : newcss - Created on : 9 Nov, 2011, 3:26:45 PM - Author : ishan - Description: - Purpose of the stylesheet follows. -*/ - -body { - background-color: #ffffff; - font-size: 12px; - font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - color: #000000; - margin: 10px; -} - -h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - border-bottom: 1px solid #AFAFAF; - font-size: 16px; - font-weight: bold; - margin: 0px; - padding: 0px; - color: #D20005; -} - -a:link, a:visited { - color: #045491; - font-weight : bold; - text-decoration: none; -} - -a:link:hover, a:visited:hover { - color: #045491; - font-weight : bold; - text-decoration : underline; -} - -th { - font-weight: bold; - text-align: center; -} - -td { - text-align: center; -} - diff --git a/appserver/tests/paas/external-and-shared-service/src/test/java/org/glassfish/tests/paas/external_and_shared_service/SharedAndExternalServiceTest.java b/appserver/tests/paas/external-and-shared-service/src/test/java/org/glassfish/tests/paas/external_and_shared_service/SharedAndExternalServiceTest.java deleted file mode 100644 index f8a1964c907..00000000000 --- a/appserver/tests/paas/external-and-shared-service/src/test/java/org/glassfish/tests/paas/external_and_shared_service/SharedAndExternalServiceTest.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.external_and_shared_service; - -import com.sun.enterprise.util.ExecException; -import com.sun.enterprise.util.OS; -import com.sun.enterprise.util.ProcessExecutor; -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.embeddable.*; -import org.glassfish.internal.api.Globals; -import org.glassfish.internal.api.ServerContext; -import org.junit.Assert; -import org.junit.Test; -import org.glassfish.hk2.api.ServiceLocator; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.*; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Sandhya Kripalani - */ - -public class SharedAndExternalServiceTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. - File archive = new File(System.getProperty("basedir") - + "/target/external-and-shared-service-test.war"); // TODO :: use mvn apis to get the - // archive location. - org.junit.Assert.assertTrue(archive.exists()); - - //Obtaining the IP address of the DAS - String ip_address="127.0.0.1"; - try{ - Enumeration netint_enum= NetworkInterface.getNetworkInterfaces(); - for (Iterator it = Collections.list(netint_enum).iterator(); it.hasNext();) { - NetworkInterface netint = (NetworkInterface) it.next(); - if(netint.getName().equals("virbr0")){ - Enumeration inetAddresses=netint.getInetAddresses(); - if(inetAddresses.hasMoreElements()) - { - InetAddress inetAddress=(InetAddress)inetAddresses.nextElement(); - ip_address=inetAddress.toString(); - ip_address=ip_address.substring(1,ip_address.length()); - break; - } - - } - } - }catch(SocketException socketException){ - socketException.printStackTrace(); - } - - Deployer deployer = null; - String appName = null; - try { - { - //start-database - ServiceLocator habitat = Globals.getDefaultHabitat(); - ServerContext serverContext = habitat.getService(ServerContext.class); - String[] startdbArgs = {serverContext.getInstallRoot().getAbsolutePath() + - File.separator + "bin" + File.separator + "asadmin" + (OS.isWindows() ? ".bat" : ""), "start-database", - "--dbhome" , serverContext.getInstallRoot().getAbsolutePath() + File.separator + "databases","--dbhost",ip_address}; - ProcessExecutor startDatabase = new ProcessExecutor(startdbArgs); - - try { - startDatabase.execute(); - } catch (ExecException e) { - e.printStackTrace(); - } - } - - - //Create the shared & external services first, as these services will be referenced by the application - createSharedAndExternalServices(ip_address); - - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS-external-and-shared-service-test app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/external-and-shared-service-test/list", "Here is a list of animals in the zoo."); - - testSharedAndExternalService(); - - // 4. Access the app to make sure PaaS-external-and-shared-service-test app is correctly - // provisioned after running Shared-Services test - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/external-and-shared-service-test/list", "Here is a list of animals in the zoo."); - - // 5. Undeploy the Zoo catalogue application . - - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - deleteSharedAndExternalService(); - - { - //stop-database - ServiceLocator habitat = Globals.getDefaultHabitat(); - ServerContext serverContext = habitat.getService(ServerContext.class); - String[] stopDbArgs = {serverContext.getInstallRoot().getAbsolutePath() + - File.separator + "bin" + File.separator + "asadmin" + (OS.isWindows() ? ".bat" : ""), "stop-database","--dbhost",ip_address}; - ProcessExecutor stopDatabase = new ProcessExecutor(stopDbArgs); - - try { - stopDatabase.execute(); - } catch (ExecException e) { - e.printStackTrace(); - } - } - - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - System.out.println(commandResult.getOutput().toString()); - if (commandResult.getOutput().contains("Nothing to list")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - - private void createSharedAndExternalServices(String ipAddress_DAS) { - - System.out.println("################### Trying to Create Shared Service #######################"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - //Create external service of type Database - // asadmin create-external-service --servicetype=Database --configuration ip-address=127.0.0.1:databasename=sun-appserv-samples:port=1527:user=APP:password=APP:host=127.0.0.1:classname=org.apache.derby.jdbc.ClientXADataSource:resourcetype=javax.sql.XADataSource my-external-db-service - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("create-external-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("servicetype", "Database"); - parameterMap.add("configuration", "ip-address="+ipAddress_DAS+":databasename=sun-appserv-samples:connectionAttributes=;'create=true':port=1527:user=APP:password=APP:host="+ipAddress_DAS+":classname=org.apache.derby.jdbc.ClientXADataSource:resourcetype=javax.sql.XADataSource"); - //parameterMap.add("configuration", "ip-address=127.0.0.1:databasename=${com.sun.aas.installRoot}/databases/sun-appserv-samples:port=1527:user=APP:password=APP:connectionAttributes=;'create\\=true':host=127.0.0.1:classname=org.apache.derby.jdbc.EmbeddedXADataSource:resourcetype=javax.sql.XADataSource"); - parameterMap.add("DEFAULT", "my-external-db-service"); - - invocation.parameters(parameterMap).execute(); - Assert.assertFalse(report.hasFailures()); - - -/* - //Create external service of type Database - // asadmin create-external-service --servicetype=Database --configuration ip-address=127.0.0.1:databasename=sun-appserv-samples:port=1527:user=APP:password=APP:host=127.0.0.1:classname=org.apache.derby.jdbc.ClientXADataSource:resourcetype=javax.sql.XADataSource my-external-db-service - parameterMap = new ParameterMap(); - parameterMap.add("servicetype", "Database"); - parameterMap.add("configuration", "ip-address=127.0.0.1:databasename=sun-appserv-samples:port=1527:user=APP:password=APP:host=127.0.0.1:classname=org.apache.derby.jdbc.ClientXADataSource:resourcetype=javax.sql.XADataSource"); - //parameterMap.add("configuration", "ip-address=127.0.0.1:databasename=${com.sun.aas.installRoot}/databases/sun-appserv-samples:port=1527:user=APP:password=APP:connectionAttributes=;'create\\=true':host=127.0.0.1:classname=org.apache.derby.jdbc.EmbeddedXADataSource:resourcetype=javax.sql.XADataSource"); - parameterMap.add("DEFAULT", "my-external-db-service"); - - invocation.parameters(parameterMap).execute(); - - System.out.println("Created external service 'my-external-db-service' :" + !report.hasFailures()); -*/ - Assert.assertFalse(report.hasFailures()); - - // Create shared service of type LB - //asadmin create-shared-service --characteristics service-type=LB --configuration http-port=50080:https-port=50081:ssl-enabled=true --servicetype LB my-shared-lb-service - invocation = commandRunner.getCommandInvocation("create-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("servicetype", "LB"); - parameterMap.add("characteristics", "service-type=LB"); - parameterMap.add("configuration", "http-port=50080:https-port=50081:ssl-enabled=true"); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-lb-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - { - //List the services and check the status of both the services - it should be 'RUNNING' - invocation = commandRunner.getCommandInvocation("list-services", report); - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStarted = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStarted = false; - String state = map.get("STATE"); - if ("RUNNING".equalsIgnoreCase(state)) { - sharedServiceStarted = true; - }else{ - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - } - } - - private void testSharedAndExternalService() { - - System.out.println("$$$$$$$$$$$$$ TEST SHARED AND EXTERNAL SERVICES $$$$$$$$$$$$$$$"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - //Try stopping a shared service, referenced by the app. Should 'FAIL' - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("stop-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.print("Expected Failure message: " + report.getMessage()); - Assert.assertTrue(report.hasFailures()); - - //Try deleting a shared service, referenced by the app. Should 'FAIL' - report = habitat.getService(ActionReport.class); - invocation = commandRunner.getCommandInvocation("delete-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.print("Expected Failure message: " + report.getMessage()); - Assert.assertTrue(report.hasFailures()); - - - //Try deleting a external service, referenced by the app. Should 'FAIL' - invocation = commandRunner.getCommandInvocation("delete-external-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-external-db-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Expected Failure message: " + report.getMessage()); - Assert.assertTrue(report.hasFailures()); - - invocation = commandRunner.getCommandInvocation("stop-shared-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertTrue(report.hasFailures()); - System.out.print("Expected failure MSG: " + report.getMessage()); - - //List the services and check the status of both the services - it should be 'RUNNING' - invocation = commandRunner.getCommandInvocation("list-services", report); - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStarted = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStarted = false; - String state = map.get("STATE"); - if ("RUNNING".equalsIgnoreCase(state)) { - sharedServiceStarted = true; - }else{ - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - - } - - private void deleteSharedAndExternalService() { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = - commandRunner.getCommandInvocation("delete-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - invocation = commandRunner.getCommandInvocation("delete-external-service", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-external-db-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - } - -} diff --git a/appserver/tests/paas/external-db-service/README.txt b/appserver/tests/paas/external-db-service/README.txt deleted file mode 100644 index 4549f3e08f4..00000000000 --- a/appserver/tests/paas/external-db-service/README.txt +++ /dev/null @@ -1,48 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# -This PaaS application creates an external derby database vm and uses this to create an external service. The external service is created with a configuration that requires a database creation. - -This test bundles init.sql file as part of application archive. A glassfish-resources.xml file is included in the WEB-INF directory that describes the jdbc-connection-pool/jdbc-resource to be used during provisioning. - -The init.sql file is used by the service provisioning engine to load data into external database service. Application reads data from this database table and prints the contents onto a servlet. - -Works on Derby as glassfish-resources.xml contents are related to Derby database and a derby database is created as an external entity in this application. - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/external-db-service/generatederbyvm/osgi.bundle b/appserver/tests/paas/external-db-service/generatederbyvm/osgi.bundle deleted file mode 100644 index ff5ae564adb..00000000000 --- a/appserver/tests/paas/external-db-service/generatederbyvm/osgi.bundle +++ /dev/null @@ -1,44 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -#DynamicImport-Package: *; resolution:=optional - --exportcontents: \ - org.glassfish.tests.paas.externaldbservicetest.generatederbyvm; version=${project.osgi.version} diff --git a/appserver/tests/paas/external-db-service/generatederbyvm/pom.xml b/appserver/tests/paas/external-db-service/generatederbyvm/pom.xml deleted file mode 100644 index 26aed274d45..00000000000 --- a/appserver/tests/paas/external-db-service/generatederbyvm/pom.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - org.glassfish.main - paas.plugins - 4.1-SNAPSHOT - - 4.0.0 - generatederbyvm - - GenerateDerbyVM - - - - maven-antrun-plugin - - - package - - - - - - - run - - - - - - - - - org.glassfish.main.common - glassfish-api - ${project.version} - - - org.glassfish.main.virtualization - virt-api - ${project.version} - - - org.glassfish.main.virtualization - virt-core - ${project.version} - - - - diff --git a/appserver/tests/paas/external-db-service/generatederbyvm/src/main/java/org/glassfish/tests/paas/externaldbservicetest/generatederbyvm/CreateDerbyVM.java b/appserver/tests/paas/external-db-service/generatederbyvm/src/main/java/org/glassfish/tests/paas/externaldbservicetest/generatederbyvm/CreateDerbyVM.java deleted file mode 100644 index 09b039e8958..00000000000 --- a/appserver/tests/paas/external-db-service/generatederbyvm/src/main/java/org/glassfish/tests/paas/externaldbservicetest/generatederbyvm/CreateDerbyVM.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.externaldbservicetest.generatederbyvm; - -import com.sun.enterprise.util.OS; -import org.glassfish.api.ActionReport; -import org.glassfish.api.Param; -import org.glassfish.api.admin.AdminCommand; -import org.glassfish.api.admin.AdminCommandContext; -import org.glassfish.api.admin.CommandLock; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.virtualization.runtime.VirtualClusters; -import org.glassfish.virtualization.spi.AllocationConstraints; -import org.glassfish.virtualization.spi.AllocationPhase; -import org.glassfish.virtualization.spi.IAAS; -import org.glassfish.virtualization.spi.KeyValueType; -import org.glassfish.virtualization.spi.PhasedFuture; -import org.glassfish.virtualization.spi.SearchCriteria; -import org.glassfish.virtualization.spi.TemplateInstance; -import org.glassfish.virtualization.spi.TemplateRepository; -import org.glassfish.virtualization.spi.VirtualCluster; -import org.glassfish.virtualization.spi.VirtualMachine; -import org.glassfish.virtualization.util.ServiceType; -import org.glassfish.virtualization.util.SimpleSearchCriteria; -import javax.inject.Inject; -import org.jvnet.hk2.annotations.Optional; - -import org.jvnet.hk2.annotations.Service; -import org.glassfish.hk2.api.PerLookup; - -import java.io.File; -import java.text.MessageFormat; -import java.util.Collection; -import java.util.Properties; - -/** - * @author Shalini M - */ -@Service(name = "create-derby-vm") -@PerLookup -@CommandLock(CommandLock.LockType.NONE) -public class CreateDerbyVM implements AdminCommand { - - @Param(name = "servicecharacteristics", optional = true, separator = ':') - public Properties serviceCharacteristics; - - @Inject @Optional - private IAAS iaas; - - @Inject @Optional - private VirtualClusters virtualClusters; - - @Inject @Optional - private TemplateRepository templateRepository; - - @Inject - private CommandRunner commandRunner; - - @Param(name = "virtualcluster", optional = true, defaultValue = "db-external-service-test-cluster") - private String virtualClusterName; - - private static final MessageFormat ASADMIN_COMMAND = new MessageFormat( - "{0}" + File.separator + "lib" + File.separator + "nadmin" + - (OS.isWindows() ? ".bat" : "")); // {0} must be install root. - - public void execute(AdminCommandContext context) { - final ActionReport report = context.getActionReport(); - - try { - String templateId = findTemplate(serviceCharacteristics); - - TemplateInstance ti = templateRepository.byName(templateId); - - commandRunner.run("create-cluster", virtualClusterName); - - VirtualCluster vCluster = virtualClusters.byName(virtualClusterName); - - PhasedFuture future = - iaas.allocate(new AllocationConstraints(ti, vCluster), null); - - VirtualMachine vm = future.get(); - - runAsadminCommand("start-database", vm); - report.setMessage("\n" + vm.getAddress().getHostAddress()); - - } catch (Exception ex) { - throw new RuntimeException(ex.getMessage()); - } - } - - private String findTemplate(Properties sc) { - String templateId = null; - if (sc != null && templateRepository != null) { - // find the right template for the service characterstics specified. - SearchCriteria searchCriteria = new SimpleSearchCriteria(); - searchCriteria.and(new ServiceType(sc.getProperty("service-type"))); - for (Object characteristic : sc.keySet()) { - if (!"service-type".equalsIgnoreCase((String) characteristic)) { - searchCriteria.and(new KeyValueType( - (String) characteristic, sc.getProperty((String) characteristic))); - } - } - Collection matchingTemplates = - templateRepository.get(searchCriteria); - if (!matchingTemplates.isEmpty()) { - // TODO :: for now let us pick the first matching templates - TemplateInstance matchingTemplate = matchingTemplates.iterator().next(); - templateId = matchingTemplate.getConfig().getName(); - } else { - throw new RuntimeException("no template found"); - } - } - return templateId; - } - - public void runAsadminCommand(String commandName, VirtualMachine virtualMachine) { - String[] installDir = {virtualMachine.getProperty(VirtualMachine.PropertyName.INSTALL_DIR) + - File.separator + "glassfish"}; - - String[] args = {ASADMIN_COMMAND.format(installDir).toString(), - commandName}; - try { - String output = virtualMachine.executeOn(args); - Object[] params = new Object[]{virtualMachine.getName(), output}; - } catch (Exception e) { - throw new RuntimeException(e.getMessage()); - } - } - -} diff --git a/appserver/tests/paas/external-db-service/generatederbyvm/src/main/java/org/glassfish/tests/paas/externaldbservicetest/generatederbyvm/DeleteDerbyVM.java b/appserver/tests/paas/external-db-service/generatederbyvm/src/main/java/org/glassfish/tests/paas/externaldbservicetest/generatederbyvm/DeleteDerbyVM.java deleted file mode 100644 index 28029dbf5c4..00000000000 --- a/appserver/tests/paas/external-db-service/generatederbyvm/src/main/java/org/glassfish/tests/paas/externaldbservicetest/generatederbyvm/DeleteDerbyVM.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.externaldbservicetest.generatederbyvm; - -import org.glassfish.api.Param; -import org.glassfish.api.admin.AdminCommand; -import org.glassfish.api.admin.AdminCommandContext; -import org.glassfish.api.admin.CommandLock; -import org.glassfish.virtualization.runtime.VirtualClusters; -import org.glassfish.virtualization.runtime.VirtualMachineLifecycle; -import org.glassfish.virtualization.spi.VirtualCluster; -import org.glassfish.virtualization.spi.VirtualMachine; -import javax.inject.Inject; -import org.jvnet.hk2.annotations.Optional; - -import org.jvnet.hk2.annotations.Service; -import org.glassfish.hk2.api.PerLookup; - -/** - * @author Shalini M - */ -@Service(name = "delete-derby-vm") -@PerLookup -@CommandLock(CommandLock.LockType.NONE) -public class DeleteDerbyVM implements AdminCommand { - - @Inject @Optional - private VirtualClusters virtualClusters; - - @Inject - VirtualMachineLifecycle vmLifecycle; - - @Param(name = "virtualcluster", optional = true, defaultValue = "db-external-service-test-cluster") - private String virtualClusterName; - - public void execute(AdminCommandContext context) { - try { - VirtualCluster vCluster = virtualClusters.byName(virtualClusterName); - VirtualMachine vm = vCluster.getVMs().get(0); - vmLifecycle.delete(vm); - } catch (Exception ex) { - throw new RuntimeException(ex.getMessage()); - } - - } -} diff --git a/appserver/tests/paas/external-db-service/pom.xml b/appserver/tests/paas/external-db-service/pom.xml deleted file mode 100644 index 999197830ff..00000000000 --- a/appserver/tests/paas/external-db-service/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests.paas - external-service-test - 4.1-SNAPSHOT - External DB Service TesT - pom - - generatederbyvm - test - - diff --git a/appserver/tests/paas/external-db-service/test/pom.xml b/appserver/tests/paas/external-db-service/test/pom.xml deleted file mode 100644 index 18689ad7e51..00000000000 --- a/appserver/tests/paas/external-db-service/test/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - external-db-service-test - 4.1-SNAPSHOT - External DB Service PaaS application - war - - external_db_service_test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/external-db-service/test/src/main/java/org/glassfish/tests/paas/externaldbservicetest/CoffeeServlet.java b/appserver/tests/paas/external-db-service/test/src/main/java/org/glassfish/tests/paas/externaldbservicetest/CoffeeServlet.java deleted file mode 100644 index c72cb66e921..00000000000 --- a/appserver/tests/paas/external-db-service/test/src/main/java/org/glassfish/tests/paas/externaldbservicetest/CoffeeServlet.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.externaldbservicetest; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class CoffeeServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/CoffeeRes") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("External DB Service PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    External Db Service PaaS Application

    "); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - - DatabaseMetaData dbMetadata = stmt.getConnection().getMetaData(); - String dbUrl = dbMetadata.getURL(); - writer.println("DB URL : " + dbUrl + "\n"); - if (dbUrl.indexOf("foo") == -1) { - throw new Exception("Custom Database [foo] is not created while provisioning."); - } - - - ResultSet rs = stmt.executeQuery("SELECT c_id, c_name from coffee"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "Data retrieved from table \"coffee\"" + "
    " + "Coffee ID" + "" + "Coffee Name" + "
    " + rs.getObject(1) + "" + rs.getObject(2) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - } - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index d001d16fa8a..00000000000 --- a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 23a1275ddfd..00000000000 --- a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/init.sql b/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/init.sql deleted file mode 100644 index 980a818a7c9..00000000000 --- a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/init.sql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE coffee ( - c_id integer not null, - c_name char(16) -); - -INSERT INTO coffee VALUES(1, 'strong'); -INSERT INTO coffee VALUES(2, 'mild'); -INSERT INTO coffee VALUES(3, 'cold'); diff --git a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index f87d3c985d8..00000000000 --- a/appserver/tests/paas/external-db-service/test/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - CoffeeServlet - org.glassfish.tests.paas.externaldbservicetest.CoffeeServlet - - - CoffeeServlet - /CoffeeServlet - - - - 30 - - - - java:app/jdbc/CoffeeRes - javax.sql.DataSource - - diff --git a/appserver/tests/paas/external-db-service/test/src/main/webapp/images/Coffee.jpg b/appserver/tests/paas/external-db-service/test/src/main/webapp/images/Coffee.jpg deleted file mode 100644 index 8e5cb9f3251414798ddde34b8d0d3fc365e05f62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46270 zcmcG$b#NTd(k(b*h7mK2$YN$@W@ZM9Sr#)hlVve8vnlK-O# z{(1RNKL7|1@dV)r1pxv;0wJJ)5PyaNga8NtB-G!p{eLb5L^yaP7}&oz<=uwI7DbzC;$uq3K|v;5*`}?3kL!d7ZC%9M?gVIMWeHd&&{L#C8M00jorp0tD=47 zgj3VqlS@WjD{72GT;uO#M1L3gXQlsPDOfltXc%}1$iH_bfB;AcXh;Ys$bS}qg@XV< zKtchaVSpIqu$UlLI8iJLHZfIAQ*0bcc8+u|H8b~=g+*L(376z1_2AT!=J_R!KN|pK zsK09fp@0Bk!1qBA)u*UvIS@!KDk`n$e;!1{uY2@vDDC)mT{GwYp0%*@Ph8Ggy8N^@ z=hbgodSnCY19A_P8pB&Q?mjVo zdMr5t-LFth$rOFv2Xz-dLxh28xj%ou>eiKBB*ptDhqx2y>eQ$dQivY8EB>1F*O;s^ zOleNQ8WLch;tj>wPozBb^E#{vRxi4L6E>av*{5P)OgnNH%1bi#Y)xWH=!!6zq`Vz6y67a;5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q+zPV;X@Zn_)9O% zQM9rnggfO%-%{OgjePhLpc$=a0~wyj*3;8pbdcmV=zF1h!2h^e6p@g}qTpd^j$p3l z{=8!p%sF}LR9*cG`oobi?VYU10)!%3R%{RuT`2Jt;0`Z$Ha)n}FX7{{a(6 B(aQh; diff --git a/appserver/tests/paas/external-db-service/test/src/main/webapp/index.html b/appserver/tests/paas/external-db-service/test/src/main/webapp/index.html deleted file mode 100644 index 40c5016d25f..00000000000 --- a/appserver/tests/paas/external-db-service/test/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the External DB service PaaS sample.

    -

    Deployed servlets:

    -

    CoffeeServlet

    - - diff --git a/appserver/tests/paas/external-db-service/test/src/test/java/org/glassfish/tests/paas/externaldbservicetest/CoffeeTest.java b/appserver/tests/paas/external-db-service/test/src/test/java/org/glassfish/tests/paas/externaldbservicetest/CoffeeTest.java deleted file mode 100644 index 2ed3a61d434..00000000000 --- a/appserver/tests/paas/external-db-service/test/src/test/java/org/glassfish/tests/paas/externaldbservicetest/CoffeeTest.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.externaldbservicetest; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.StringTokenizer; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class CoffeeTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/external_db_service_test.war"); - // TODO :: use mvn apis to get the archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - - //2.1. Generate and run Derby VM - CommandResult createDerbyVMResult = commandRunner.run( - "create-derby-vm", "--servicecharacteristics", "service-type=Database"); - System.out.println("\ncreate-derby-vm command output [ " + - createDerbyVMResult.getOutput() + "]"); - - String derbyIP = (createDerbyVMResult.getOutput().split("\n"))[1]; - - System.out.println("Derby IP = " + derbyIP); - - //2.2. Create the shared DB service - CommandResult createExternalServiceResult = commandRunner.run( - "create-external-service", "--configuration", "ip-address=" + derbyIP + ":databasename=foo:connectionAttributes=;'create=true':port=1527:user=APP:password=APP:host=" + derbyIP + ":classname=org.apache.derby.jdbc.ClientXADataSource:resourcetype=javax.sql.XADataSource", - "--servicetype", - "Database", "coffee-service"); - System.out.println("\ncreate-external-service command output [ " + - createExternalServiceResult.getOutput() + "]"); - - //2.3. List services to check for the shared service - CommandResult listSharedServicesResult = commandRunner.run( - "list-services"); - System.out.println("\nlist-services command output [ " - + listSharedServicesResult.getOutput() + "]"); - - //2.4. Deploy app - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/external_db_service_test/CoffeeServlet", - "Coffee ID"); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - System.out.println("Destroying the resources created"); - //4.1. Delete External DB Service. - CommandResult deleteResult = commandRunner.run( - "delete-external-service", "coffee-service"); - System.out.println("\ndelete-external-service command output [" + - deleteResult.getOutput() + "]"); - //4.2. Delete generated derby VM - CommandResult deleteDerbyVMResult = commandRunner.run( - "delete-derby-vm"); - System.out.println("\ndelete-derby-vm command output [ " + - deleteDerbyVMResult.getOutput() + "]"); - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/helloworld/README.txt b/appserver/tests/paas/helloworld/README.txt deleted file mode 100644 index 537f49cfd6d..00000000000 --- a/appserver/tests/paas/helloworld/README.txt +++ /dev/null @@ -1,52 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This is a simple Hello World application actually picked up from quicklook helloworld cluster test and cloud-enabled to run on a 2 instance GlassFish cluster. -The application has been tested on OVM, KVM and native mode. - -Tests Setup commands: -1) Native mode -setup.sh -r native -2) KVM -setup.sh -r -d /srv/kvm/yamini/images -s jee kvm - -Test Duration: It takes approx. 20min for a successful run on OVM setup and 10min on KVM. - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/helloworld/pom.xml b/appserver/tests/paas/helloworld/pom.xml deleted file mode 100644 index 6a76fe51665..00000000000 --- a/appserver/tests/paas/helloworld/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - helloworld - 4.1-SNAPSHOT - PaaS Hello World sample - war - - helloworld - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 5d4147b19bc..00000000000 --- a/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 941363eeaab..00000000000 --- a/appserver/tests/paas/helloworld/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - Hello World - diff --git a/appserver/tests/paas/helloworld/src/main/webapp/hi.jsp b/appserver/tests/paas/helloworld/src/main/webapp/hi.jsp deleted file mode 100644 index f612edb5f50..00000000000 --- a/appserver/tests/paas/helloworld/src/main/webapp/hi.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<%-- - - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can - obtain a copy of the License at - https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - or packager/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at packager/legal/LICENSE.txt. - - GPL Classpath Exception: - Oracle designates this particular file as subject to the "Classpath" - exception as provided by Oracle in the GPL Version 2 section of the License - file that accompanied this code. - - Modifications: - If applicable, add the following below the License Header, with the fields - enclosed by brackets [] replaced by your own identifying information: - "Portions Copyright [year] [name of copyright owner]" - - Contributor(s): - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - ---%> - - - -GlassFish PaaS JSP Test -<%! -String message = "GlassFish PaaS says Hello World!"; -%> - - -

    <%= message%>

    -<%= new java.util.Date() %> - - diff --git a/appserver/tests/paas/helloworld/src/test/java/org/glassfish/tests/paas/helloworld/HelloWorldTest.java b/appserver/tests/paas/helloworld/src/test/java/org/glassfish/tests/paas/helloworld/HelloWorldTest.java deleted file mode 100644 index fd9ef66c06f..00000000000 --- a/appserver/tests/paas/helloworld/src/test/java/org/glassfish/tests/paas/helloworld/HelloWorldTest.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.helloworld; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.List; -import java.util.ArrayList; -import java.util.regex.*; - -/** - * @author Yamini K B - */ - -public class HelloWorldTest { - - @Test - public void test() throws Exception { - - // Bootstrap GlassFish DAS in embedded mode. - GlassFish glassfish = bootstrap(); - - // Deploy the PaaS app and verify it. - runTests(glassfish); - - // Re-deploy the PaaS app and verify it. - String testScenarios = System.getProperty("test.scenarios"); - if (testScenarios == null - || "all".contains(testScenarios.toLowerCase())) { - runTests(glassfish); - } - - // 5. Stop the GlassFish DAS - glassfish.dispose(); - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private void runTests(GlassFish glassfish) throws Exception { - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/helloworld.war"); - - Assert.assertTrue(archive.exists()); - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - List ips = getLBIPAddress(glassfish); - - //wait for instances to come up - //Thread.sleep(60000); - - for (String ip:ips) { - get("http://" + ip + ":" + HTTP_PORT - + "/helloworld/hi.jsp", - "PaaS says Hello World!"); - } - - // 4. Undeploy the PaaS application. - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err.println("Couldn't verify whether undeploy succeeded"); - } - - } - } - - } - - private GlassFish bootstrap() throws Exception { - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - return glassfish; - } - - private List getLBIPAddress(GlassFish glassfish) { - List lbIPs = new ArrayList(); - String IPAddressPattern = "(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LOAD_BALANCER", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - System.out.println("#####" + result); - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - while (m.find()) { - lbIPs.add(m.group(1)); - } - - System.out.println("LB IPs = " + lbIPs.toString()); - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - while (m.find()) { - lbIPs.add(m.group(1)); - } - - System.out.println("LB IPs = " + lbIPs.toString()); - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - lbIPs.add("localhost"); - } - return lbIPs; - } - -} diff --git a/appserver/tests/paas/javaee_shared_service/README.txt b/appserver/tests/paas/javaee_shared_service/README.txt deleted file mode 100644 index 54123c10780..00000000000 --- a/appserver/tests/paas/javaee_shared_service/README.txt +++ /dev/null @@ -1,46 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test case configures Java EE (GlassFish) as a shared service. - -Deploys the application into the GlassFish shared service and runs the necessary tests to make sure application is working end-to-end. - -Please refer ../README.txt for more generic guidelines. - diff --git a/appserver/tests/paas/javaee_shared_service/pom.xml b/appserver/tests/paas/javaee_shared_service/pom.xml deleted file mode 100644 index 65a5c426ec6..00000000000 --- a/appserver/tests/paas/javaee_shared_service/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - bookstore2 - 4.1-SNAPSHOT - Bookstore PaaS sample running on Java EE (GlassFish) shared service. - war - - bookstore2 - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/javaee_shared_service/src/main/java/org/glassfish/tests/paas/javaee_shared_service/BookStoreServlet.java b/appserver/tests/paas/javaee_shared_service/src/main/java/org/glassfish/tests/paas/javaee_shared_service/BookStoreServlet.java deleted file mode 100644 index 460714996ec..00000000000 --- a/appserver/tests/paas/javaee_shared_service/src/main/java/org/glassfish/tests/paas/javaee_shared_service/BookStoreServlet.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.javaee_shared_service; - -import javax.annotation.Resource; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.lang.String; - - -public final class BookStoreServlet extends HttpServlet { - - @Resource(mappedName = "jdbc/__bookstore2") - private DataSource ds = null; - private boolean createdTables = false; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void service(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Simple PaaS Enabled BookStore Application"); - writeCSS(writer); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Simple PaaS Enabled BookStore Application

    "); - writer.println("
    "); - - writer.println(""); - writer.println("

    This application is served by " + - getServletContext().getServerInfo() + " [" + - System.getProperty("com.sun.aas.instanceName") + "]

    "); - writer.println("Please wait while accessing the bookstore database....."); - writer.println("
    "); - if (ds != null) { - DatabaseOperations operations = new DatabaseOperations(); - String userName = "World";//System.getenv("USER"); - - operations.createAccessInfoTable(ds, writer); - operations.createBookStoreTable(ds, writer); - operations.updateAccessInfo(ds, userName, writer); - - operations.addBookToTable(ds, request.getParameter("title"), - request.getParameter("authors"), request.getParameter("price")); - operations.printBooksTable(ds, writer); - generateNewBookForm(writer); - - } - - writer.println("

    My Home"); - writer.println("

    Thanks for using Oracle PaaS Solutions

    "); - writer.println(""); - writer.println(""); - - } - - private void writeCSS(PrintWriter out) { - out.println(""); - } - - - private void generateNewBookForm(PrintWriter out) { - out.println("
    "); - out.println("

    Add a new book to the store:"); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println("
    Title:
    Author(s):
    Price:
    "); - out.println("

    "); - } -} - diff --git a/appserver/tests/paas/javaee_shared_service/src/main/java/org/glassfish/tests/paas/javaee_shared_service/DatabaseOperations.java b/appserver/tests/paas/javaee_shared_service/src/main/java/org/glassfish/tests/paas/javaee_shared_service/DatabaseOperations.java deleted file mode 100644 index 2e4b6766d77..00000000000 --- a/appserver/tests/paas/javaee_shared_service/src/main/java/org/glassfish/tests/paas/javaee_shared_service/DatabaseOperations.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.javaee_shared_service; - -import javax.sql.DataSource; -import java.io.PrintWriter; -import java.sql.*; -import java.util.HashMap; -import java.util.Map; - - -/** - * - * @author Shalini M - */ -public class DatabaseOperations { - - Map resultsMap = new HashMap(); - - public void printDBDetails(DataSource ds, PrintWriter out) { - Connection conn = null; - Statement stmt = null; - try { - out.println("
    "); - - conn = ds.getConnection(); - DatabaseMetaData dmd = conn.getMetaData(); - out.println("Database : " + dmd.getDatabaseProductName() + "
    "); - - } catch (Exception e) { - out.println("Exception : " + e.getMessage() + "
    "); - } finally { - if (stmt != null) { - try { - stmt.close(); - } catch (Exception e1) { - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception e1) { - } - } - } - } - - public void updateAccessInfo(DataSource ds, String userName, PrintWriter out) { - Connection conn = null; - Statement stmt = null; - - String tableName = "DEMO_TABLE"; - try { - out.println("
    "); -// out.println("Trying to establish connection to bookstore database...
    "); - - if(ds != null) { - conn = ds.getConnection(); - DatabaseMetaData dmd = conn.getMetaData(); - - out.println("Successfully established connection to " + dmd.getDatabaseProductName() + " Version : " + dmd.getDatabaseProductVersion()); - -// out.println("Database : " + dmd.getDatabaseProductName() + "
    "); -// out.println("Product Version : " + dmd.getDatabaseProductVersion() + "
    "); -// out.println("
    "); - - stmt = conn.createStatement(); - String query = "Select * from " + tableName + " where Name = \'" + userName + "\'"; - ResultSet rs = stmt.executeQuery(query); - boolean foundUser = false; - while(rs.next()) { - String name = rs.getString("Name"); - if(userName.equals(name.trim())) { // use trimmed name for comparison. -// out.println("Welcome back " + userName + "!!! You have accessed our database earlier
    "); - foundUser = true; - //row exists - Timestamp curDate = rs.getTimestamp("Current_Accessed"); - Timestamp lastDate = rs.getTimestamp("Last_Accessed"); - out.println("
    "); -// out.println("Retrieving your database access times
    "); - out.println("Hello " + userName + "!!! Your last access of this database is " + - (lastDate != null ? lastDate.toString() : curDate.toString()) + "
    "); - lastDate = curDate; - curDate = new Timestamp(System.currentTimeMillis()); - out.println("
    "); -// out.println("Updating your database access times
    "); - PreparedStatement prep1 = conn.prepareStatement("update " + tableName + - " set Current_Accessed = ?, Last_Accessed = ?" + - " where Name = ?"); - prep1.setTimestamp(1, curDate); - prep1.setTimestamp(2, lastDate); - prep1.setString(3, name); // use the name with space characters. - prep1.executeUpdate(); - prep1.close(); -// out.println("Database updated ! Thank you !
    "); - } - } - if(!foundUser) { - out.println("
    Hello " + userName + "!!! You are accessing our database for the first time
    "); - out.println("
    "); - PreparedStatement prep1 = conn.prepareStatement("INSERT INTO " + tableName + " values(?,?,?)"); - prep1.setString(1, userName); - prep1.setTimestamp(3, new Timestamp(System.currentTimeMillis())); - prep1.setTimestamp(2, null); - prep1.executeUpdate(); - prep1.close(); -// out.println("Added you to our database
    "); - } - rs.close(); -// out.println("
    "); -// out.println("

    JDBC driver details

    "); -// out.println("Driver name : " + dmd.getDriverName() + "
    "); -// out.println("Driver version : " + dmd.getDriverVersion() + "
    "); -// out.println("Driver minor version : " + dmd.getDriverMinorVersion() + "
    "); -// out.println("Driver major version : " + dmd.getDriverMajorVersion() + "
    "); - } - } catch (Exception e) { - out.println("Exception : " + e.getMessage() + "
    "); - } finally { - if (stmt != null ) { - try {stmt.close(); } catch( Exception e1) { - } - } - if (conn != null ) { - try {conn.close();} catch( Exception e1) { - } - } - } - } - - - public boolean createTable(DataSource ds1, String tableName, - String createQuery, PrintWriter out) { - boolean tableCreated = true; - Connection con = null; - Statement stmt = null; - try { - - con = ds1.getConnection(); - stmt = con.createStatement(); - String selectQuery = "SELECT * FROM " + tableName; - try { - stmt.executeQuery(selectQuery); - } catch(Exception ex) { - //does not exist. - tableCreated = false; - } - - if (!tableCreated) { - try { - System.out.println("Executing SQL command [" + createQuery.toString() + "]"); - stmt.executeUpdate(createQuery.toString()); - tableCreated = true; - } catch (Exception ex) { - ex.printStackTrace(); // print trace in case of error creating table. - tableCreated = false; - } - } - } catch (Exception e) { - tableCreated = false; - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - } - - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - } - } - return tableCreated; - } - - public boolean createBookStoreTable(DataSource ds, PrintWriter out) { - String query = "create table BOOKS_TABLE (Title char(100), " + - "Authors char(100), Price char(16))"; - return createTable(ds, "BOOKS_TABLE", query, out); - } - - public boolean createAccessInfoTable(DataSource ds, PrintWriter out) { - String query = "create table DEMO_TABLE" + - "(Name char(50) PRIMARY KEY NOT NULL, " + - "Last_Accessed timestamp, Current_Accessed timestamp)"; - return createTable(ds, "DEMO_TABLE", query, out); - } - - public boolean addBookToTable(DataSource ds, - String title, String authors, String price) { - if(title == null || authors == null || price == null) { - return false; - } - String sql = "INSERT INTO BOOKS_TABLE values(\'" + title + "\', \'" + - authors + "\', \'" + price + "\')"; - return execute(ds, sql); - } - - // format and write the entire books_table to the printwriter. - public void printBooksTable(DataSource ds, PrintWriter out) { - Connection con = null; - Statement stmt = null; - try { - con = ds.getConnection(); - stmt = con.createStatement(); - String query = "SELECT * from BOOKS_TABLE"; - ResultSet rs = stmt.executeQuery(query); - - boolean printHeaders = true; - - while(rs.next()) { - if(printHeaders) { - printHeaders = false; - out.println("Here are the list of books available in our store:
    "); - out.println(""); - out.println("" + - ""); - } - out.println(""); - for (int i = 1; i <= 3; i++) { - out.println(""); - } - out.println(""); - } - - if(!printHeaders) { // atleast one row was there. - out.println("
    TitleAuthor(s)Price
    " + rs.getString(i) + "
    "); - } else { - out.println("Currently there are no books in our store."); - } - } catch (Exception e) { - // ignore?? - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - } - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - } - } - } - - private boolean execute(DataSource ds1, String sql) { - Connection con = null; - Statement stmt = null; - try { - - con = ds1.getConnection(); - stmt = con.createStatement(); - return stmt.execute(sql); - } catch (Exception e) { - return false; - // ignore?? - } finally { - try { - if (stmt != null) { - stmt.close(); - } - } catch (Exception e) { - } - try { - if (con != null) { - con.close(); - } - } catch (Exception e) { - } - } - } -} diff --git a/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index b8effbd5b4e..00000000000 --- a/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - diff --git a/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 280974d1963..00000000000 --- a/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - jdbc/__bookstore2 - jdbc/__bookstore2 - - diff --git a/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 7073facb167..00000000000 --- a/appserver/tests/paas/javaee_shared_service/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - BookStoreServlet - org.glassfish.tests.paas.javaee_shared_service.BookStoreServlet - - - BookStoreServlet - /BookStoreServlet - - - - 30 - - - - jdbc/__bookstore2 - javax.sql.DataSource - - - diff --git a/appserver/tests/paas/javaee_shared_service/src/main/webapp/images/bookstore.gif b/appserver/tests/paas/javaee_shared_service/src/main/webapp/images/bookstore.gif deleted file mode 100644 index 583c8ccf87e4c86b180c20c60ab018420e98b457..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9948 zcmX9?bySmY8=eaO00B`#k#H)FpmfXV2I+t4w5C{eW0U$641crdXFc263q3<9N5CjH- z03av`1ciX0Fc1{@R|tcEU@#C20Kq{ZI0OWTf#3iL2?8M@AS4Wg1V8|K7z6~sKmY(n zj|4%$AQ%_~fWaUz7y<^vz+eE3#(_Y<5EvK&fT18T6at3Az)%1TL*qlhFc=sHfZ-r8 z90G>Jz;FPJ1c8wdFcJnv0$?;#00IVJU;qsRLbF5@LgS%f&=b+k=x69F$iD-FKmZ67 z1c5>zP#6RXKwxN1=xZ1R20-8-2pj@|!ys?~f&@X35C{?mK>`r8dh`GQ1_1ylS~|KL z1cQPAC>R6c~fgt|`f&PUFof~vS&XqWjUM=y&gKFhKv# z$A2&XJ`*4;^iynd$qIOzFBTz#PH#n4Ml{r0;V381VsjA$* zSUTlmoxZBP{>0Bls5B`DDp)GF!&YhE?}Fh>h%e=YR5hJqmSil0E~+|fwBT!K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*eC~MW?<|tC|>3y$hSNk{d98P=(e^O?9YQ6RWqZt5w`*L9ILb z$funqN4|4RJLEMwT7UhKr~ch(TI+((6%*yQIc?UY9yOtUd@$|3*z0B72h&Yg_fggG z;?RJlxB2_ea9L~EQ?&-wXb7Zh1U^iJZqAquX!xF1MG(*8-Ot2o=0=OnQhb~}t4xn` znw8O=Ju=Eo%+vfDu9>`8oiaJAi_pBBpUw22$}lE_Q_sOIh_!m?wInF!yanbqq~_E= zu(?^!0R~!x#M4EG?}V8&jk@L}zK@hsgll5XSC+}DQqTX!9OM<9uVI>BG@7q7mJ9Zu tZ;;bY&Y5qT9IWr0M+|Bot - - - - -

    Warm welcome to the basic PaaS sample.

    -

    Deployed servlets:

    -

    BookStoreServlet

    - - diff --git a/appserver/tests/paas/javaee_shared_service/src/test/java/org/glassfish/tests/paas/javaee_shared_service/BookStoreTest.java b/appserver/tests/paas/javaee_shared_service/src/test/java/org/glassfish/tests/paas/javaee_shared_service/BookStoreTest.java deleted file mode 100644 index a0722effd24..00000000000 --- a/appserver/tests/paas/javaee_shared_service/src/test/java/org/glassfish/tests/paas/javaee_shared_service/BookStoreTest.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.javaee_shared_service; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class BookStoreTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. - File archive = new File(System.getProperty("basedir") - + "/target/bookstore2.war"); // TODO :: use mvn apis to get the - // archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - // Create Java EE shared service. - CommandResult createSharedServiceResult = commandRunner.run( - "create-shared-service", "--characteristics", "service-type=JavaEE", - "--configuration", "min.clustersize=2:max.clustersize=4", - "--servicetype","JavaEE", - "JavaEE_Shared_Service"); - System.out.println("\ncreate-shared-service command output [ " + - createSharedServiceResult.getOutput() + "]"); - - // List services to check for the shared service - CommandResult listSharedServicesResult = commandRunner.run( - "list-services", "--scope", "shared", "--output", "service-name, state"); - System.out.println("\nlist-services command output [ " - + listSharedServicesResult.getOutput() + "]"); - - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS-bookstore app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/bookstore2/BookStoreServlet", - "Please wait while accessing the bookstore database....."); - - get("http://" - + instanceIP - + ":" - + HTTP_PORT - + "/bookstore2/BookStoreServlet?title=Advanced+guide+for+developing+PaaS+components&authors=Shalini+M&price=100%24", - "Here are the list of books available in our store:"); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/bookstore2/BookStoreServlet", - "Advanced guide for developing PaaS components"); - - // 4. Undeploy the Bookstore application . - - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - CommandResult deleteResult = commandRunner.run( - "delete-shared-service", "JavaEE_Shared_Service"); - System.out.println("\ndelete-shared-service command output [" + - deleteResult.getOutput() + "]"); - - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - -} diff --git a/appserver/tests/paas/kvm_lb_setup.sh b/appserver/tests/paas/kvm_lb_setup.sh deleted file mode 100755 index 49e7bdc9c91..00000000000 --- a/appserver/tests/paas/kvm_lb_setup.sh +++ /dev/null @@ -1,66 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -GF_HOME=${GF_HOME:-$S1AS_HOME} -TEMPLATES_DIR=/space -$GF_HOME/bin/asadmin start-domain --debug -$GF_HOME/bin/asadmin create-ims-config-libvirt kvm -$GF_HOME/bin/asadmin set virtualizations.libvirt-virtualization.kvm.template-cache-size=0 -$GF_HOME/bin/asadmin stop-domain -$GF_HOME/bin/asadmin start-domain --debug -$GF_HOME/bin/asadmin create-server-pool --virtualization kvm --subnet 192.168.122.70/250 --portName "virbr0" cloud - -$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/glassfish.img,$TEMPLATES_DIR/glassfish.xml --indexes ServiceType=JavaEE,VirtualizationType=libvirt glassfish -$GF_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template glassfish cloud - -$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/glassfish.img,$TEMPLATES_DIR/glassfish.xml --indexes ServiceType=Database,VirtualizationType=libvirt javadb -$S1AS_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template javadb cloud - -#$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/MySQL.img,$TEMPLATES_DIR/MySQL.xml --indexes ServiceType=Database,VirtualizationType=libvirt,product-vendor=MySQL MySQL -#$S1AS_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template MySQL mysqluser - -#$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/oracledb.img,$TEMPLATES_DIR/oracledb.xml --indexes ServiceType=Database,VirtualizationType=libvirt oracledb -#$S1AS_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template oracledb shalinikvm - -$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/apache.img,$TEMPLATES_DIR/apache.xml --indexes ServiceType=LB,VirtualizationType=libvirt apachemodjk -$S1AS_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template apachemodjk cloud - -$GF_HOME/bin/asadmin create-machine --serverPool cloud --networkName localhost local -$GF_HOME/bin/asadmin create-machine-user --serverPool cloud --machine local --userId 1000 --groupId 1000 shalini diff --git a/appserver/tests/paas/kvm_setup.sh b/appserver/tests/paas/kvm_setup.sh deleted file mode 100755 index f844044ab76..00000000000 --- a/appserver/tests/paas/kvm_setup.sh +++ /dev/null @@ -1,66 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -GF_HOME=${GF_HOME:-$S1AS_HOME} -TEMPLATES_DIR=/space -$GF_HOME/bin/asadmin start-domain --debug -$GF_HOME/bin/asadmin create-ims-config-libvirt kvm -$GF_HOME/bin/asadmin set virtualizations.libvirt-virtualization.kvm.template-cache-size=0 -$GF_HOME/bin/asadmin stop-domain -$GF_HOME/bin/asadmin start-domain --debug -$GF_HOME/bin/asadmin create-server-pool --virtualization kvm --subnet 192.168.122.70/250 --portName "virbr0" cloud - -$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/glassfish.img,$TEMPLATES_DIR/glassfish.xml --indexes ServiceType=JavaEE,VirtualizationType=libvirt glassfish -$GF_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template glassfish cloud - -$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/glassfish.img,$TEMPLATES_DIR/glassfish.xml --indexes ServiceType=Database,VirtualizationType=libvirt javadb -$S1AS_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template javadb cloud - -#$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/MySQL.img,$TEMPLATES_DIR/MySQL.xml --indexes ServiceType=Database,VirtualizationType=libvirt,product-vendor=MySQL MySQL -#$S1AS_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template MySQL mysqluser - -#$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/oracledb.img,$TEMPLATES_DIR/oracledb.xml --indexes ServiceType=Database,VirtualizationType=libvirt oracledb -#$S1AS_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template oracledb shalinikvm - -#$GF_HOME/bin/asadmin create-template --virtualization kvm --files $TEMPLATES_DIR/apache.img,$TEMPLATES_DIR/apache.xml --indexes ServiceType=LB,VirtualizationType=libvirt apachemodjk -#$S1AS_HOME/bin/asadmin create-template-user --virtualization kvm --userid 1000 --groupid 1000 --template apachemodjk cloud - -$GF_HOME/bin/asadmin create-machine --serverPool cloud --networkName localhost local -$GF_HOME/bin/asadmin create-machine-user --serverPool cloud --machine local --userId 1000 --groupId 1000 shalini diff --git a/appserver/tests/paas/lazy-shared-service-test/README.txt b/appserver/tests/paas/lazy-shared-service-test/README.txt deleted file mode 100644 index adf9469a084..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/README.txt +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -1. This is a simple PaaS test for testing the lazy initialisation of any shared service. This test reuses the basic-db application - -When shared services are created with initmode=lazy, only the configs get created. The service is really provisioned only during - deployment of an application which references the shared service. - -2. The context root for this application is "/lazy-shared-service-test" - -3. Follow the general guidelines for running PaaS tests provided at ../README.txt diff --git a/appserver/tests/paas/lazy-shared-service-test/pom.xml b/appserver/tests/paas/lazy-shared-service-test/pom.xml deleted file mode 100644 index dc73598bca2..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - lazy-shared-service-test - 4.1-SNAPSHOT - Lazy Shared Service PaaS sample - war - - lazy-shared-service-test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - jakarta.persistence - jakarta.persistence-api - 2.2.2 - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - jakarta.transaction - jta - 1.1 - - - diff --git a/appserver/tests/paas/lazy-shared-service-test/src/main/java/org/glassfish/tests/paas/lazysharedservice/BasicDBPaaSServlet.java b/appserver/tests/paas/lazy-shared-service-test/src/main/java/org/glassfish/tests/paas/lazysharedservice/BasicDBPaaSServlet.java deleted file mode 100644 index 6423c644593..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/src/main/java/org/glassfish/tests/paas/lazysharedservice/BasicDBPaaSServlet.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.lazysharedservice; - -import javax.annotation.Resource; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Enumeration; - - -public final class BasicDBPaaSServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/LazyInitSharedService") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws java.io.IOException if an input/output error occurs - * @throws javax.servlet.ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Basic DB PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Basic DB PaaS Application

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - ResultSet rs = stmt.executeQuery("SELECT TABLENAME from sys.systables"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "List of Tables in Database" + "
    " + " " + "" + rs.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index e5d394e13bb..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 67a80bf245c..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - diff --git a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index fe7bef6fc17..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 084020504cb..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - BasicDBPaaSServlet - org.glassfish.tests.paas.lazysharedservice.BasicDBPaaSServlet - - - BasicDBPaaSServlet - /BasicDBPaaSServlet - - - - 30 - - - - java:app/jdbc/LazyInitSharedService - javax.sql.DataSource - - diff --git a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/index.html b/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/index.html deleted file mode 100644 index c6510c3c058..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the basic DB PaaS sample.

    -

    Deployed servlets:

    -

    BasicDBPaaSServlet

    - - diff --git a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/newcss.css b/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/newcss.css deleted file mode 100644 index d4450236359..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/src/main/webapp/newcss.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - Document : newcss - Created on : 9 Nov, 2011, 3:26:45 PM - Author : ishan - Description: - Purpose of the stylesheet follows. -*/ - -body { - background-color: #ffffff; - font-size: 12px; - font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - color: #000000; - margin: 10px; -} - -h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - border-bottom: 1px solid #AFAFAF; - font-size: 16px; - font-weight: bold; - margin: 0px; - padding: 0px; - color: #D20005; -} - -a:link, a:visited { - color: #045491; - font-weight : bold; - text-decoration: none; -} - -a:link:hover, a:visited:hover { - color: #045491; - font-weight : bold; - text-decoration : underline; -} - -th { - font-weight: bold; - text-align: center; -} - -td { - text-align: center; -} - diff --git a/appserver/tests/paas/lazy-shared-service-test/src/test/java/org/glassfish/tests/paas/lazysharedservice/LazySharedServiceTest.java b/appserver/tests/paas/lazy-shared-service-test/src/test/java/org/glassfish/tests/paas/lazysharedservice/LazySharedServiceTest.java deleted file mode 100644 index 70fc64a664d..00000000000 --- a/appserver/tests/paas/lazy-shared-service-test/src/test/java/org/glassfish/tests/paas/lazysharedservice/LazySharedServiceTest.java +++ /dev/null @@ -1,372 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.lazysharedservice; - - -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.embeddable.*; -import org.glassfish.internal.api.Globals; -import org.junit.Assert; -import org.junit.Test; -import org.glassfish.hk2.api.ServiceLocator; - -import java.io.*; -import java.net.ConnectException; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Sandhya Kripalani - */ - -public class LazySharedServiceTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. - File archive = new File(System.getProperty("basedir") - + "/target/lazy-shared-service-test.war"); // TODO :: use mvn apis to get the - // archive location. - org.junit.Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - - //3.Create the shared services first, as these services will be referenced by the application - createSharedServices(); - - String instanceIP = getLBIPAddress(glassfish); - - //Check to see if the LB service is not provisioned - { - int responseCode=getResponseCode("http://"+instanceIP+":50080"); - junit.framework.Assert.assertTrue(responseCode==404); - } - - //Check to see if the DB service is not provisioned - { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("ping-connection-pool", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT","jdbc/lazy_init_shared_service"); - invocation.parameters(parameterMap).execute(); - System.out.println("Message while trying to ping an uncreated jdbc pool :: "+report.getTopMessagePart().getMessage()); - Assert.assertTrue(report.hasFailures()); - } - - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - //4. View the status of the shared services to see if they were provisioned after deployment of the app. - checkStatusOfSharedServices(); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 5. Access the app to make sure PaaS-lazy-shared-service-test app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/lazy-shared-service-test/BasicDBPaaSServlet", "SYSFILES"); - - - - // 6. Undeploy the Zoo catalogue application . - - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - deleteSharedService(); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - System.out.println(commandResult.getOutput().toString()); - if (commandResult.getOutput().contains("Nothing to list")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - - private void createSharedServices() { - - System.out.println("################### Trying to Create Shared Service #######################"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("create-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("servicetype","JavaEE"); - parameterMap.add("characteristics","service-type=JavaEE"); - parameterMap.add("configuration","min.clustersize=2:max.clustersize=4"); - parameterMap.add("initmode","lazy"); - parameterMap.add("DEFAULT","my-shared-gf-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-gf-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - - //Create shared service of type Database - // asadmin create-shared-service --characteristics service-type=Database --configuration database.name=my-shared-db-service --servicetype Database my-shared-db-service - parameterMap=new ParameterMap(); - parameterMap.add("servicetype", "Database"); - parameterMap.add("characteristics", "service-type=Database"); - parameterMap.add("configuration", "database.name=my-shared-db-service"); - parameterMap.add("initmode","lazy"); - parameterMap.add("DEFAULT", "my-shared-db-service"); - - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-db-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - // Create shared service of type LB - //asadmin create-shared-service --template LBNative --configuration http-port=50080:https-port=50081:ssl-enabled=true --servicetype LB my-shared-lb-service - parameterMap = new ParameterMap(); - parameterMap.add("servicetype", "LB"); - parameterMap.add("characteristics", "service-type=LB"); - parameterMap.add("configuration", "http-port=50080:https-port=50081:ssl-enabled=true"); - parameterMap.add("initmode","lazy"); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-lb-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - //List the services and check the status of both the services - it should be 'RUNNING' - invocation = commandRunner.getCommandInvocation("list-services", report); - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - boolean serviceUninitialized = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - serviceUninitialized = false; - String state = map.get("STATE"); - if ("UNINITIALIZED".equalsIgnoreCase(state)) { - serviceUninitialized = true; - }else{ - break; - } - } - Assert.assertTrue(serviceUninitialized);//check if the shared services are in UNINITIALIZED state as the services should be provisioned lazily.. - - } - - private void checkStatusOfSharedServices() { - - System.out.println("$$$$$$$$$$$$$ Checking Status of Shared Services $$$$$$$$$$$$$$$"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("list-services", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - boolean sharedServicesRunning = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServicesRunning = false; - String state = map.get("STATE"); - if ("RUNNING".equalsIgnoreCase(state)) { - sharedServicesRunning = true; - }else{ - break; - } - } - Assert.assertTrue(sharedServicesRunning);//check if the shared services are running. - - } - - public int getResponseCode(String urlString) { - HttpURLConnection huc; - - try { - URL u = new URL(urlString); - huc = (HttpURLConnection) u.openConnection(); - huc.setRequestMethod("GET"); - huc.connect(); - } catch (ConnectException e){ - System.out.println("Expected Failure Msg while trying to connect to Unprovisioned LB service : "); - e.printStackTrace(); - return 404; - }catch (IOException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - return 200; - } - - - - private void deleteSharedService() { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - //Try stopping a shared service, referenced by the app. Should 'FAIL' - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("delete-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-db-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-gf-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - } - -} diff --git a/appserver/tests/paas/mq-shared-service-test/README.txt b/appserver/tests/paas/mq-shared-service-test/README.txt deleted file mode 100644 index 6128b90dd6a..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/README.txt +++ /dev/null @@ -1,55 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -1. This is a simple MQ Shared Service test.The main intent of the test is to check if an MQ shared service is created and used properly. - - -The test basically aims at testing the register-service-provisioning-engine command. -The test does the following: - i. Creates a shared service of type mq. - ii. Deploys an app which has a reference to this shared service. - - the app should be able to access the MQ service. - - - -2. The context root for this application is "/web" - - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/ear/pom.xml b/appserver/tests/paas/mq-shared-service-test/mq-app/ear/pom.xml deleted file mode 100644 index 1c5dc2bd388..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/ear/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - 4.0.0 - tests - ejb30-hello-mdb-ear - 1.0 - EAR - ear - - - ejb30-hello-mdb-ear - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - maven-antrun-plugin - - - package - - - - - - - run - - - - - - maven-ear-plugin - 2.5 - - - - tests - ejb30-hello-mdb-web - - - - tests - ejb30-hello-mdb-ejb - - - - - - - - - - - tests - ejb30-hello-mdb-web - war - 1.0 - - - tests - ejb30-hello-mdb-ejb - ejb - 1.0 - - - diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/ear/src/main/application/META-INF/application.xml b/appserver/tests/paas/mq-shared-service-test/mq-app/ear/src/main/application/META-INF/application.xml deleted file mode 100755 index c17a6c8d805..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/ear/src/main/application/META-INF/application.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - ejb30-hello-mdb-ejb-1.0.jar - - - - ejb30-hello-mdb-web-1.0.war - /web - - - diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/ear/src/main/application/META-INF/glassfish-services.xml b/appserver/tests/paas/mq-shared-service-test/mq-app/ear/src/main/application/META-INF/glassfish-services.xml deleted file mode 100644 index d45c82f9e93..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/ear/src/main/application/META-INF/glassfish-services.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/ejb/pom.xml b/appserver/tests/paas/mq-shared-service-test/mq-app/ejb/pom.xml deleted file mode 100644 index 9e5b9ec8a26..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/ejb/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - 4.0.0 - tests - ejb30-hello-mdb-ejb - 1.0 - EJB - ejb - - ejb30-hello-mdb-ejb - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-ejb-plugin - 2.3 - - 3.0 - - - - - - - jakarta.jms - jakarta.jms-api - ${jms-api.version} - - - jakarta.ejb - ejb-api - 3.0 - - - diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/ejb/src/main/java/com/sun/s1asdev/ejb/ejb30/hello/mdb/MessageBean.java b/appserver/tests/paas/mq-shared-service-test/mq-app/ejb/src/main/java/com/sun/s1asdev/ejb/ejb30/hello/mdb/MessageBean.java deleted file mode 100644 index 2ba6e7d9f6f..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/ejb/src/main/java/com/sun/s1asdev/ejb/ejb30/hello/mdb/MessageBean.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.sun.s1asdev.ejb.ejb30.hello.mdb; - -import javax.annotation.Resource; -import javax.ejb.*; -import javax.jms.*; - -//Messages received from InQueue -@MessageDriven(mappedName="jms/ejb_ejb30_hello_mdb_InQueue") - public class MessageBean implements MessageListener { - - @Resource(mappedName="jms/ejb_ejb30_hello_mdb_QCF") - QueueConnectionFactory qcFactory; - - //Destination Queue - @Resource(mappedName="jms/ejb_ejb30_hello_mdb_OutQueue") - Queue replyQueue; - - public void onMessage(Message message) { - System.out.println("MessageBean:: onMessage :: Got message!!!" + message); - - QueueConnection connection = null; - QueueSession session = null; - try { - connection = qcFactory.createQueueConnection(); - session = connection.createQueueSession(false, - Session.AUTO_ACKNOWLEDGE); - QueueSender sender = session.createSender(replyQueue); - TextMessage tmessage = session.createTextMessage(); - String msgText = "Reply for " + ((TextMessage) message).getText(); - tmessage.setText(msgText); - System.out.println("Sending " + msgText); - sender.send(tmessage); - } catch(Exception e) { - e.printStackTrace(); - } finally { - try { - if (session != null) { - session.close(); - } - if(connection != null) { - connection.close(); - } - } catch(Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/pom.xml b/appserver/tests/paas/mq-shared-service-test/mq-app/pom.xml deleted file mode 100644 index 4edf4afdbce..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - 4.0.0 - tests - mq-app - 1.0-SNAPSHOT - MQ - pom - - ejb - web - ear - - diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/web/pom.xml b/appserver/tests/paas/mq-shared-service-test/mq-app/web/pom.xml deleted file mode 100644 index 9e17dcedd7a..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/web/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - 4.0.0 - - tests - ejb30-hello-mdb-web - 1.0 - WebServlet - war - - - ejb30-hello-mdb-web - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - - - - - javax.jms - javax.jms-api - ${jms-api.version} - - - jakarta.servlet - jakarta.servlet-api - - - diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/web/src/main/java/com/sun/s1asdev/ejb/ejb30/hello/mdb/web/TestServlet.java b/appserver/tests/paas/mq-shared-service-test/mq-app/web/src/main/java/com/sun/s1asdev/ejb/ejb30/hello/mdb/web/TestServlet.java deleted file mode 100644 index eeddd19e94f..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/web/src/main/java/com/sun/s1asdev/ejb/ejb30/hello/mdb/web/TestServlet.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package com.sun.s1asdev.ejb.ejb30.hello.mdb.web; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Enumeration; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebInitParam; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import java.io.*; -import java.util.*; -import javax.jms.*; -import javax.annotation.Resource; - - -//@WebServlet(name="testServlet", urlPatterns={"/mdbtest"}, initParams={ @WebInitParam(name="n1", value="v1"), @WebInitParam(name="n2", value="v2") }) -public class TestServlet extends HttpServlet { - - private static long TIMEOUT = 90000; - - @Resource(mappedName="jms/ejb_ejb30_hello_mdb_QCF") - private QueueConnectionFactory queueConFactory; - - //Target Queue - @Resource(mappedName="jms/ejb_ejb30_hello_mdb_InQueue") - private javax.jms.Queue msgBeanQueue; - - //Reply Queue - @Resource(mappedName="jms/ejb_ejb30_hello_mdb_OutQueue") - private javax.jms.Queue clientQueue; - - private QueueConnection queueCon; - private QueueSession queueSession; - private QueueSender queueSender; - private QueueReceiver queueReceiver; - private int numMessages = 2; - - - public void service(HttpServletRequest req, HttpServletResponse res) - throws IOException, ServletException { - - PrintWriter writer = res.getWriter(); - writer.write("filterMessage=" + req.getAttribute("filterMessage")); - writer.write("testattribute=" + req.getAttribute("testattribute")); - String msg = ""; - Enumeration en = getInitParameterNames(); - while (en.hasMoreElements()) { - String name = (String)en.nextElement(); - String value = getInitParameter(name); - msg += name + "=" + value + ", "; - } - writer.write(", initParams: " + msg + "\n"); - doTest(writer); - } - - public void doTest(PrintWriter writer) { - try { - setup(); - doTest(numMessages); - writer.write("EJB 3.0 MDB" + "PASS"); - } catch(Throwable t) { - writer.write("EJB 3.0 MDB" + "FAIL"); - t.printStackTrace(); - } finally { - cleanup(); - } - } - - public void setup() throws Exception { - queueCon = queueConFactory.createQueueConnection(); - queueSession = queueCon.createQueueSession - (false, Session.AUTO_ACKNOWLEDGE); - - // Destination will be specified when actual msg is sent. - queueSender = queueSession.createSender(null); - queueReceiver = queueSession.createReceiver(clientQueue); - queueCon.start(); - } - - public void cleanup() { - try { - if( queueCon != null ) { - queueCon.close(); - } - } catch(Throwable t) { - t.printStackTrace(); - } - } - public void sendMsgs(javax.jms.Queue queue, int num) - throws JMSException { - for(int i = 0; i < num; i++) { - Message message = queueSession.createTextMessage("foo #" + (i + 1)); - System.out.println("Sending message " + i + " to " + queue + - " at time " + System.currentTimeMillis()); - queueSender.send(queue, message); - - System.out.println("Sent message " + i + " to " + queue + - " at time " + System.currentTimeMillis()); - } - } - - public void doTest(int num) - throws Exception { - sendMsgs((javax.jms.Queue) msgBeanQueue, num); - - //Now attempt to receive responses to our message - System.out.println("Waiting for queue message"); - Message recvdmessage = queueReceiver.receive(TIMEOUT); - if( recvdmessage != null ) { - System.out.println("Received message : " + - ((TextMessage)recvdmessage).getText()); - } else { - System.out.println("timeout after " + TIMEOUT + " seconds"); - throw new JMSException("timeout" + TIMEOUT + " seconds"); - } - } - -} diff --git a/appserver/tests/paas/mq-shared-service-test/mq-app/web/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/mq-shared-service-test/mq-app/web/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index bf9d8177d06..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-app/web/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - testServlet - com.sun.s1asdev.ejb.ejb30.hello.mdb.web.TestServlet - - - testServlet - /mdbtest - - - - 30 - - - diff --git a/appserver/tests/paas/mq-shared-service-test/mq-test/pom.xml b/appserver/tests/paas/mq-shared-service-test/mq-test/pom.xml deleted file mode 100644 index 482b20d3bc5..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-test/pom.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - mq-test - 4.1-SNAPSHOT - MQ Shared Service Test - - - https://maven.java.net/content/repositories/snapshots/org/glassfish/paas.mqplugin/${project.version}/paas.mqplugin-${project.version}.jar - - - - mq-test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - maven-antrun-plugin - - - pre-integration-test - - - - - - - run - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - diff --git a/appserver/tests/paas/mq-shared-service-test/mq-test/src/test/java/org/glassfish/tests/paas/mqtest/MQSharedServiceTest.java b/appserver/tests/paas/mq-shared-service-test/mq-test/src/test/java/org/glassfish/tests/paas/mqtest/MQSharedServiceTest.java deleted file mode 100644 index 6265c1b004f..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/mq-test/src/test/java/org/glassfish/tests/paas/mqtest/MQSharedServiceTest.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.mqtest; - -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.internal.api.Globals; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Assert; -import org.junit.Test; -import org.glassfish.hk2.api.ServiceLocator; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Sandhya Kripalani - */ - -public class MQSharedServiceTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. - File archive = new File("/tmp/ejb30-hello-mdb-ear.ear"); // TODO :: use mvn apis to get the - // archive location. - org.junit.Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - - //Create the shared services first, as these services will be referenced by the application - createSharedServices(); - - deployer = glassfish.getDeployer(); - System.out.println("Deployer: "+deployer); - System.out.println("archive: "+archive); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure mq-shared-service-test app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - System.out.println("HTTP_PORT : "+HTTP_PORT); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/web/mdbtest", "filterMessage=nulltestattribute=null, initParams:"); - - // 4. Undeploy the MQ application . - - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - deleteSharedService(); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - System.out.println(commandResult.getOutput().toString()); - if (commandResult.getOutput().contains("Nothing to list")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - - private void createSharedServices() { - - System.out.println("################### Trying to Create Shared Services #######################"); - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("create-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("servicetype","MQ"); - parameterMap.add("characteristics","service-type=MQ"); - parameterMap.add("configuration","mq.service.name=my-shared-mq-service"); - parameterMap.add("DEFAULT","my-shared-mq-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-mq-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - parameterMap = new ParameterMap(); - parameterMap.add("servicetype","LB"); - parameterMap.add("characteristics", "service-type=LB"); - parameterMap.add("configuration", "http-port=50080:https-port=50081:ssl-enabled=true"); - parameterMap.add("DEFAULT","my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - System.out.println("Created shared service 'my-shared-lb-service' :" + !report.hasFailures()); - Assert.assertFalse(report.hasFailures()); - - //List the services and check the status of both the services - it should be 'RUNNING' - invocation = commandRunner.getCommandInvocation("list-services", report); - parameterMap = new ParameterMap(); - parameterMap.add("scope", "shared"); - parameterMap.add("output", "service-name,state"); - invocation.parameters(parameterMap).execute(); - - boolean sharedServiceStarted = false; - List> list = (List>) report.getExtraProperties().get("list"); - for (Map map : list) { - sharedServiceStarted = false; - String state = map.get("STATE"); - if ("RUNNING".equalsIgnoreCase(state)) { - sharedServiceStarted = true; - }else{ - break; - } - } - Assert.assertTrue(sharedServiceStarted);//check if the shared services are started. - - } - - private void deleteSharedService() { - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("delete-shared-service", report); - ParameterMap parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-mq-service"); - invocation.parameters(parameterMap).execute(); - - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "my-shared-lb-service"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - } - -} diff --git a/appserver/tests/paas/mq-shared-service-test/pom.xml b/appserver/tests/paas/mq-shared-service-test/pom.xml deleted file mode 100644 index 9603d119f0c..00000000000 --- a/appserver/tests/paas/mq-shared-service-test/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - mq-shared-service-test - 4.1-SNAPSHOT - MQ Shared Service TesT - pom - - mq-app - mq-test - - - - - maven-antrun-plugin - - - post-integration-test - - - - - - - run - - - - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/README.txt b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/README.txt deleted file mode 100644 index 945c02b9c4e..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/README.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test will create 2 jdbc connection pools referring to different application scoped db services. HR database is located on Derby database whereas Salary database is located on mysql database. - -This test bundles init.sql file as part of application archive for execution on the different databases. A glassfish-resources.xml file is included in the WEB-INF directory that describes the jdbc-connection-pool(s)/jdbc-resource(s) to be used during provisioning. - -The corresponding init.sql files are used by the service provisioning engine to load data into the respective databases that are created during provisioning. Application reads data from these database tables and prints the contents onto a servlet. - -Also a service.properties file is included in the application archive that maps the init.sql files with the respective databases and also provides mapping between the service names and database names. - -Please refer ../../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/pom.xml b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/pom.xml deleted file mode 100644 index 2169b00850f..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - multiple-app-scoped-service-test-advanced - 4.1-SNAPSHOT - Multiple Application Scoped Database Services Advanced PaaS Application - war - - multiple_app_scoped_service_test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeServlet.java b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeServlet.java deleted file mode 100644 index 351a45c5e6f..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeServlet.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.multipleappscopedservicetest; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.PreparedStatement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class EmployeeServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/SalaryRes") - private DataSource salDs = null; - - @Resource(mappedName = "java:app/jdbc/HrRes") - private DataSource hrDs = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Multiple App Scoped DB Service Test"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Multiple Application Scoped DB Service PaaS Application

    "); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (hrDs != null && salDs != null) { - Statement stmt1 = null; - PreparedStatement stmt2 = null; - try { - stmt1 = hrDs.getConnection().createStatement(); - - DatabaseMetaData dbMetadata1 = stmt1.getConnection().getMetaData(); - String dbUrl1 = dbMetadata1.getURL(); - writer.println("DB URL : " + dbUrl1 + "\n"); - if (dbUrl1.indexOf("hr_database") == -1) { - throw new Exception("Custom Database [hr_database] is not created while provisioning."); - } - - - ResultSet rs1 = stmt1.executeQuery("SELECT emp_id, emp_name from HR"); - String salQuery = "SELECT emp_sal from SALARY WHERE emp_id = ? "; - stmt2 = salDs.getConnection().prepareStatement(salQuery); - - DatabaseMetaData dbMetadata2 = stmt2.getConnection().getMetaData(); - String dbUrl2 = dbMetadata2.getURL(); - writer.println("DB URL : " + dbUrl2 + "\n"); - if (dbUrl2.indexOf("salary_database") == -1) { - throw new Exception("Custom Database [salary_database] is not created while provisioning."); - } - - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs1.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - stmt2.setInt(1, (Integer) rs1.getObject(1)); - ResultSet rs2 = stmt2.executeQuery(); - while(rs2.next()) { - writer.println(" "); - } - writer.println(""); - } - writer.println("
    " + "Employee Information retrieved" + "
    " + "Employee ID" + "" + "Employee Name" + "" + "Employee Salary" + "
    " + rs1.getObject(1) + "" + rs1.getObject(2) + "" + rs2.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt1 != null) { - try { - stmt1.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (stmt2 != null) { - try { - stmt2.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - } - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index 08025778c4e..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 41d7c57bda3..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/init.hr-service.sql b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/init.hr-service.sql deleted file mode 100644 index 47fe01200a9..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/init.hr-service.sql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE HR ( - emp_id integer not null, - emp_name char(16) -); - -INSERT INTO HR VALUES(101, 'Robert Frost'); -INSERT INTO HR VALUES(102, 'William Blake'); -INSERT INTO HR VALUES(103, 'Edgar Allan Poe'); -INSERT INTO HR VALUES(104, 'W Shakespeare'); -INSERT INTO HR VALUES(105, 'W Wordsworth'); diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/init.salary-service.sql b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/init.salary-service.sql deleted file mode 100644 index 51808a357c8..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/init.salary-service.sql +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE SALARY ( - emp_id integer not null, - emp_sal float(7, 2) -); - -INSERT INTO SALARY VALUES(101, 11111.12); -INSERT INTO SALARY VALUES(102, 11221.15); -INSERT INTO SALARY VALUES(103, 31411.16); -INSERT INTO SALARY VALUES(104, 14135.72); -INSERT INTO SALARY VALUES(105, 61114.18); - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/service.properties b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/service.properties deleted file mode 100644 index 0d8217f610e..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/service.properties +++ /dev/null @@ -1,4 +0,0 @@ -salary-service.databases=salary_database -hr-service.databases=hr_database -salary-service.salary_database.init.sql=init.salary-service.sql -hr-service.hr_database.init.sql=init.hr-service.sql diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d9df04555c6..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - EmployeeServlet - org.glassfish.tests.paas.multipleappscopedservicetest.EmployeeServlet - - - EmployeeServlet - /EmployeeServlet - - - - 30 - - - - java:app/jdbc/HrRes - javax.sql.DataSource - - - java:app/jdbc/SalaryRes - javax.sql.DataSource - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/images/numbers.jpg b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/main/webapp/images/numbers.jpg deleted file mode 100644 index 5e90b27ee9722e71092f8a5eb900ec4c8b0ad20f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12810 zcmbW7XEa>V+vrD+9=#hif*^?KCL~%UMDHZgO&Gn79=%J{1QERxz4snQ?~LAunS?Q6 zaQ)x+u6x(IpYFZS+2?#Yd!My`&sopfPrF;Z+WRukdcs)k&=*-l2cGWB&VRFASHcB|B#A? zmX3~&jFN$oo|ciCmX7v6AHl)9UxQCTOh7me;{p^7I_W*n<0%}fC zMM4_w4@6w9v|=I2c@MaiYJ2E(rjR`1AKgNUN$43EnV5MW@jd1jcqZ{&Qc7CpaA?jD|A-afv5VV}bzBBP>XQoejmO-s+n%=(#MP*_x4 zQd;(_uD+qMskx=Kx37O-aA6@9IBX zH~_r=#=3w0H`xEdMRm`Gi;s_oPxK!y99-}F8;=T~fK!x^T2Y(mgDVY}SjYofrR2QY z9%62B9VFdHw@37wc*_ghj9ELW zKbPv3K*13g8(_|#2kXL3A)K?ylQqpAjN;tfVrdtGHNgQai-rrQD~ddZ13^vR{onwT zzbZ(D?{J5f&=3AzwSV+SQ)3iBv1CK+$H&HcO@b|YH0YS2`rBa({#KM>_YGaOc~Qz<#i& zmc@P5O{R8rx6z8uZGiR3i|c3+I$T|%=esH-(H@}1JiCNt;~=jHbx8t7Tc%}o_Ed&$ zNOTroSbZ8YG3pMm^|EwnRZVhDcs8ldZV$4_T`c#W0{r)ETcnRo5bbtT^30s!RnFzR z+L@~J<2lJcoT(!oZp3=pad95iQ`O{9AxNwj{VgAAiU#IOaV<-#xKr5vMy%z-UvVp< zlov3+35TNZk}|aK^Uj*NHYw8 zV+04@;@JaP<#0;uTeAyD19t0-90^7DOvV#a!#oFFnEc}wN)-iC@sqWWB$G^*-^xw% zJbe|ut}3PfPE1`sn9ixurRdE4Z}Bbh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B;DWD`?{qREr7n%^cy3fqWR#A<4;Q`zzJ(6vPvRP_aXm zurr?`OD5w_0%h&qxD;QhLuESqgmk$f6->1MeaGKq>wJ0%%(dbm=TVYb+2Fr4K3`%L z&M5p)V@*nKqDH~lPPy9|6jlb=V#>mj+2D`)?Uiu-N?Q~dkl;S(9xTmWa;!`jF;d|9 zT0kfMD#z)X3(7zJ2=jEIHLhvKF)MqmZ_FLy`$R$GNnDK8VqbETY}ABSG2JP=POD!? zcOaMiS!{=icl#^@tPz}kJ?-n(?ua;5ipw>5T$QB(j~>@vd%a)8#;1kijo-~FwIR4E z>=$C4gfV)09*0tDC+GII2$60se3k?HqO*a0GPb#Hlr(*gp^E39thJT-%XyTX%-L9u z_Bex!I@NEwc5de;+v%0Uvn7~trP*StRA)l|X)D`_e4bB4QF(7@A;|f{gbe%qvMUx0 z0>J@UMo&$+v;-8n1vItH;&M7VAcI}?-^9-{Z(#$~jAlM({qDTIeeM}2ldQfmgp&bOKHd8~?r_lCqORmia$1A) zlwAv3#)yB2DcXy+6*kK^IWXBd6Fz_lz?IN`nn>SeD(_DbBN zJuCX4Rd{{kr;jm$25DKWM>+|=kxr&Pjk)!aLtQiuE;W - - - - -

    Warm welcome to the Multiple App Scoped Database Services PaaS Application

    -

    Deployed servlets:

    -

    EmployeeServlet

    - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/test/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeTest.java b/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/test/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeTest.java deleted file mode 100644 index 1f2cd39630b..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/advanced/src/test/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeTest.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.multipleappscopedservicetest; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class EmployeeTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/multiple_app_scoped_service_test.war"); - // TODO :: use mvn apis to get the archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - - //2. Deploy app - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/multiple_app_scoped_service_test/EmployeeServlet", - "Employee ID"); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/multiple_app_scoped_service_test/EmployeeServlet", - "Employee Salary"); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/README.txt b/appserver/tests/paas/multiple-db-app-scoped-services/basic/README.txt deleted file mode 100644 index 52e9aad3d9c..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/README.txt +++ /dev/null @@ -1,55 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test will create 2 jdbc connection pools referring to different application scoped db services. HR database is located on Derby database whereas Salary database is located on mysql database. - -This test specifies the database name and init.sql explicitly in the glassfish-services.xml for the respective database services. A glassfish-resources.xml file is included in the WEB-INF directory that describes the jdbc-connection-pool(s)/jdbc-resource(s) to be used during provisioning. - -The corresponding init.sql files are used by the service provisioning engine to load data into the respective databases that are created during provisioning. Application reads data from these database tables and prints the contents onto a servlet. - -Works only on KVM as this PaaS application requires Derby and MySQL DB Plugins. - -Prerequisities : -- Make sure both paas.javadbplugin.jar as well as paas.mysqldbplugin.jar are present in the S1AS_HOME/modules directory. -- Execute the command to make one as the default, say - -asadmin register-service-provisioning-engine --type Database --defaultservice=true org.glassfish.paas.javadbplugin.DerbyPlugin - -Please refer ../../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/init.hr-service.sql b/appserver/tests/paas/multiple-db-app-scoped-services/basic/init.hr-service.sql deleted file mode 100644 index 47fe01200a9..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/init.hr-service.sql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE HR ( - emp_id integer not null, - emp_name char(16) -); - -INSERT INTO HR VALUES(101, 'Robert Frost'); -INSERT INTO HR VALUES(102, 'William Blake'); -INSERT INTO HR VALUES(103, 'Edgar Allan Poe'); -INSERT INTO HR VALUES(104, 'W Shakespeare'); -INSERT INTO HR VALUES(105, 'W Wordsworth'); diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/init.salary-service.sql b/appserver/tests/paas/multiple-db-app-scoped-services/basic/init.salary-service.sql deleted file mode 100644 index 51808a357c8..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/init.salary-service.sql +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE SALARY ( - emp_id integer not null, - emp_sal float(7, 2) -); - -INSERT INTO SALARY VALUES(101, 11111.12); -INSERT INTO SALARY VALUES(102, 11221.15); -INSERT INTO SALARY VALUES(103, 31411.16); -INSERT INTO SALARY VALUES(104, 14135.72); -INSERT INTO SALARY VALUES(105, 61114.18); - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/pom.xml b/appserver/tests/paas/multiple-db-app-scoped-services/basic/pom.xml deleted file mode 100644 index 78e009f12c2..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/pom.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - multiple-app-scoped-service-test-basic - 4.1-SNAPSHOT - Multiple Application Scoped Database Services Basic PaaS Application - war - - multiple_app_scoped_service_test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - maven-antrun-plugin - - - test - - run - - - - - - - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeServlet.java b/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeServlet.java deleted file mode 100644 index 1163e7ce3e2..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeServlet.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.multipleappscopedservicetest; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.PreparedStatement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class EmployeeServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/SalaryRes") - private DataSource salDs = null; - - @Resource(mappedName = "java:app/jdbc/HrRes") - private DataSource hrDs = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Multiple App Scoped DB Service Test"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Multiple Application Scoped DB Service PaaS Application

    "); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (hrDs != null && salDs != null) { - Statement stmt1 = null; - PreparedStatement stmt2 = null; - try { - stmt1 = hrDs.getConnection().createStatement(); - - DatabaseMetaData dbMetadata1 = stmt1.getConnection().getMetaData(); - String dbUrl1 = dbMetadata1.getURL(); - writer.println("DB URL : " + dbUrl1 + "\n"); - if (dbUrl1.indexOf("hr_database") == -1) { - throw new Exception("Custom Database [hr_database] is not created while provisioning."); - } - - - ResultSet rs1 = stmt1.executeQuery("SELECT emp_id, emp_name from HR"); - String salQuery = "SELECT emp_sal from SALARY WHERE emp_id = ? "; - stmt2 = salDs.getConnection().prepareStatement(salQuery); - - DatabaseMetaData dbMetadata2 = stmt2.getConnection().getMetaData(); - String dbUrl2 = dbMetadata2.getURL(); - writer.println("DB URL : " + dbUrl2 + "\n"); - if (dbUrl2.indexOf("salary_database") == -1) { - throw new Exception("Custom Database [salary_database] is not created while provisioning."); - } - - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs1.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - stmt2.setInt(1, (Integer) rs1.getObject(1)); - ResultSet rs2 = stmt2.executeQuery(); - while(rs2.next()) { - writer.println(" "); - writer.println(""); - } - } - writer.println("
    " + "Employee Information retrieved" + "
    " + "Employee ID" + "" + "Employee Name" + "" + "Employee Salary" + "
    " + rs1.getObject(1) + "" + rs1.getObject(2) + "" + rs2.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt1 != null) { - try { - stmt1.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (stmt2 != null) { - try { - stmt2.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - } - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index 08025778c4e..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index a65810d39c6..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d9df04555c6..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - EmployeeServlet - org.glassfish.tests.paas.multipleappscopedservicetest.EmployeeServlet - - - EmployeeServlet - /EmployeeServlet - - - - 30 - - - - java:app/jdbc/HrRes - javax.sql.DataSource - - - java:app/jdbc/SalaryRes - javax.sql.DataSource - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/images/numbers.jpg b/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/main/webapp/images/numbers.jpg deleted file mode 100644 index 5e90b27ee9722e71092f8a5eb900ec4c8b0ad20f..0000000000000000000000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jlb=V#>mj+2D`)?Uiu-N?Q~dkl;S(9xTmWa;!`jF;d|9 zT0kfMD#z)X3(7zJ2=jEIHLhvKF)MqmZ_FLy`$R$GNnDK8VqbETY}ABSG2JP=POD!? zcOaMiS!{=icl#^@tPz}kJ?-n(?ua;5ipw>5T$QB(j~>@vd%a)8#;1kijo-~FwIR4E z>=$C4gfV)09*0tDC+GII2$60se3k?HqO*a0GPb#Hlr(*gp^E39thJT-%XyTX%-L9u z_Bex!I@NEwc5de;+v%0Uvn7~trP*StRA)l|X)D`_e4bB4QF(7@A;|f{gbe%qvMUx0 z0>J@UMo&$+v;-8n1vItH;&M7VAcI}?-^9-{Z(#$~jAlM({qDTIeeM}2ldQfmgp&bOKHd8~?r_lCqORmia$1A) zlwAv3#)yB2DcXy+6*kK^IWXBd6Fz_lz?IN`nn>SeD(_DbBN zJuCX4Rd{{kr;jm$25DKWM>+|=kxr&Pjk)!aLtQiuE;W - - - - -

    Warm welcome to the Multiple App Scoped Database Services PaaS Application

    -

    Deployed servlets:

    -

    EmployeeServlet

    - - diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/test/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeTest.java b/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/test/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeTest.java deleted file mode 100644 index 1f2cd39630b..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/basic/src/test/java/org/glassfish/tests/paas/multipleappscopedservicetest/EmployeeTest.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.multipleappscopedservicetest; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class EmployeeTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/multiple_app_scoped_service_test.war"); - // TODO :: use mvn apis to get the archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - - //2. Deploy app - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/multiple_app_scoped_service_test/EmployeeServlet", - "Employee ID"); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/multiple_app_scoped_service_test/EmployeeServlet", - "Employee Salary"); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/multiple-db-app-scoped-services/pom.xml b/appserver/tests/paas/multiple-db-app-scoped-services/pom.xml deleted file mode 100644 index 3865f778bcd..00000000000 --- a/appserver/tests/paas/multiple-db-app-scoped-services/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests.paas - multiple-db-app-scoped-services - 4.1-SNAPSHOT - Multiple DB App Scoped Services - pom - - basic - advanced - - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/README.txt b/appserver/tests/paas/multiple-db-shared-services/advanced/README.txt deleted file mode 100644 index d4b686ab0b4..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/README.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test will create 2 jdbc connection pools referring to different shared db services. HR database is located on Derby database whereas Salary database is located on mysql database. - -This test bundles init.sql files as part of application archive. A glassfish-resources.xml file is included in the WEB-INF directory that describes the jdbc-connection-pools/jdbc-resources to be used during provisioning. - -The init.sql files are used by the service provisioning engine to load data into respective databases that are created during provisioning. Application reads data from these database tables and prints the contents onto a servlet. - -A service.properties file is also included in the application archive containing the mapping between service names and database names and init sql files. - -Please refer ../../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/pom.xml b/appserver/tests/paas/multiple-db-shared-services/advanced/pom.xml deleted file mode 100644 index d91bcbe4f94..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - multiple-shared-db-service-test - 4.1-SNAPSHOT - Multiple Shared DB service PaaS application - war - - multiple_shared_db_service_test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeServlet.java b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeServlet.java deleted file mode 100644 index e95207297f0..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeServlet.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.multipleshareddbservicetest; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.PreparedStatement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class EmployeeServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/SalaryRes") - private DataSource salDs = null; - - @Resource(mappedName = "java:app/jdbc/HrRes") - private DataSource hrDs = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Multiple Shared DB Service Test"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Multiple Shared DB Service PaaS Application

    "); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (hrDs != null && salDs != null) { - Statement stmt1 = null; - PreparedStatement stmt2 = null; - try { - stmt1 = hrDs.getConnection().createStatement(); - - DatabaseMetaData dbMetadata1 = stmt1.getConnection().getMetaData(); - String dbUrl1 = dbMetadata1.getURL(); - writer.println("DB URL : " + dbUrl1 + "\n"); - if (dbUrl1.indexOf("hr_database") == -1) { - throw new Exception("Custom Database [hr_database] is not created while provisioning."); - } - - - ResultSet rs1 = stmt1.executeQuery("SELECT emp_id, emp_name from HR"); - String salQuery = "SELECT emp_sal from SALARY WHERE emp_id = ? "; - stmt2 = salDs.getConnection().prepareStatement(salQuery); - - DatabaseMetaData dbMetadata2 = stmt2.getConnection().getMetaData(); - String dbUrl2 = dbMetadata2.getURL(); - writer.println("DB URL : " + dbUrl2 + "\n"); - if (dbUrl2.indexOf("salary_database") == -1) { - throw new Exception("Custom Database [salary_database] is not created while provisioning."); - } - - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs1.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - stmt2.setInt(1, (Integer) rs1.getObject(1)); - ResultSet rs2 = stmt2.executeQuery(); - while(rs2.next()) { - writer.println(" "); - } - writer.println(""); - } - writer.println("
    " + "Employee Information retrieved" + "
    " + "Employee ID" + "" + "Employee Name" + "" + "Employee Salary" + "
    " + rs1.getObject(1) + "" + rs1.getObject(2) + "" + rs2.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt1 != null) { - try { - stmt1.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (stmt2 != null) { - try { - stmt2.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - } - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index 08025778c4e..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 762346628c2..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/init.hr-service.sql b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/init.hr-service.sql deleted file mode 100644 index 47fe01200a9..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/init.hr-service.sql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE HR ( - emp_id integer not null, - emp_name char(16) -); - -INSERT INTO HR VALUES(101, 'Robert Frost'); -INSERT INTO HR VALUES(102, 'William Blake'); -INSERT INTO HR VALUES(103, 'Edgar Allan Poe'); -INSERT INTO HR VALUES(104, 'W Shakespeare'); -INSERT INTO HR VALUES(105, 'W Wordsworth'); diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/init.salary-service.sql b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/init.salary-service.sql deleted file mode 100644 index 01370ea6b5f..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/init.salary-service.sql +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE SALARY ( - emp_id integer not null, - emp_sal float(7, 2) -); - -INSERT INTO SALARY VALUES(101, 11111.12); -INSERT INTO SALARY VALUES(102, 11221.15); -INSERT INTO SALARY VALUES(101, 31411.16); -INSERT INTO SALARY VALUES(101, 14135.72); -INSERT INTO SALARY VALUES(101, 61114.18); - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/service.properties b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/service.properties deleted file mode 100644 index 0d8217f610e..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/service.properties +++ /dev/null @@ -1,4 +0,0 @@ -salary-service.databases=salary_database -hr-service.databases=hr_database -salary-service.salary_database.init.sql=init.salary-service.sql -hr-service.hr_database.init.sql=init.hr-service.sql diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d4c7051489f..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - EmployeeServlet - org.glassfish.tests.paas.multipleshareddbservicetest.EmployeeServlet - - - EmployeeServlet - /EmployeeServlet - - - - 30 - - - - java:app/jdbc/HrRes - javax.sql.DataSource - - - java:app/jdbc/SalaryRes - javax.sql.DataSource - - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/images/numbers.jpg b/appserver/tests/paas/multiple-db-shared-services/advanced/src/main/webapp/images/numbers.jpg deleted file mode 100644 index 5e90b27ee9722e71092f8a5eb900ec4c8b0ad20f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12810 zcmbW7XEa>V+vrD+9=#hif*^?KCL~%UMDHZgO&Gn79=%J{1QERxz4snQ?~LAunS?Q6 zaQ)x+u6x(IpYFZS+2?#Yd!My`&sopfPrF;Z+WRukdcs)k&=*-l2cGWB&VRFASHcB|B#A? zmX3~&jFN$oo|ciCmX7v6AHl)9UxQCTOh7me;{p^7I_W*n<0%}fC zMM4_w4@6w9v|=I2c@MaiYJ2E(rjR`1AKgNUN$43EnV5MW@jd1jcqZ{&Qc7CpaA?jD|A-afv5VV}bzBBP>XQoejmO-s+n%=(#MP*_x4 zQd;(_uD+qMskx=Kx37O-aA6@9IBX zH~_r=#=3w0H`xEdMRm`Gi;s_oPxK!y99-}F8;=T~fK!x^T2Y(mgDVY}SjYofrR2QY z9%62B9VFdHw@37wc*_ghj9ELW zKbPv3K*13g8(_|#2kXL3A)K?ylQqpAjN;tfVrdtGHNgQai-rrQD~ddZ13^vR{onwT zzbZ(D?{J5f&=3AzwSV+SQ)3iBv1CK+$H&HcO@b|YH0YS2`rBa({#KM>_YGaOc~Qz<#i& zmc@P5O{R8rx6z8uZGiR3i|c3+I$T|%=esH-(H@}1JiCNt;~=jHbx8t7Tc%}o_Ed&$ zNOTroSbZ8YG3pMm^|EwnRZVhDcs8ldZV$4_T`c#W0{r)ETcnRo5bbtT^30s!RnFzR z+L@~J<2lJcoT(!oZp3=pad95iQ`O{9AxNwj{VgAAiU#IOaV<-#xKr5vMy%z-UvVp< zlov3+35TNZk}|aK^Uj*NHYw8 zV+04@;@JaP<#0;uTeAyD19t0-90^7DOvV#a!#oFFnEc}wN)-iC@sqWWB$G^*-^xw%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53*q47gCkq z)SDg7JjxsSA*C;d_4B>;ZB;DWD`?{qREr7n%^cy3fqWR#A<4;Q`zzJ(6vPvRP_aXm zurr?`OD5w_0%h&qxD;QhLuESqgmk$f6->1MeaGKq>wJ0%%(dbm=TVYb+2Fr4K3`%L z&M5p)V@*nKqDH~lPPy9|6jlb=V#>mj+2D`)?Uiu-N?Q~dkl;S(9xTmWa;!`jF;d|9 zT0kfMD#z)X3(7zJ2=jEIHLhvKF)MqmZ_FLy`$R$GNnDK8VqbETY}ABSG2JP=POD!? zcOaMiS!{=icl#^@tPz}kJ?-n(?ua;5ipw>5T$QB(j~>@vd%a)8#;1kijo-~FwIR4E z>=$C4gfV)09*0tDC+GII2$60se3k?HqO*a0GPb#Hlr(*gp^E39thJT-%XyTX%-L9u z_Bex!I@NEwc5de;+v%0Uvn7~trP*StRA)l|X)D`_e4bB4QF(7@A;|f{gbe%qvMUx0 z0>J@UMo&$+v;-8n1vItH;&M7VAcI}?-^9-{Z(#$~jAlM({qDTIeeM}2ldQfmgp&bOKHd8~?r_lCqORmia$1A) zlwAv3#)yB2DcXy+6*kK^IWXBd6Fz_lz?IN`nn>SeD(_DbBN zJuCX4Rd{{kr;jm$25DKWM>+|=kxr&Pjk)!aLtQiuE;W - - - - -

    Warm welcome to the Basic DB with glassfish-resources.xml PaaS sample.

    -

    Deployed servlets:

    -

    CoffeeServlet

    - - diff --git a/appserver/tests/paas/multiple-db-shared-services/advanced/src/test/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeTest.java b/appserver/tests/paas/multiple-db-shared-services/advanced/src/test/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeTest.java deleted file mode 100644 index b86a03f57bd..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/advanced/src/test/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeTest.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.multipleshareddbservicetest; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class EmployeeTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/multiple_shared_db_service_test.war"); - // TODO :: use mvn apis to get the archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - - //2.1. Create the shared DB services - CommandResult createSharedServiceResult = commandRunner.run( - "create-shared-service", "--characteristics", "service-type=Database", - "--configuration", "database.name=hr_database", "--servicetype", - "Database", "hr-service"); - System.out.println("\ncreate-shared-service command output [ " + - createSharedServiceResult.getOutput() + "]"); - - CommandResult createSharedServiceResult1 = commandRunner.run( - "create-shared-service", "--characteristics", "service-type=Database:product-vendor=MySQL", - "--configuration", "database.name=salary_database", "--servicetype", - "Database", "salary-service"); - System.out.println("\ncreate-shared-service command output [ " + - createSharedServiceResult1.getOutput() + "]"); - - //2.2. List services to check for the shared service - CommandResult listSharedServicesResult = commandRunner.run( - "list-services", "--scope", "shared"); - System.out.println("\nlist-services command output [ " - + listSharedServicesResult.getOutput() + "]"); - - //2.3. Deploy app - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/multiple_shared_db_service_test/EmployeeServlet", - "Employee ID"); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/multiple_shared_db_service_test/EmployeeServlet", - "Employee Salary"); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - System.out.println("Destroying the resources created"); - //4.1. Delete Shared DB Service. - CommandResult deleteResult = commandRunner.run( - "delete-shared-service", "hr-service"); - System.out.println("\ndelete-shared-service hr-service command output [" + - deleteResult.getOutput() + "]"); - CommandResult deleteResult = commandRunner.run( - "delete-shared-service", "salary-service"); - System.out.println("\ndelete-shared-service salary-service command output [" + - deleteResult.getOutput() + "]"); - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/README.txt b/appserver/tests/paas/multiple-db-shared-services/basic/README.txt deleted file mode 100644 index 7d0fef4c709..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/README.txt +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test will create 2 jdbc connection pools referring to different shared db services. HR database is located on Derby database whereas Salary database is located on mysql database. - -The init.sql and database.name configurations are specified while creating the shared service using create-shared-service command.A glassfish-resources.xml file is included in the WEB-INF directory that describes the jdbc-connection-pools/jdbc-resources to be used during provisioning. - -The init.sql files are used by the service provisioning engine to load data into respective databases that are created during provisioning. Application reads data from these database tables and prints the contents onto a servlet. - -Please refer ../../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/init.hr-service.sql b/appserver/tests/paas/multiple-db-shared-services/basic/init.hr-service.sql deleted file mode 100644 index 47fe01200a9..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/init.hr-service.sql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE HR ( - emp_id integer not null, - emp_name char(16) -); - -INSERT INTO HR VALUES(101, 'Robert Frost'); -INSERT INTO HR VALUES(102, 'William Blake'); -INSERT INTO HR VALUES(103, 'Edgar Allan Poe'); -INSERT INTO HR VALUES(104, 'W Shakespeare'); -INSERT INTO HR VALUES(105, 'W Wordsworth'); diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/init.salary-service.sql b/appserver/tests/paas/multiple-db-shared-services/basic/init.salary-service.sql deleted file mode 100644 index 51808a357c8..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/init.salary-service.sql +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -CREATE TABLE SALARY ( - emp_id integer not null, - emp_sal float(7, 2) -); - -INSERT INTO SALARY VALUES(101, 11111.12); -INSERT INTO SALARY VALUES(102, 11221.15); -INSERT INTO SALARY VALUES(103, 31411.16); -INSERT INTO SALARY VALUES(104, 14135.72); -INSERT INTO SALARY VALUES(105, 61114.18); - diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/pom.xml b/appserver/tests/paas/multiple-db-shared-services/basic/pom.xml deleted file mode 100644 index 55c818cb18f..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/pom.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - multiple-shared-db-service-test-basic - 4.1-SNAPSHOT - Multiple Shared DB service Basic PaaS application - war - - multiple_shared_db_service_test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - maven-antrun-plugin - - - test - - run - - - - - - - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeServlet.java b/appserver/tests/paas/multiple-db-shared-services/basic/src/main/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeServlet.java deleted file mode 100644 index e95207297f0..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeServlet.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.multipleshareddbservicetest; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.PreparedStatement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class EmployeeServlet extends HttpServlet { - - @Resource(mappedName = "java:app/jdbc/SalaryRes") - private DataSource salDs = null; - - @Resource(mappedName = "java:app/jdbc/HrRes") - private DataSource hrDs = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Multiple Shared DB Service Test"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - writer.println(""); - writer.println(""); - writer.println("

    Multiple Shared DB Service PaaS Application

    "); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (hrDs != null && salDs != null) { - Statement stmt1 = null; - PreparedStatement stmt2 = null; - try { - stmt1 = hrDs.getConnection().createStatement(); - - DatabaseMetaData dbMetadata1 = stmt1.getConnection().getMetaData(); - String dbUrl1 = dbMetadata1.getURL(); - writer.println("DB URL : " + dbUrl1 + "\n"); - if (dbUrl1.indexOf("hr_database") == -1) { - throw new Exception("Custom Database [hr_database] is not created while provisioning."); - } - - - ResultSet rs1 = stmt1.executeQuery("SELECT emp_id, emp_name from HR"); - String salQuery = "SELECT emp_sal from SALARY WHERE emp_id = ? "; - stmt2 = salDs.getConnection().prepareStatement(salQuery); - - DatabaseMetaData dbMetadata2 = stmt2.getConnection().getMetaData(); - String dbUrl2 = dbMetadata2.getURL(); - writer.println("DB URL : " + dbUrl2 + "\n"); - if (dbUrl2.indexOf("salary_database") == -1) { - throw new Exception("Custom Database [salary_database] is not created while provisioning."); - } - - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs1.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - stmt2.setInt(1, (Integer) rs1.getObject(1)); - ResultSet rs2 = stmt2.executeQuery(); - while(rs2.next()) { - writer.println(" "); - } - writer.println(""); - } - writer.println("
    " + "Employee Information retrieved" + "
    " + "Employee ID" + "" + "Employee Name" + "" + "Employee Salary" + "
    " + rs1.getObject(1) + "" + rs1.getObject(2) + "" + rs2.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt1 != null) { - try { - stmt1.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (stmt2 != null) { - try { - stmt2.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - } - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/glassfish-resources.xml b/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/glassfish-resources.xml deleted file mode 100644 index 08025778c4e..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/glassfish-resources.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 762346628c2..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/service.properties b/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/service.properties deleted file mode 100644 index 0d8217f610e..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/service.properties +++ /dev/null @@ -1,4 +0,0 @@ -salary-service.databases=salary_database -hr-service.databases=hr_database -salary-service.salary_database.init.sql=init.salary-service.sql -hr-service.hr_database.init.sql=init.hr-service.sql diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 3a62ff651d0..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d4c7051489f..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - EmployeeServlet - org.glassfish.tests.paas.multipleshareddbservicetest.EmployeeServlet - - - EmployeeServlet - /EmployeeServlet - - - - 30 - - - - java:app/jdbc/HrRes - javax.sql.DataSource - - - java:app/jdbc/SalaryRes - javax.sql.DataSource - - diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/images/numbers.jpg b/appserver/tests/paas/multiple-db-shared-services/basic/src/main/webapp/images/numbers.jpg deleted file mode 100644 index 5e90b27ee9722e71092f8a5eb900ec4c8b0ad20f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12810 zcmbW7XEa>V+vrD+9=#hif*^?KCL~%UMDHZgO&Gn79=%J{1QERxz4snQ?~LAunS?Q6 zaQ)x+u6x(IpYFZS+2?#Yd!My`&sopfPrF;Z+WRukdcs)k&=*-l2cGWB&VRFASHcB|B#A? zmX3~&jFN$oo|ciCmX7v6AHl)9UxQCTOh7me;{p^7I_W*n<0%}fC zMM4_w4@6w9v|=I2c@MaiYJ2E(rjR`1AKgNUN$43EnV5MW@jd1jcqZ{&Qc7CpaA?jD|A-afv5VV}bzBBP>XQoejmO-s+n%=(#MP*_x4 zQd;(_uD+qMskx=Kx37O-aA6@9IBX zH~_r=#=3w0H`xEdMRm`Gi;s_oPxK!y99-}F8;=T~fK!x^T2Y(mgDVY}SjYofrR2QY z9%62B9VFdHw@37wc*_ghj9ELW zKbPv3K*13g8(_|#2kXL3A)K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r&Pjk)!aLtQiuE;W - - - - -

    Warm welcome to the Basic DB with glassfish-resources.xml PaaS sample.

    -

    Deployed servlets:

    -

    CoffeeServlet

    - - diff --git a/appserver/tests/paas/multiple-db-shared-services/basic/src/test/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeTest.java b/appserver/tests/paas/multiple-db-shared-services/basic/src/test/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeTest.java deleted file mode 100644 index 985e69a2874..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/basic/src/test/java/org/glassfish/tests/paas/multipleshareddbservicetest/EmployeeTest.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.multipleshareddbservicetest; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class EmployeeTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/multiple_shared_db_service_test.war"); - // TODO :: use mvn apis to get the archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - CommandRunner commandRunner = glassfish.getCommandRunner(); - try { - - //2.1. Create the shared DB services - CommandResult createSharedServiceResult = commandRunner.run( - "create-shared-service", "--characteristics", "service-type=Database", - "--configuration", "database.name=hr_database:database.init.sql=/tmp/init.hr-service.sql", "--servicetype", - "Database", "hr-service"); - System.out.println("\ncreate-shared-service command output [ " + - createSharedServiceResult.getOutput() + "]"); - - CommandResult createSharedServiceResult1 = commandRunner.run( - "create-shared-service", "--characteristics", "service-type=Database:product-vendor=MySQL", - "--configuration", "database.name=salary_database:database.init.sql=/tmp/init.salary-service.sql", "--servicetype", - "Database", "salary-service"); - System.out.println("\ncreate-shared-service command output [ " + - createSharedServiceResult1.getOutput() + "]"); - - //2.2. List services to check for the shared service - CommandResult listSharedServicesResult = commandRunner.run( - "list-services", "--scope", "shared"); - System.out.println("\nlist-services command output [ " - + listSharedServicesResult.getOutput() + "]"); - - //2.3. Deploy app - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/multiple_shared_db_service_test/EmployeeServlet", - "Employee ID"); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/multiple_shared_db_service_test/EmployeeServlet", - "Employee Salary"); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - System.out.println("Destroying the resources created"); - //4.1. Delete Shared DB Service. - CommandResult deletehrResult = commandRunner.run( - "delete-shared-service", "hr-service"); - System.out.println("\ndelete-shared-service hr-service command output [" + - deletehrResult.getOutput() + "]"); - CommandResult deletesalResult = commandRunner.run( - "delete-shared-service", "salary-service"); - System.out.println("\ndelete-shared-service salary-service command output [" + - deletesalResult.getOutput() + "]"); - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/multiple-db-shared-services/pom.xml b/appserver/tests/paas/multiple-db-shared-services/pom.xml deleted file mode 100644 index c1f00dda6bf..00000000000 --- a/appserver/tests/paas/multiple-db-shared-services/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests.paas - multiple-db-shared-services - 4.1-SNAPSHOT - Multiple DB Shared Services - pom - - basic - advanced - - diff --git a/appserver/tests/paas/multiple-spe-test/README.txt b/appserver/tests/paas/multiple-spe-test/README.txt deleted file mode 100644 index 0726ca25128..00000000000 --- a/appserver/tests/paas/multiple-spe-test/README.txt +++ /dev/null @@ -1,57 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -1. This is a simple PaaS Shared Service test.Re-uses the basic-jpa war. - -The test basically aims at testing the register-service-provisioning-engine command. -The test does the following: - i. Builds a new plugin of type Database (MyDBPlugin which extends DerbyPlugin) and copies into the - $GF_HOME/modules directory. - - Deployment of app should fail. - ii. Registers one of the plugins as the default SPE - iii. Deploys app after making one of the plugins as the default SPE- deployment should succeed. - iv. Unregister the spe - v. Remove the plugin from $GF_HOME/modules. - - This test creates a table ZOO_DIRECTORY which displays the a list of animals when called from the servlet. - -2. The context root for this application is "/basic-spe-test" - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/multiple-spe-test/mydb-plugin/osgi.bundle b/appserver/tests/paas/multiple-spe-test/mydb-plugin/osgi.bundle deleted file mode 100644 index 049b4cd762b..00000000000 --- a/appserver/tests/paas/multiple-spe-test/mydb-plugin/osgi.bundle +++ /dev/null @@ -1,44 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -#DynamicImport-Package: *; resolution:=optional - --exportcontents: \ - org.glassfish.paas.mydbplugin; version=${project.osgi.version} diff --git a/appserver/tests/paas/multiple-spe-test/mydb-plugin/pom.xml b/appserver/tests/paas/multiple-spe-test/mydb-plugin/pom.xml deleted file mode 100644 index 8615ec1b787..00000000000 --- a/appserver/tests/paas/multiple-spe-test/mydb-plugin/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - org.glassfish - paas.plugins - 4.1-SNAPSHOT - - 4.0.0 - org.glassfish - paas.mydbplugin - - 4.1-SNAPSHOT - MyDB Plugin - - - - src/main/java - - **/*.properties - **/*.xml - - - - src/main/resources - - - - - maven-antrun-plugin - - - package - - - - - - - run - - - - - - - - - org.glassfish.hk2 - hk2-core - - - org.glassfish.common - glassfish-api - ${project.version} - - - org.glassfish - paas.orchestrator - ${project.version} - - - org.glassfish.virtualization - virt-api - ${project.version} - - - org.glassfish - paas.javadbplugin - ${project.version} - - - - - - diff --git a/appserver/tests/paas/multiple-spe-test/mydb-plugin/src/main/java/org/glassfish/paas/mydbplugin/MyDBPlugin.java b/appserver/tests/paas/multiple-spe-test/mydb-plugin/src/main/java/org/glassfish/paas/mydbplugin/MyDBPlugin.java deleted file mode 100644 index 15085ff7c2e..00000000000 --- a/appserver/tests/paas/multiple-spe-test/mydb-plugin/src/main/java/org/glassfish/paas/mydbplugin/MyDBPlugin.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.paas.mydbplugin; - -import com.sun.enterprise.util.ExecException; -import com.sun.enterprise.util.OS; -import com.sun.enterprise.util.ProcessExecutor; -import com.sun.logging.LogDomains; -import org.glassfish.internal.api.ServerContext; -import org.glassfish.paas.javadbplugin.DerbyPlugin; -import org.glassfish.virtualization.spi.VirtualMachine; -import javax.inject.Inject; - -import org.jvnet.hk2.annotations.Service; -import org.glassfish.hk2.api.PerLookup; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Properties; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * @author Sandhya Kripalani K - */ -@PerLookup -@Service -public class MyDBPlugin extends DerbyPlugin { - - @Inject - private ServerContext serverContext; - - private String derbyDatabaseName = "sample-db"; - private static final String DERBY_USERNAME = "APP"; - private static final String DERBY_PASSWORD = "APP"; - // TODO :: grab the actual port. - private static final String DERBY_PORT = "1528"; - private static Logger logger = LogDomains.getLogger(MyDBPlugin.class, LogDomains.PAAS_LOGGER); - - public String getDefaultServiceName() { - return "default-myderby-db-service"; - } - - /*@Override - public void executeInitSql(Properties dbProps, String sqlFile) { - try { - logger.log(Level.INFO, "javadb.spe.init_sql.exec.start", sqlFile); - String url = "jdbc:derby://" + dbProps.getProperty(HOST) + ":" + - dbProps.getProperty(PORT) + "/" + - dbProps.getProperty(DATABASENAME) + ";create=true"; - executeAntTask(dbProps, "org.apache.derby.jdbc.ClientDriver", url, sqlFile, true); - logger.log(Level.INFO, "javadb.spe.init_sql.exec.stop", sqlFile); - } catch (Exception ex) { - Object[] args = new Object[]{sqlFile, ex}; - logger.log(Level.WARNING, "javadb.spe.init_sql.fail.ex", args); - } - } - - @Override - public void createDatabase(Properties dbProps) { - try { - logger.log(Level.INFO, "javadb.spe.custom_db_creation.exec.start", dbProps.getProperty(DATABASENAME)); - String url = "jdbc:derby://" + dbProps.getProperty(HOST) + ":" + - dbProps.getProperty(PORT) + "/" + - dbProps.getProperty(DATABASENAME) + ";create=true"; - String sql = "VALUES(1)"; - executeAntTask(dbProps, "org.apache.derby.jdbc.ClientDriver", url, sql, false); - logger.log(Level.INFO, "javadb.spe.custom_db_creation.exec.stop", dbProps.getProperty(DATABASENAME)); - } catch (Exception ex) { - Object[] args = new Object[]{dbProps.getProperty(DATABASENAME), ex}; - logger.log(Level.WARNING, "javadb.spe.custom_db_creation.fail.ex", args); - } - } */ - - @Override - protected Properties getServiceProperties(String ipAddress) { - Properties serviceProperties = new Properties(); - serviceProperties.put(USER, DERBY_USERNAME); - serviceProperties.put(PASSWORD, DERBY_PASSWORD); - serviceProperties.put(HOST, ipAddress); - serviceProperties.put(PORT, DERBY_PORT); - serviceProperties.put(DATABASENAME, getDatabaseName()); - serviceProperties.put("CONNECTIONATTRIBUTES", ";create=true"); - serviceProperties.put(RESOURCE_TYPE, "javax.sql.XADataSource"); - serviceProperties.put(CLASSNAME, "org.apache.derby.jdbc.ClientXADataSource"); - return serviceProperties; - } - - /*protected void setDatabaseName(String databaseName) { - derbyDatabaseName = databaseName; - } - - protected String getDatabaseName() { - return derbyDatabaseName; - }*/ - - public void startDatabase(VirtualMachine virtualMachine) { - //Non native mode - if (virtualMachine.getMachine() != null) { - runAsadminCommand(virtualMachine, "start-database", "--dbport", "1528"); - } else { //Native mode - start(virtualMachine, false); - } - } - - public void stopDatabase(VirtualMachine virtualMachine) { - //Non native mode - if (virtualMachine.getMachine() != null) { - runAsadminCommand(virtualMachine, "stop-database", "--dbport", "1528"); - } else { //Native mode - stop(virtualMachine); - } - } - - public void start(VirtualMachine virtualMachine, boolean firstStart) { - - String[] startdbArgs = {serverContext.getInstallRoot().getAbsolutePath() + - File.separator + "bin" + File.separator + "asadmin" + (OS.isWindows() ? ".bat" : ""), "start-database", "--dbport", "1528"}; - ProcessExecutor startDatabase = new ProcessExecutor(startdbArgs); - - try { - startDatabase.execute(); - } catch (ExecException e) { - e.printStackTrace(); - } - } - - public void stop(VirtualMachine virtualMachine) { - - String[] stopdbArgs = {serverContext.getInstallRoot().getAbsolutePath() + - File.separator + "bin" + File.separator + "asadmin" + (OS.isWindows() ? ".bat" : ""), "stop-database", "--dbport", "1528"}; - ProcessExecutor stopDatabase = new ProcessExecutor(stopdbArgs); - - try { - stopDatabase.execute(); - } catch (ExecException e) { - e.printStackTrace(); - } - } - - public void runAsadminCommand(VirtualMachine virtualMachine, String... parameters) { - if (virtualMachine.getMachine() == null) { - return; - } - String installDir = virtualMachine.getProperty(VirtualMachine.PropertyName.INSTALL_DIR); - List args = new ArrayList(); - String asadmin = installDir + File.separator + "glassfish" + - File.separator + "bin" + File.separator + "asadmin "; - args.add(asadmin); - args.addAll(Arrays.asList(parameters)); - - try { - String output = virtualMachine.executeOn(args.toArray(new String[args.size()])); - Object[] params = new Object[]{virtualMachine.getName(), output}; - logger.log(Level.INFO, "javadb.spe.asadmin_cmd_exec", params); - } catch (IOException e) { - Object[] params = new Object[]{parameters.toString(), e}; - logger.log(Level.WARNING, "javadb.spe.command_execution.fail.ex", params); - } catch (InterruptedException e) { - Object[] params = new Object[]{parameters.toString(), e}; - logger.log(Level.WARNING, "javadb.spe.command_execution.fail.ex", params); - } - } -} diff --git a/appserver/tests/paas/multiple-spe-test/pom.xml b/appserver/tests/paas/multiple-spe-test/pom.xml deleted file mode 100644 index 243be00bd33..00000000000 --- a/appserver/tests/paas/multiple-spe-test/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests.paas - multiple-spe-test - 4.1-SNAPSHOT - Multiple SPE TesT - pom - - mydb-plugin - spetest - - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/pom.xml b/appserver/tests/paas/multiple-spe-test/spetest/pom.xml deleted file mode 100644 index 73b825190c9..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/pom.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - basic-spe-test - 4.1-SNAPSHOT - Basic SPE Test - war - - basic-spe-test - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - maven-antrun-plugin - - - post-integration-test - - - - - - - run - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - jakarta.persistence - jakarta.persistence-api - 2.2.2 - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/java/org/glassfish/tests/paas/spetest/Animal.java b/appserver/tests/paas/multiple-spe-test/spetest/src/main/java/org/glassfish/tests/paas/spetest/Animal.java deleted file mode 100644 index 61ba29d65af..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/java/org/glassfish/tests/paas/spetest/Animal.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.spetest; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import java.io.Serializable; - - -/** - * - * @author ishan.vishnoi@java.net - */ -@Entity -@Table(name = "ZOO_DIRECTORY") -public class Animal implements Serializable { - - @Id - private int ID; - - private String name; - - private String species; - - private String cageNumber; - - private String yearOfBirth; - - public int getID() { - return ID; - } - - public void setID(int ID) { - this.ID = ID; - } - - public String getCageNumber() { - return cageNumber; - } - - public void setCageNumber(String cageNumber) { - this.cageNumber = cageNumber; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getSpecies() { - return species; - } - - public void setSpecies(String species) { - this.species = species; - } - - public String getYearOfBirth() { - return yearOfBirth; - } - - public void setYearOfBirth(String yearOfBirth) { - this.yearOfBirth = yearOfBirth; - } - - @Override - public String toString() { - return "entity.NewEntity[id=" + ID + "]"; - } - -} diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/java/org/glassfish/tests/paas/spetest/BasicJPAPaaSServlet.java b/appserver/tests/paas/multiple-spe-test/spetest/src/main/java/org/glassfish/tests/paas/spetest/BasicJPAPaaSServlet.java deleted file mode 100644 index 0c7d434cfb7..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/java/org/glassfish/tests/paas/spetest/BasicJPAPaaSServlet.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package org.glassfish.tests.paas.spetest; - -import javax.annotation.Resource; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceUnit; -import javax.persistence.Query; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.transaction.UserTransaction; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Iterator; -import java.util.List; - -//import javax.management.*; - -/** - * - * @author ishan.vishnoi@java.net - */ -public class BasicJPAPaaSServlet extends HttpServlet { - - @PersistenceUnit(unitName = "BasicJPAPU") - private EntityManagerFactory emf; - @Resource - UserTransaction utx; - - /** - * Processes requests for both HTTP GET and POST methods. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/html;charset=UTF-8"); - PrintWriter out = response.getWriter(); - Animal firstAnimal = new Animal(); - firstAnimal.setName("Shera"); - firstAnimal.setCageNumber("A1"); - firstAnimal.setID(1); - firstAnimal.setSpecies("Lion"); - firstAnimal.setYearOfBirth("2001"); - Boolean x = addAnimal(firstAnimal); - Animal secondAnimal = new Animal(); - secondAnimal.setName("Bhola"); - secondAnimal.setCageNumber("A2"); - secondAnimal.setID(2); - secondAnimal.setSpecies("Bear"); - secondAnimal.setYearOfBirth("2004"); - x = addAnimal(secondAnimal); - Animal thirdAnimal = new Animal(); - thirdAnimal.setName("Ringa"); - thirdAnimal.setCageNumber("A3"); - thirdAnimal.setID(3); - thirdAnimal.setSpecies("Rhino"); - thirdAnimal.setYearOfBirth("2007"); - x = addAnimal(thirdAnimal); - - try { - out.println(""); - out.println(""); - out.println(""); - out.println("Servlet NewServlet"); - out.println(""); - out.println(""); - out.println("Here is a list of animals in the zoo."); - - List dir = sortByName(); - Iterator dirIterator = dir.iterator(); - out.println(""); - - while (dirIterator.hasNext()) { - out.println(""); - Animal animal = (Animal) dirIterator.next(); - - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - } - - out.println("
    id:" + animal.getID() + " name:" + animal.getName() + " species:" + animal.getSpecies() + " cage_number:" + animal.getCageNumber() + " year_of_birth:" + animal.getYearOfBirth() + "
    "); - - out.println("
    Back"); - out.println(""); - out.println(""); - } finally { - out.close(); - } - } - - public List sortByName() { - EntityManager em = emf.createEntityManager(); - Query q = em.createQuery("SELECT x FROM Animal x order by x.name"); - List results = q.getResultList(); - return (results); - } - - public boolean addAnimal(Animal animal) { - EntityManager em = emf.createEntityManager(); - try { - utx.begin(); - em.persist(animal); - utx.commit(); - } finally { - em.close(); - return false; - } - } - - // - /** - * Handles the HTTP GET method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws java.io.IOException if an I/O error occurs - */ - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Returns a short description of the servlet. - * @return a String containing servlet description - */ - @Override - public String getServletInfo() { - return "Short description"; - }// -} diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/META-INF/MANIFEST.MF b/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce4a2..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml b/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml deleted file mode 100644 index ea51714d804..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - org.eclipse.persistence.jpa.PersistenceProvider - jdbc/__multiple_spe_paas_sample - - - - - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index f34f9f997ab..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index fe7bef6fc17..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index c7ea546e9a9..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - javax.faces.PROJECT_STAGE - Development - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - list - org.glassfish.tests.paas.spetest.BasicJPAPaaSServlet - - - Faces Servlet - /faces/* - - - list - /list - - - - 30 - - - - index.jsp - - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/index.html b/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/index.html deleted file mode 100644 index 32a527fab3d..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the basic PaaS sample.

    -

    Deployed servlets:

    -

    BasicPaaSServlet

    - - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/index.jsp b/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/index.jsp deleted file mode 100644 index dd587c081d4..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/index.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%-- - Document : index - Created on : Nov 8, 2011, 4:59:56 PM - Author : ishan ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - - - - - - - Zoo Directory - - -

    Zoo Directory

    - Get a sorted list of all animals and their details -
    - - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/newcss.css b/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/newcss.css deleted file mode 100644 index d4450236359..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/main/webapp/newcss.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - Document : newcss - Created on : 9 Nov, 2011, 3:26:45 PM - Author : ishan - Description: - Purpose of the stylesheet follows. -*/ - -body { - background-color: #ffffff; - font-size: 12px; - font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - color: #000000; - margin: 10px; -} - -h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - border-bottom: 1px solid #AFAFAF; - font-size: 16px; - font-weight: bold; - margin: 0px; - padding: 0px; - color: #D20005; -} - -a:link, a:visited { - color: #045491; - font-weight : bold; - text-decoration: none; -} - -a:link:hover, a:visited:hover { - color: #045491; - font-weight : bold; - text-decoration : underline; -} - -th { - font-weight: bold; - text-align: center; -} - -td { - text-align: center; -} - diff --git a/appserver/tests/paas/multiple-spe-test/spetest/src/test/java/org/glassfish/tests/paas/spetest/MultipleSPETest.java b/appserver/tests/paas/multiple-spe-test/spetest/src/test/java/org/glassfish/tests/paas/spetest/MultipleSPETest.java deleted file mode 100644 index cb2626f928b..00000000000 --- a/appserver/tests/paas/multiple-spe-test/spetest/src/test/java/org/glassfish/tests/paas/spetest/MultipleSPETest.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.spetest; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.api.ActionReport; -import org.glassfish.api.admin.ParameterMap; -import org.glassfish.internal.api.Globals; -import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.paas.orchestrator.PaaSDeploymentException; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.lang.Exception; -import java.lang.System; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Sandhya Kripalani - */ - -public class MultipleSPETest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS-bookstore application. Deployment should fail - File archive = new File(System.getProperty("basedir") - + "/target/basic-spe-test.war"); // TODO :: use mvn apis to get the - // archive location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNull(appName); - } catch (Exception e) { - System.out.println("$$$$$$$$$$$$$$$$Exception$$$$$$"); - } finally { - - //3. Register one of the plugins as the default S.P.E - ServiceLocator habitat = Globals.getDefaultHabitat(); - org.glassfish.api.admin.CommandRunner commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - ActionReport report = habitat.getService(ActionReport.class); - - org.glassfish.api.admin.CommandRunner.CommandInvocation invocation = commandRunner.getCommandInvocation("register-service-provisioning-engine", report); - ParameterMap parameterMap = new ParameterMap(); - - parameterMap.add("type", "Database"); - parameterMap.add("defaultservice", "true"); - parameterMap.add("DEFAULT", "org.glassfish.paas.mydbplugin.MyDBPlugin"); - - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.println("Registered a default SPE :" + !report.hasFailures()); - - //4. Deploy the application. Deployment should succeed. - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - // 5. Access the app to make sure PaaS-basic-shared-service-test app is correctly - // provisioned. - - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - get("http://" + instanceIP + ":" + HTTP_PORT - + "/basic-spe-test/list", "Here is a list of animals in the zoo."); - - //Retrieve the port number used by the connection pool - invocation=commandRunner.getCommandInvocation("get", report); - parameterMap = new ParameterMap(); - - parameterMap.add("DEFAULT", "server.resources.jdbc-connection-pool.jdbc/__multiple_spe_paas_sample.property.PortNumber"); - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err.println("Couldn't varify whether undeploy succeeded"); - } - } - commandRunner = habitat.getService(org.glassfish.api.admin.CommandRunner.class); - invocation = commandRunner.getCommandInvocation("unregister-service-provisioning-engine", report); - parameterMap = new ParameterMap(); - parameterMap.add("DEFAULT", "org.glassfish.paas.mydbplugin.MyDBPlugin"); - - invocation.parameters(parameterMap).execute(); - - Assert.assertFalse(report.hasFailures()); - System.out.println("Unregistered the default SPE :" + !report.hasFailures()); - } - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } - -} diff --git a/appserver/tests/paas/native_lb_setup.sh b/appserver/tests/paas/native_lb_setup.sh deleted file mode 100755 index 02d06715725..00000000000 --- a/appserver/tests/paas/native_lb_setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# -GF_HOME=${GF_HOME:-$S1AS_HOME} -echo "Your GlassFish is at $GF_HOME" -$GF_HOME/bin/asadmin start-domain -$GF_HOME/bin/asadmin create-ims-config-native -$GF_HOME/bin/asadmin create-template --indexes ServiceType=LB,VirtualizationType=Native LBNative -$GF_HOME/bin/asadmin create-template --indexes ServiceType=MQ,VirtualizationType=Native MQNative -$GF_HOME/bin/asadmin stop-domain - diff --git a/appserver/tests/paas/native_setup.sh b/appserver/tests/paas/native_setup.sh deleted file mode 100755 index 1bc9477f685..00000000000 --- a/appserver/tests/paas/native_setup.sh +++ /dev/null @@ -1,44 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# -GF_HOME=${GF_HOME:-$S1AS_HOME} -echo "Your GlassFish is at $GF_HOME" -$GF_HOME/bin/asadmin start-domain --debug -$GF_HOME/bin/asadmin create-ims-config-native -$GF_HOME/bin/asadmin stop-domain diff --git a/appserver/tests/paas/ovm_setup.sh b/appserver/tests/paas/ovm_setup.sh deleted file mode 100644 index 392ae57e89d..00000000000 --- a/appserver/tests/paas/ovm_setup.sh +++ /dev/null @@ -1,63 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# -GF_HOME=${GF_HOME:-$S1AS_HOME} -export PATH=$GF_HOME/bin:$PATH -TEMPLATES_DIR=/tmp -CONNECTION_STRING=http://adminUser:adminPassword@hostName:port;rootUser:rootPassword -POOL_SUBNET=xx.xx.xxx.xx/xx -ORACLE_USER=oracle -ORACLE_GROUP=oracleGroup - -asadmin start-domain domain1 - -asadmin create-ims-config-ovm --connectionstring $CONNECTION_STRING ovm -asadmin create-server-pool --subnet $POOL_SUBNET --portname "foobar" --virtualization ovm pool2 - -asadmin create-template --files $TEMPLATES_DIR/GLASSFISH_TINY.tgz --indexes ServiceType=JavaEE,VirtualizationType=OVM GLASSFISH_TINY -asadmin create-template-user --virtualization ovm --userid glassfish --groupid glassfish --template GLASSFISH_TINY glassfish - -asadmin create-template --files $TEMPLATES_DIR/ORACLEDB.tgz --indexes ServiceType=Database,VirtualizationType=OVM ORACLE_DATABASE -asadmin create-template-user --virtualization ovm --userid $ORACLE_USER --groupid $ORACLE_GROUP --template ORACLE_DATABASE oracle - -#asadmin create-template --files $TEMPLATES_DIR/DERBY_DATABASE.tgz --indexes ServiceType=Database,VirtualizationType=OVM DERBY_DATABASE -#asadmin create-template-user --virtualization ovm --userid glassfish --groupid glassfish --template DERBY_DATABASE glassfish - -#asadmin create-template --files $TEMPLATES_DIR/OTD_LARGE.tgz --properties vendor-name=otd --indexes ServiceType=LB,VirtualizationType=OVM otd-new -#asadmin create-template-user --virtualization ovm --userid 1000 --groupid 1000 --template otd-new cloud diff --git a/appserver/tests/paas/pom.xml b/appserver/tests/paas/pom.xml deleted file mode 100644 index 12f0b21af7c..00000000000 --- a/appserver/tests/paas/pom.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests - paas - 4.1-SNAPSHOT - PaaS samples - pom - - - - - native - - true - - - basic - service_metadata - basic-db - bookstore - basic-db-initsql - scale_service - deployment-rollback - enable-disable-test - basic-jpa - basic-shared-service-test - external-and-shared-service - ext-shared-service-enable-disable-test - multiple-spe-test - basic-db-with-resources-xml - basic-db-teardown-sql - basic-service-discovery - javaee_shared_service - lazy-shared-service-test - external-db-service - appscoped-db-with-resources-xml - basic-bookstore-dns - - - - - - - kvm-derby - - - basic - service_metadata/custom_db_name - basic-db - bookstore - basic-db-initsql - basic-jpa - basic-db-with-resources-xml - basic-db-teardown-sql - multiple-db-app-scoped-services/basic - external-db-service - appscoped-db-with-resources-xml - javaee_shared_service - scale_service - - - - - kvm-mysql - - basic - service_metadata/custom_db_name - bookstore - basic-db-initsql - basic-jpa - basic-db-with-resources-xml - basic-db-teardown-sql - multiple-db-app-scoped-services/basic - external-db-service - appscoped-db-with-resources-xml - javaee_shared_service - scale_service - - - - - ovm-derby - - - basic - service_metadata/custom_db_name - basic-db - bookstore - basic-db-initsql - basic-jpa - basic-db-with-resources-xml - basic-db-teardown-sql - appscoped-db-with-resources-xml - external-db-service - javaee_shared_service - scale_service - - - - - ovm-odb - - - basic - service_metadata/custom_db_name - bookstore - basic-db-initsql - basic-jpa - basic-db-with-resources-xml - basic-db-teardown-sql - appscoped-db-with-resources-xml - external-db-service - javaee_shared_service - scale_service - - - - - - - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.9 - - ${env.PAAS_TESTS_HOME}/reports - PaasTestReport - - ${env.PAAS_TESTS_HOME}/basic/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/service_metadata/provision_using_specified_template/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/service_metadata/custom_db_name/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/basic-db/target/surefire-reports - ${env.PAAS_TESTS_HOME}/bookstore/target/surefire-reports - ${env.PAAS_TESTS_HOME}/basic-db-initsql/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/scale_service/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/deployment-rollback/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/enable-disable-test/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/basic-jpa/target/surefire-reports - ${env.PAAS_TESTS_HOME}/basic-shared-service-test/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/external-and-shared-service/target/surefire-reports - - - ${env.PAAS_TESTS_HOME}/ext-shared-service-enable-disable-test/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/multiple-spe-test/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/basic-db-with-resources-xml/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/basic-db-teardown-sql/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/basic-service-discovery/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/javaee_shared_service/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/lazy-shared-service-test/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/appscoped-db-with-resources-xml/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/external-db-service/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/mq-shared-service-test/target/surefire-reports - - ${env.PAAS_TESTS_HOME}/basic-bookstore-dns/target/surefire-reports - - - - - - - - diff --git a/appserver/tests/paas/scale_service/README.txt b/appserver/tests/paas/scale_service/README.txt deleted file mode 100644 index a307d67b380..00000000000 --- a/appserver/tests/paas/scale_service/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This tests the manual scaling up/down of GlassFish service. - -Please refer ../README.txt for more generic guidelines. diff --git a/appserver/tests/paas/scale_service/pom.xml b/appserver/tests/paas/scale_service/pom.xml deleted file mode 100644 index ad7ff2543bb..00000000000 --- a/appserver/tests/paas/scale_service/pom.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - scale_service - 4.1-SNAPSHOT - Scale Service PaaS sample - war - - scale_service - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - org.apache.maven.plugins - maven-war-plugin - - false - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/scale_service/src/main/java/org/glassfish/tests/paas/scale_service/ScaleServicePaaSServlet.java b/appserver/tests/paas/scale_service/src/main/java/org/glassfish/tests/paas/scale_service/ScaleServicePaaSServlet.java deleted file mode 100644 index cc5f41f3b30..00000000000 --- a/appserver/tests/paas/scale_service/src/main/java/org/glassfish/tests/paas/scale_service/ScaleServicePaaSServlet.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.scale_service; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Enumeration; - -@WebServlet(name = "ScaleServicePaaSServlet", urlPatterns = "/ScaleServicePaaSServlet/*") -public final class ScaleServicePaaSServlet extends HttpServlet { - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Simple Servlet"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Simple Servlet

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - writer.println(""); - writer.println(""); - } - -} - diff --git a/appserver/tests/paas/scale_service/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/scale_service/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 884c466533f..00000000000 --- a/appserver/tests/paas/scale_service/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/scale_service/src/main/webapp/index.html b/appserver/tests/paas/scale_service/src/main/webapp/index.html deleted file mode 100644 index 7e730409de2..00000000000 --- a/appserver/tests/paas/scale_service/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the Scale Service PaaS sample.

    -

    Deployed servlets:

    -

    ScaleServicePaaSServlet

    - - diff --git a/appserver/tests/paas/scale_service/src/test/java/org/glassfish/tests/paas/scale_service/ScaleServicePaaSTest.java b/appserver/tests/paas/scale_service/src/test/java/org/glassfish/tests/paas/scale_service/ScaleServicePaaSTest.java deleted file mode 100644 index 70d5ec78ee2..00000000000 --- a/appserver/tests/paas/scale_service/src/test/java/org/glassfish/tests/paas/scale_service/ScaleServicePaaSTest.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.scale_service; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author bhavanishankar@dev.java.net - */ - -public class ScaleServicePaaSTest { - - @Test - public void test() throws Exception { - - // Bootstrap GlassFish DAS in embedded mode. - GlassFish glassfish = bootstrap(); - - // Deploy the PaaS app and verify it. - runTests(glassfish); - - // Re-deploy the PaaS app and verify it. - String testScenarios = System.getProperty("test.scenarios"); - if (testScenarios == null - || "all".contains(testScenarios.toLowerCase())) { - runTests(glassfish); - } - - // 5. Stop the GlassFish DAS - glassfish.dispose(); - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private void runTests(GlassFish glassfish) throws Exception { - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/scale_service.war"); // TODO :: use mvn apis to - // get the archive location. - Assert.assertTrue(archive.exists()); - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - - - get("http://" + instanceIP +":" + HTTP_PORT - + "/scale_service/ScaleServicePaaSServlet", - "Request headers from the request:"); - - // test scale up. TODO :: make sure app is accessible from the scaled instance - result = commandRunner.run("_scale-service", "--servicename=scaleservice", - "--scalecount=1", "--appname=scale_service"); - System.out.println("Output of scale up service [ " + result.getOutput() + "]"); - result = commandRunner.run("list-services"); - System.out.println("Output of list-services after scaling up [ " + result.getOutput() + "]"); - String[] strings = result.getOutput().split("JavaEE"); - System.out.println("Number of Java EE services " + strings.length); - Assert.assertEquals(4, strings.length); - - // test scale down. TODO :: make sure app is no longer accessible from the scaled down instance - result = commandRunner.run("_scale-service", "--servicename=scaleservice", - "--scalecount=-1", "--appname=scale_service"); - System.out.println("Output of scale down service [ " + result.getOutput() + "]"); - result = commandRunner.run("list-services"); - System.out.println("Output of list-services after scaling down [ " + result.getOutput() + "]"); - strings = result.getOutput().split("JavaEE"); - System.out.println("Number of Java EE services " + strings.length); - Assert.assertEquals(3, strings.length); - - // 4. Undeploy the PaaS application . TODO :: use cloud-undeploy?? - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.err.println("Undeployed [" + appName + "]"); - try { - boolean undeployClean = false; - CommandResult commandResult = glassfish.getCommandRunner() - .run("list-services"); - if (commandResult.getOutput().contains("Nothing to list.")) { - undeployClean = true; - } - Assert.assertTrue(undeployClean); - } catch (Exception e) { - System.err - .println("Couldn't varify whether undeploy succeeded"); - } - } - } - - } - - private GlassFish bootstrap() throws Exception { - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - return glassfish; - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/service_metadata/custom_db_name/README.txt b/appserver/tests/paas/service_metadata/custom_db_name/README.txt deleted file mode 100644 index 981aa46d3c0..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/README.txt +++ /dev/null @@ -1,45 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -This test verifies the creation of a custom database when database name is specified in the glassfish-services.xml file. - -The tables listed in the initsql.sql file are created and loaded with data in the new database, as is evident from the output of the Servlet. - -Please refer ../README.txt for more generic guidelines on how to run this test. diff --git a/appserver/tests/paas/service_metadata/custom_db_name/initsql.sql b/appserver/tests/paas/service_metadata/custom_db_name/initsql.sql deleted file mode 100644 index ad14bc5140c..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/initsql.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE customer ( - c_id integer not null, - c_name char(16) -); - -INSERT INTO customer VALUES(1, 'xxxx'); -INSERT INTO customer VALUES(2, 'rrrr'); -INSERT INTO customer VALUES(3, 'eeee'); -INSERT INTO customer VALUES(4, 'yyyy'); -INSERT INTO customer VALUES(5, 'zzzz'); diff --git a/appserver/tests/paas/service_metadata/custom_db_name/pom.xml b/appserver/tests/paas/service_metadata/custom_db_name/pom.xml deleted file mode 100644 index 3d4c5c9f3f4..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - custom_db_name - 4.1-SNAPSHOT - Custom DB Name PaaS sample - war - - custom_db_name_paas_sample - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - maven-antrun-plugin - - - test - - run - - - - - - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/service_metadata/custom_db_name/src/main/java/org/glassfish/tests/paas/customdbname/CustomDBNameServlet.java b/appserver/tests/paas/service_metadata/custom_db_name/src/main/java/org/glassfish/tests/paas/customdbname/CustomDBNameServlet.java deleted file mode 100644 index d9111d782a7..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/src/main/java/org/glassfish/tests/paas/customdbname/CustomDBNameServlet.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.customdbname; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.DatabaseMetaData; -import java.util.Enumeration; -import javax.annotation.Resource; - - -public final class CustomDBNameServlet extends HttpServlet { - - @Resource(mappedName = "jdbc/__custom_db_name_paas_sample") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Custom DB Name PaaS Application"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Custom DB Name PaaS Application

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - - DatabaseMetaData dbMetadata = stmt.getConnection().getMetaData(); - String dbUrl = dbMetadata.getURL(); - writer.println("DB URL : " + dbUrl + "\n"); - if(dbUrl.indexOf("foobar") == -1) { - throw new Exception("Custom Database [foobar] is not created while provisioning."); - } - - - ResultSet rs = stmt.executeQuery("SELECT c_id, c_name from customer"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "Data retrieved from table \"customer\"" + "
    " + "Customer ID" + "" + "Customer Name" + "
    " + rs.getObject(1) + "" + rs.getObject(2) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 2ba64bc4843..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index 626dec4b9df..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - jdbc/__custom_db_name_paas_sample - jdbc/__custom_db_name_paas_sample - - diff --git a/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/web.xml b/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 92f004f904d..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - CustomDBNameServlet - org.glassfish.tests.paas.customdbname.CustomDBNameServlet - - - CustomDBNameServlet - /CustomDBNameServlet - - - - 30 - - - - jdbc/__custom_db_name_paas_sample - javax.sql.DataSource - - - diff --git a/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/index.html b/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/index.html deleted file mode 100644 index 309e4f4076c..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/src/main/webapp/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -

    Warm welcome to the Custom DB Name PaaS sample.

    -

    Deployed servlets:

    -

    CustomDBNameServlet

    - - diff --git a/appserver/tests/paas/service_metadata/custom_db_name/src/test/java/org/glassfish/tests/paas/customdbname/CustomDBNameTest.java b/appserver/tests/paas/service_metadata/custom_db_name/src/test/java/org/glassfish/tests/paas/customdbname/CustomDBNameTest.java deleted file mode 100644 index a6fce4c850c..00000000000 --- a/appserver/tests/paas/service_metadata/custom_db_name/src/test/java/org/glassfish/tests/paas/customdbname/CustomDBNameTest.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.customdbname; - -import junit.framework.Assert; -import org.glassfish.embeddable.CommandResult; -import org.glassfish.embeddable.CommandRunner; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.glassfish.embeddable.Deployer; -import org.junit.Test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Shalini M - */ - -public class CustomDBNameTest { - - @Test - public void test() throws Exception { - - // 1. Bootstrap GlassFish DAS in embedded mode. - GlassFishProperties glassFishProperties = new GlassFishProperties(); - glassFishProperties.setInstanceRoot(System.getenv("S1AS_HOME") - + "/domains/domain1"); - glassFishProperties.setConfigFileReadOnly(false); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish( - glassFishProperties); - PrintStream sysout = System.out; - glassfish.start(); - System.setOut(sysout); - - // 2. Deploy the PaaS application. - File archive = new File(System.getProperty("basedir") - + "/target/custom_db_name_paas_sample.war"); // TODO :: use mvn - // apis to get - // the archive - // location. - Assert.assertTrue(archive.exists()); - - Deployer deployer = null; - String appName = null; - try { - deployer = glassfish.getDeployer(); - appName = deployer.deploy(archive); - - System.err.println("Deployed [" + appName + "]"); - Assert.assertNotNull(appName); - - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult result = commandRunner.run("list-services"); - System.out.println("\nlist-services command output [ " - + result.getOutput() + "]"); - - // 3. Access the app to make sure PaaS app is correctly provisioned. - String HTTP_PORT = (System.getProperty("http.port") != null) ? System - .getProperty("http.port") : "28080"; - - String instanceIP = getLBIPAddress(glassfish); - get("http://" + instanceIP + ":" + HTTP_PORT - + "/custom_db_name_paas_sample/CustomDBNameServlet", - "Customer ID"); - - // 4. Undeploy the PaaS application . - } finally { - if (appName != null) { - deployer.undeploy(appName); - System.out.println("Destroying the resources created"); - System.err.println("Undeployed [" + appName + "]"); - } - } - - } - - private void get(String urlStr, String result) throws Exception { - URL url = new URL(urlStr); - URLConnection yc = url.openConnection(); - System.out.println("\nURLConnection [" + yc + "] : "); - BufferedReader in = new BufferedReader(new InputStreamReader( - yc.getInputStream())); - String line = null; - boolean found = false; - while ((line = in.readLine()) != null) { - System.out.println(line); - if (line.indexOf(result) != -1) { - found = true; - } - } - Assert.assertTrue(found); - System.out.println("\n***** SUCCESS **** Found [" + result - + "] in the response.*****\n"); - } - - private String getLBIPAddress(GlassFish glassfish) { - String lbIP = null; - String IPAddressPattern = "IP-ADDRESS\\s*\n*(.*)\\s*\n(([01]?\\d*|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." - + "([0-9]?\\d\\d?|2[0-4]\\d|25[0-5]))"; - try { - CommandRunner commandRunner = glassfish.getCommandRunner(); - String result = commandRunner - .run("list-services", "--type", "LB", - "--output", "IP-ADDRESS").getOutput().toString(); - if (result.contains("Nothing to list.")) { - result = commandRunner - .run("list-services", "--type", "JavaEE", "--output", - "IP-ADDRESS").getOutput().toString(); - - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - } else { - Pattern p = Pattern.compile(IPAddressPattern); - Matcher m = p.matcher(result); - if (m.find()) { - lbIP = m.group(2); - } else { - lbIP = "localhost"; - } - - } - - } catch (Exception e) { - System.out.println("Regex has thrown an exception " - + e.getMessage()); - return "localhost"; - } - return lbIP; - } -} diff --git a/appserver/tests/paas/service_metadata/pom.xml b/appserver/tests/paas/service_metadata/pom.xml deleted file mode 100644 index 680f7ed9158..00000000000 --- a/appserver/tests/paas/service_metadata/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - 4.0.0 - org.glassfish.tests.paas - service_metadata - 4.1-SNAPSHOT - Service Metadata PaaS samples - pom - - provision_using_specified_template - custom_db_name - - diff --git a/appserver/tests/paas/service_metadata/provision_using_specified_template/README.txt b/appserver/tests/paas/service_metadata/provision_using_specified_template/README.txt deleted file mode 100644 index 7fb311440f0..00000000000 --- a/appserver/tests/paas/service_metadata/provision_using_specified_template/README.txt +++ /dev/null @@ -1,41 +0,0 @@ -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -# -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common Development -# and Distribution License("CDDL") (collectively, the "License"). You -# may not use this file except in compliance with the License. You can -# obtain a copy of the License at -# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -# or packager/legal/LICENSE.txt. See the License for the specific -# language governing permissions and limitations under the License. -# -# When distributing the software, include this License Header Notice in each -# file and include the License file at packager/legal/LICENSE.txt. -# -# GPL Classpath Exception: -# Oracle designates this particular file as subject to the "Classpath" -# exception as provided by Oracle in the GPL Version 2 section of the License -# file that accompanied this code. -# -# Modifications: -# If applicable, add the following below the License Header, with the fields -# enclosed by brackets [] replaced by your own identifying information: -# "Portions Copyright [year] [name of copyright owner]" -# -# Contributor(s): -# If you wish your version of this file to be governed by only the CDDL or -# only the GPL Version 2, indicate your decision by adding "[Contributor] -# elects to include this software in this distribution under the [CDDL or GPL -# Version 2] license." If you don't indicate a single choice of license, a -# recipient has the option to distribute your version of this file under -# either the CDDL, the GPL Version 2 or to extend the choice of license to -# its licensees as provided above. However, if you add GPL Version 2 code -# and therefore, elected the GPL Version 2 license, then the option applies -# only if the new code is made subject to such option by the copyright -# holder. -# - -Please refer ../README.txt for more generic guidelines on how to run this test. diff --git a/appserver/tests/paas/service_metadata/provision_using_specified_template/pom.xml b/appserver/tests/paas/service_metadata/provision_using_specified_template/pom.xml deleted file mode 100644 index d42b9a7494f..00000000000 --- a/appserver/tests/paas/service_metadata/provision_using_specified_template/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - 4.0.0 - org.glassfish.tests.paas - service_metadata.provision_using_specified_template - 4.1-SNAPSHOT - Provision service(s) using specified template - war - - basic_paas_sample2 - - - org.apache.maven.plugins - maven-compiler-plugin - - ${javase.version} - ${javase.version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - integration-test - - test - - - false - false - - - - - - - - - org.glassfish - javax.servlet - 3.1 - provided - - - junit - junit - test - - - org.glassfish.extras - glassfish-embedded-static-shell - ${project.version} - system - ${env.S1AS_HOME}/lib/embedded/glassfish-embedded-static-shell.jar - - - - diff --git a/appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/java/org/glassfish/tests/paas/basic/BasicPaaSServlet.java b/appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/java/org/glassfish/tests/paas/basic/BasicPaaSServlet.java deleted file mode 100644 index f26ef6781c9..00000000000 --- a/appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/java/org/glassfish/tests/paas/basic/BasicPaaSServlet.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.glassfish.tests.paas.basic; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Enumeration; - - -public final class BasicPaaSServlet extends HttpServlet { - - // @Resource(mappedName = "jdbc/__basic_paas_sample") - private DataSource ds = null; - - /** - * Respond to a GET request for the content produced by - * this servlet. - * - * @param request The servlet request we are processing - * @param response The servlet response we are producing - * @throws IOException if an input/output error occurs - * @throws ServletException if a servlet error occurs - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - System.out.println("Servlet processing do get.."); - - response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println(""); - writer.println(""); - writer.println("Simple Servlet"); - writer.println(""); - writer.println(""); - - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println(""); - writer.println("
    "); - //writer.println(""); - writer.println(""); - writer.println("

    Simple Servlet

    "); - writer.println("Request headers from the request:"); - writer.println("
    "); - - writer.println(""); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + name + ":" + request.getHeader(name) + "
    "); - if (ds != null) { - Statement stmt = null; - try { - stmt = ds.getConnection().createStatement(); - ResultSet rs = stmt.executeQuery("SELECT TABLENAME from sys.systables"); - writer.println(""); - writer.println(""); - writer.println(" "); - writer.println(""); - while (rs.next()) { - writer.println(""); - writer.println(" "); - writer.println(" "); - writer.println(""); - } - writer.println("
    " + "List of Tables in Database" + "
    " + " " + "" + rs.getObject(1) + "
    "); - } catch (Exception ex) { - ex.printStackTrace(writer); - } finally { - if (stmt != null) { - try { - stmt.getConnection().close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - } else { - //writer.println("DataSource is null"); - } - writer.println(""); - writer.println(""); - - - } - -} - diff --git a/appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/webapp/WEB-INF/glassfish-services.xml b/appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/webapp/WEB-INF/glassfish-services.xml deleted file mode 100644 index 80d005e6a63..00000000000 --- a/appserver/tests/paas/service_metadata/provision_using_specified_template/src/main/webapp/WEB-INF/glassfish-services.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -