Added: tomee/site/trunk/content/master/examples/pojo-webservice.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/pojo-webservice.html?rev=1849820&view=auto ============================================================================== --- tomee/site/trunk/content/master/examples/pojo-webservice.html (added) +++ tomee/site/trunk/content/master/examples/pojo-webservice.html Thu Dec 27 22:10:01 2018 @@ -0,0 +1,428 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Apache TomEE</title> + <meta name="description" + content="Apache TomEE is a lightweight, yet powerful, JavaEE Application server with feature rich tooling." /> + <meta name="keywords" content="tomee,asf,apache,javaee,jee,shade,embedded,test,junit,applicationcomposer,maven,arquillian" /> + <meta name="author" content="Luka Cvetinovic for Codrops" /> + <link rel="icon" href="../../favicon.ico"> + <link rel="icon" type="image/png" href="../../favicon.png"> + <meta name="msapplication-TileColor" content="#80287a"> + <meta name="theme-color" content="#80287a"> + <link rel="stylesheet" type="text/css" href="../../css/normalize.css"> + <link rel="stylesheet" type="text/css" href="../../css/bootstrap.css"> + <link rel="stylesheet" type="text/css" href="../../css/owl.css"> + <link rel="stylesheet" type="text/css" href="../../css/animate.css"> + <link rel="stylesheet" type="text/css" href="../../fonts/font-awesome-4.1.0/css/font-awesome.min.css"> + <link rel="stylesheet" type="text/css" href="../../fonts/eleganticons/et-icons.css"> + <link rel="stylesheet" type="text/css" href="../../css/jqtree.css"> + <link rel="stylesheet" type="text/css" href="../../css/idea.css"> + <link rel="stylesheet" type="text/css" href="../../css/cardio.css"> + + <script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-2717626-1']); + _gaq.push(['_setDomainName', 'apache.org']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + </script> +</head> + +<body> + <div class="preloader"> + <img src="../../img/loader.gif" alt="Preloader image"> + </div> + <nav class="navbar"> + <div class="container"> + <div class="row"> <div class="col-md-12"> + + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="/"> + <span> + + + <img src="../../img/logo-active.png"> + + + </span> + Apache TomEE + </a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav navbar-right main-nav"> + <li><a href="../../docs.html">Documentation</a></li> + <li><a href="../../community/index.html">Community</a></li> + <li><a href="../../security/index.html">Security</a></li> + <li><a href="../../download-ng.html">Downloads</a></li> + </ul> + </div> + <!-- /.navbar-collapse --> + </div></div> + </div> + <!-- /.container-fluid --> + </nav> + + + <div id="main-block" class="container main-block"> + <div class="row title"> + <div class="col-md-12"> + <div class='page-header'> + + <h1>JAX-WS @WebService example</h1> + </div> + </div> + </div> + <div class="row"> + + <div class="col-md-12"> + <p>Creating Web Services with JAX-WS is quite easy. Little has to be done aside from annotating a class with <code>@WebService</code>. Thie example shows the use of CDI with webservice annotation. The web.xml expose the webservice servlet at the address <a href="http://${host}:${port}/pojo-webservice?wsdl">http://${host}:${port}/pojo-webservice?wsdl</a>. To run the sample you can use the tomee maven plugin, mvn tomee:run. </p> +<h2>web.xml</h2> +<p>Expose a servlet for the webservice</p> +<pre><code><web-app xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" + version="3.0"> +<servlet> + <servlet-name>ws</servlet-name> + <servlet-class>org.superbiz.ws.pojo.PojoWS</servlet-class> +</servlet> +<servlet-mapping> + <servlet-name>ws</servlet-name> + <url-pattern>/*</url-pattern> +</servlet-mapping> +</web-app> +</code></pre> +<h2>@PojoWS</h2> +<p>This is the only concrete class annotated as @WebService that expose one operation ws(), also WebServiceContext and UserTransaction are injected in the class and used in the operation.</p> +<pre><code>import javax.annotation.Resource; +import javax.jws.WebService; +import javax.transaction.UserTransaction; +import javax.xml.ws.WebServiceContext; + +@WebService +public class PojoWS implements WS { + + @Resource + private WebServiceContext webServiceContext; + + @Resource + private UserTransaction userTransaction; + + @Override + public String ws() { + return webServiceContext + " & " + userTransaction; + } + + public void setWebServiceContext(WebServiceContext webServiceContext) { + this.webServiceContext = webServiceContext; + } + + public void setUserTransaction(UserTransaction userTransaction) { + this.userTransaction = userTransaction; + } +} +</code></pre> +<h2>@WebService Endpoint Interface</h2> +<p>Having an endpoint interface is not required, but it can make testing and using the web service from other Java clients far easier.</p> +<pre><code>import javax.jws.WebService; + +@WebService +public interface WS { + + String ws(); +} +</code></pre> +<h2>PojoWS WSDL</h2> +<p>The wsdl for our service is autmatically created for us and available at <code>http://127.0.0.1:8080/pojo-webservice?wsdl</code>.</p> +<pre><code><?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://pojo.ws.superbiz.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="PojoWSService" targetNamespace="http://pojo.ws.superbiz.org/"> +<wsdl:types> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://pojo.ws.superbiz.org/" elementFormDefault="unqualified" targetNamespace="http://pojo.ws.superbiz.org/" version="1.0"> + +<xs:element name="ws" type="tns:ws"/> + +<xs:element name="wsResponse" type="tns:wsResponse"/> + +<xs:complexType name="ws"> + <xs:sequence/> +</xs:complexType> + +<xs:complexType name="wsResponse"> + <xs:sequence> + <xs:element minOccurs="0" name="return" type="xs:string"/> + </xs:sequence> +</xs:complexType> + +</xs:schema> +</wsdl:types> +<wsdl:message name="ws"> + <wsdl:part element="tns:ws" name="parameters"> + </wsdl:part> +</wsdl:message> +<wsdl:message name="wsResponse"> + <wsdl:part element="tns:wsResponse" name="parameters"> + </wsdl:part> +</wsdl:message> +<wsdl:portType name="WS"> + <wsdl:operation name="ws"> + <wsdl:input message="tns:ws" name="ws"> + </wsdl:input> + <wsdl:output message="tns:wsResponse" name="wsResponse"> + </wsdl:output> + </wsdl:operation> +</wsdl:portType> +<wsdl:binding name="PojoWSServiceSoapBinding" type="tns:WS"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="ws"> + <soap:operation soapAction="" style="document"/> + <wsdl:input name="ws"> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output name="wsResponse"> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> +</wsdl:binding> +<wsdl:service name="PojoWSService"> + <wsdl:port binding="tns:PojoWSServiceSoapBinding" name="PojoWSPort"> + <soap:address location="http://localhost:8080/pojo-webservice"/> + </wsdl:port> +</wsdl:service> +</code></pre> +<h2>Invoke ws operation</h2> +<p>The operation can be tested with a client like SoapUI that will generate the following request for the ws operation</p> +<h3>ws()</h3> +<p>Request SOAP message:</p> +<pre><code><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pojo="http://pojo.ws.superbiz.org/"> + <soapenv:Header/> + <soapenv:Body> + <pojo:ws/> + </soapenv:Body> +</soapenv:Envelope> +</code></pre> +<p>Response SOAP message:</p> +<pre><code><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> + <soap:Body> + <ns2:wsResponse xmlns:ns2="http://pojo.ws.superbiz.org/"> + <return>org.apache.cxf.jaxws.context.WebServiceContextImpl@94b724d &amp; org.apache.openejb.resource.GeronimoTransactionManagerFactory$DestroyableTransactionManager@5fe405bf</return> + </ns2:wsResponse> + </soap:Body> +</soap:Envelope> +</code></pre> +<p>This shows that WebServiceContext and UserTransaction are successfully injected.</p> +<h1>Running</h1> +<p>Running the example can be done from maven with a simple 'mvn tomee:run' command run from the 'pojo-webservice' directory.</p> +<p>When run you should see output similar to the following.</p> +<pre><code>26-Dec-2018 21:20:55.667 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Server version: Apache Tomcat (TomEE)/9.0.12 (8.0.0-SNAPSHOT) +26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Server built: Sep 4 2018 22:13:41 UTC +26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Server number: 9.0.12.0 +26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke OS Name: Linux +26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke OS Version: 4.15.0-43-generic +26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Architecture: amd64 +26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Java Home: /usr/lib/jvm/java-8-oracle/jre +26-Dec-2018 21:20:55.669 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke JVM Version: 1.8.0_144-b01 +26-Dec-2018 21:20:55.669 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke JVM Vendor: Oracle Corporation +26-Dec-2018 21:20:55.669 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke CATALINA_BASE: /tomee/examples/pojo-webservice/target/apache-tomee +26-Dec-2018 21:20:55.669 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke CATALINA_HOME: /tomee/examples/pojo-webservice/target/apache-tomee +26-Dec-2018 21:20:55.669 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Command line argument: -XX:+HeapDumpOnOutOfMemoryError +26-Dec-2018 21:20:55.669 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Command line argument: -Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false +26-Dec-2018 21:20:55.669 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Command line argument: -Dopenejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager +26-Dec-2018 21:20:55.669 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Command line argument: -Dtomee.remote.support=true +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Command line argument: -Dopenejb.system.apps=false +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -Dtomee.jsp-development=true +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -Djava.util.logging.config.file=/tomee/examples/pojo-webservice/target/apache-tomee/conf/logging.properties +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -javaagent:/tomee/examples/pojo-webservice/target/apache-tomee/lib/openejb-javaagent.jar +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -Djava.io.tmpdir=/tomee/examples/pojo-webservice/target/apache-tomee/temp +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -Dcatalina.base=/tomee/examples/pojo-webservice/target/apache-tomee +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -Dcatalina.home=/tomee/examples/pojo-webservice/target/apache-tomee +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -Dcatalina.ext.dirs=/tomee/examples/pojo-webservice/target/apache-tomee/lib +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true +26-Dec-2018 21:20:55.670 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Command line argument: -ea +26-Dec-2018 21:20:55.671 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib] +26-Dec-2018 21:20:55.855 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Initializing ProtocolHandler ["http-nio-8080"] +26-Dec-2018 21:20:55.873 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Using a shared selector for servlet write/read +26-Dec-2018 21:20:55.893 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Initializing ProtocolHandler ["ajp-nio-8009"] +26-Dec-2018 21:20:55.896 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Using a shared selector for servlet write/read +26-Dec-2018 21:20:56.206 INFO [main] org.apache.openejb.util.OptionsLog.info Using 'tomee.remote.support=true' +26-Dec-2018 21:20:56.217 INFO [main] org.apache.openejb.util.OptionsLog.info Using 'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator' +26-Dec-2018 21:20:56.302 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> ******************************************************************************** +26-Dec-2018 21:20:56.302 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB http://tomee.apache.org/ +26-Dec-2018 21:20:56.302 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> Startup: Wed Dec 26 21:20:56 CET 2018 +26-Dec-2018 21:20:56.302 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> Copyright 1999-2018 (C) Apache OpenEJB Project, All Rights Reserved. +26-Dec-2018 21:20:56.302 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> Version: 8.0.0-SNAPSHOT +26-Dec-2018 21:20:56.303 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> Build date: 20181226 +26-Dec-2018 21:20:56.303 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> Build time: 02:24 +26-Dec-2018 21:20:56.303 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> ******************************************************************************** +26-Dec-2018 21:20:56.303 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> openejb.home = /tomee/examples/pojo-webservice/target/apache-tomee +26-Dec-2018 21:20:56.303 INFO [main] org.apache.openejb.OpenEJB$Instance.<init> openejb.base = /tomee/examples/pojo-webservice/target/apache-tomee +26-Dec-2018 21:20:56.305 INFO [main] org.apache.openejb.cdi.CdiBuilder.initializeOWB Created new singletonService org.apache.openejb.cdi.ThreadSingletonServiceImpl@159f197 +26-Dec-2018 21:20:56.305 INFO [main] org.apache.openejb.cdi.CdiBuilder.initializeOWB Succeeded in installing singleton service +26-Dec-2018 21:20:56.344 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is '/tomee/examples/pojo-webservice/target/apache-tomee/conf/tomee.xml' +26-Dec-2018 21:20:56.431 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Tomcat Security Service, type=SecurityService, provider-id=Tomcat Security Service) +26-Dec-2018 21:20:56.433 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager) +26-Dec-2018 21:20:56.435 INFO [main] org.apache.openejb.util.OptionsLog.info Using 'openejb.system.apps=false' +26-Dec-2018 21:20:56.436 INFO [main] org.apache.openejb.util.OptionsLog.info Using 'openejb.deployments.classpath=false' +26-Dec-2018 21:20:56.454 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating TransactionManager(id=Default Transaction Manager) +26-Dec-2018 21:20:56.504 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating SecurityService(id=Tomcat Security Service) +26-Dec-2018 21:20:56.564 INFO [main] org.apache.openejb.server.ServiceManager.initServer Creating ServerService(id=cxf) +26-Dec-2018 21:20:56.724 INFO [main] org.apache.openejb.server.ServiceManager.initServer Creating ServerService(id=cxf-rs) +26-Dec-2018 21:20:56.778 INFO [main] org.apache.openejb.server.SimpleServiceManager.start ** Bound Services ** +26-Dec-2018 21:20:56.778 INFO [main] org.apache.openejb.server.SimpleServiceManager.printRow NAME IP PORT +26-Dec-2018 21:20:56.778 INFO [main] org.apache.openejb.server.SimpleServiceManager.start ------- +26-Dec-2018 21:20:56.779 INFO [main] org.apache.openejb.server.SimpleServiceManager.start Ready! +26-Dec-2018 21:20:56.779 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Initialization processed in 1609 ms +26-Dec-2018 21:20:56.806 INFO [main] org.apache.tomee.catalina.OpenEJBNamingContextListener.bindResource Importing a Tomcat Resource with id 'UserDatabase' of type 'org.apache.catalina.UserDatabase'. +26-Dec-2018 21:20:56.807 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=UserDatabase) +26-Dec-2018 21:20:56.822 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Starting service [Catalina] +26-Dec-2018 21:20:56.822 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Starting Servlet Engine: Apache Tomcat (TomEE)/9.0.12 (8.0.0-SNAPSHOT) +26-Dec-2018 21:20:56.839 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Deploying web application archive [/tomee/examples/pojo-webservice/target/apache-tomee/webapps/pojo-webservice.war] +26-Dec-2018 21:20:56.846 INFO [main] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> /pojo-webservice +26-Dec-2018 21:20:56.847 INFO [main] org.apache.openejb.util.JarExtractor.extract Extracting jar: /tomee/examples/pojo-webservice/target/apache-tomee/webapps/pojo-webservice.war +26-Dec-2018 21:20:56.850 INFO [main] org.apache.openejb.util.JarExtractor.extract Extracted path: /tomee/examples/pojo-webservice/target/apache-tomee/webapps/pojo-webservice +26-Dec-2018 21:20:56.852 INFO [main] org.apache.openejb.util.OptionsLog.info Using 'openejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager' +26-Dec-2018 21:20:57.121 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureApplication Configuring enterprise application: /tomee/examples/pojo-webservice/target/apache-tomee/webapps/pojo-webservice +26-Dec-2018 21:20:57.227 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container) +26-Dec-2018 21:20:57.227 INFO [main] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean pojo-webservice.Comp1279740095: Container(type=MANAGED, id=Default Managed Container) +26-Dec-2018 21:20:57.228 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Container(id=Default Managed Container) +26-Dec-2018 21:20:57.238 INFO [main] org.apache.openejb.core.managed.SimplePassivater.init Using directory /tomee/examples/pojo-webservice/target/apache-tomee/temp for stateful session passivation +26-Dec-2018 21:20:57.278 INFO [main] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "/tomee/examples/pojo-webservice/target/apache-tomee/webapps/pojo-webservice" loaded. +26-Dec-2018 21:20:57.283 INFO [main] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: /tomee/examples/pojo-webservice/target/apache-tomee/webapps/pojo-webservice +26-Dec-2018 21:20:57.538 INFO [main] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=/tomee/examples/pojo-webservice/target/apache-tomee/webapps/pojo-webservice) +26-Dec-2018 21:20:57.643 INFO [main] org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Using org.apache.myfaces.ee.MyFacesContainerInitializer +26-Dec-2018 21:20:57.717 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. +26-Dec-2018 21:20:58.086 INFO [main] org.apache.cxf.common.injection.ResourceInjector.visitField failed to resolve resource org.superbiz.ws.pojo.PojoWS/userTransaction +26-Dec-2018 21:20:58.370 INFO [main] org.apache.openejb.server.webservices.WsService.afterApplicationCreated Webservice(wsdl=http://localhost:8080/pojo-webservice/*, qname={http://pojo.ws.superbiz.org/}PojoWSService) --> Pojo(id=localhost.pojo-webservice.ws) +26-Dec-2018 21:20:58.411 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Deployment of web application archive [/tomee/examples/pojo-webservice/target/apache-tomee/webapps/pojo-webservice.war] has finished in [1,571] ms +26-Dec-2018 21:20:58.422 INFO [main] org.apache.catalina.core.StandardContext.setClassLoaderProperty Unable to set the web application class loader property [clearReferencesRmiTargets] to [true] as the property does not exist. +26-Dec-2018 21:20:58.423 INFO [main] org.apache.catalina.core.StandardContext.setClassLoaderProperty Unable to set the web application class loader property [clearReferencesObjectStreamClassCaches] to [true] as the property does not exist. +26-Dec-2018 21:20:58.423 INFO [main] org.apache.catalina.core.StandardContext.setClassLoaderProperty Unable to set the web application class loader property [skipMemoryLeakChecksOnJvmShutdown] to [false] as the property does not exist. +26-Dec-2018 21:20:58.438 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["http-nio-8080"] +26-Dec-2018 21:20:58.456 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["ajp-nio-8009"] +26-Dec-2018 21:20:58.463 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Server startup in 1681 ms +</code></pre> +<h2>Inside the jar</h2> +<p>With so much going on it can make things look more complex than they are. It can be hard to believe that so much can happen with such little code. That's the benefit of having an app server.</p> +<p>If we look at the jar built by maven, we'll see the application itself is quite small:</p> +<pre><code>$ jar tvf target/pojo-webservice.war + 99 Wed Dec 26 21:08:26 CET 2018 META-INF/MANIFEST.MF + 0 Wed Dec 26 21:08:26 CET 2018 META-INF/ + 0 Wed Dec 26 21:08:26 CET 2018 WEB-INF/ + 0 Wed Dec 26 21:08:26 CET 2018 WEB-INF/classes/ + 0 Wed Dec 26 21:08:26 CET 2018 WEB-INF/classes/org/ + 0 Wed Dec 26 21:08:26 CET 2018 WEB-INF/classes/org/superbiz/ + 0 Wed Dec 26 21:08:26 CET 2018 WEB-INF/classes/org/superbiz/ws/ + 0 Wed Dec 26 21:08:26 CET 2018 WEB-INF/classes/org/superbiz/ws/pojo/ +1160 Wed Dec 26 21:08:24 CET 2018 WEB-INF/classes/org/superbiz/ws/pojo/PojoWS.class +207 Wed Dec 26 21:08:24 CET 2018 WEB-INF/classes/org/superbiz/ws/pojo/WS.class +1349 Wed Dec 26 17:41:54 CET 2018 WEB-INF/web.xml +3661 Wed Dec 26 17:41:54 CET 2018 META-INF/maven/org.superbiz/pojo-webservice/pom.xml +102 Wed Dec 26 21:08:26 CET 2018 META-INF/maven/org.superbiz/pojo-webservice/pom.properties +</code></pre> +<p>This single jar could be deployed any any compliant Java EE implementation.</p> +<p>The server already contains the right libraries to run the code, such as Apache CXF, so no need to include anything extra beyond your own application code.</p> + </div> + + </div> + </div> +<footer> + <div class="container"> + <div class="row"> + <div class="col-sm-6 text-center-mobile"> + <h3 class="white">Be simple. Be certified. Be Tomcat.</h3> + <h5 class="light regular light-white">"A good application in a good server"</h5> + <ul class="social-footer"> + <li><a href="https://www.facebook.com/ApacheTomEE/"><i class="fa fa-facebook"></i></a></li> + <li><a href="https://twitter.com/apachetomee"><i class="fa fa-twitter"></i></a></li> + <li><a href="https://plus.google.com/communities/105208241852045684449"><i class="fa fa-google-plus"></i></a></li> + </ul> + </div> + <div class="col-sm-6 text-center-mobile"> + <div class="row opening-hours"> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../latest/docs/documentation.html" class="white">Documentation</a></h5> + <ul class="list-unstyled"> + <li><a href="../../latest/docs/admin/configuration/index.html" class="regular light-white">How to configure</a></li> + <li><a href="../../latest/docs/admin/file-layout.html" class="regular light-white">Dir. Structure</a></li> + <li><a href="../../latest/docs/developer/testing/index.html" class="regular light-white">Testing</a></li> + <li><a href="../../latest/docs/admin/cluster/index.html" class="regular light-white">Clustering</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../latest/examples/" class="white">Examples</a></h5> + <ul class="list-unstyled"> + <li><a href="../../latest/examples/simple-cdi-interceptor.html" class="regular light-white">CDI Interceptor</a></li> + <li><a href="../../latest/examples/rest-cdi.html" class="regular light-white">REST with CDI</a></li> + <li><a href="../../latest/examples/ejb-examples.html" class="regular light-white">EJB</a></li> + <li><a href="../../latest/examples/jsf-managedBean-and-ejb.html" class="regular light-white">JSF</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../community/index.html" class="white">Community</a></h5> + <ul class="list-unstyled"> + <li><a href="../../community/contributors.html" class="regular light-white">Contributors</a></li> + <li><a href="../../community/social.html" class="regular light-white">Social</a></li> + <li><a href="../../community/sources.html" class="regular light-white">Sources</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../security/index.html" class="white">Security</a></h5> + <ul class="list-unstyled"> + <li><a href="http://apache.org/security" target="_blank" class="regular light-white">Apache Security</a></li> + <li><a href="http://apache.org/security/projects.html" target="_blank" class="regular light-white">Security Projects</a></li> + <li><a href="http://cve.mitre.org" target="_blank" class="regular light-white">CVE</a></li> + </ul> + </div> + </div> + </div> + </div> + <div class="row bottom-footer text-center-mobile"> + <div class="col-sm-12 light-white"> + <p>Copyright © 1999-2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p> + </div> + </div> + </div> + </footer> + <!-- Holder for mobile navigation --> + <div class="mobile-nav"> + <ul> + <li><a hef="../../latest/docs/admin/index.html">Administrators</a> + <li><a hef="../../latest/docs/developer/index.html">Developers</a> + <li><a hef="../../latest/docs/advanced/index.html">Advanced</a> + <li><a hef="../../community/index.html">Community</a> + </ul> + <a href="#" class="close-link"><i class="arrow_up"></i></a> + </div> + <!-- Scripts --> + <script src="../../js/jquery-1.11.1.min.js"></script> + <script src="../../js/owl.carousel.min.js"></script> + <script src="../../js/bootstrap.min.js"></script> + <script src="../../js/wow.min.js"></script> + <script src="../../js/typewriter.js"></script> + <script src="../../js/jquery.onepagenav.js"></script> + <script src="../../js/tree.jquery.js"></script> + <script src="../../js/highlight.pack.js"></script> + <script src="../../js/main.js"></script> + </body> + +</html> +
Modified: tomee/site/trunk/content/master/examples/polling-parent.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/polling-parent.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/master/examples/polling-parent.html (original) +++ tomee/site/trunk/content/master/examples/polling-parent.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Polling</h1> </div> </div> </div> Modified: tomee/site/trunk/content/master/examples/simple-cdi-interceptor.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/simple-cdi-interceptor.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/master/examples/simple-cdi-interceptor.html (original) +++ tomee/site/trunk/content/master/examples/simple-cdi-interceptor.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Simple CDI Interceptor</h1> </div> </div> </div> Modified: tomee/site/trunk/content/master/examples/websocket-tls-basic-auth.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/websocket-tls-basic-auth.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/master/examples/websocket-tls-basic-auth.html (original) +++ tomee/site/trunk/content/master/examples/websocket-tls-basic-auth.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Websocket TLS Basic Auth</h1> </div> </div> </div> Modified: tomee/site/trunk/content/sitemap.xml URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/sitemap.xml?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/sitemap.xml (original) +++ tomee/site/trunk/content/sitemap.xml Thu Dec 27 22:10:01 2018 @@ -3582,6 +3582,11 @@ </url> <url> + <loc>http://tomee.apache.org/latest/examples/mp-metrics-metered.html</loc> + + </url> + + <url> <loc>http://tomee.apache.org/latest/examples/mp-metrics-timed.html</loc> </url> @@ -3607,6 +3612,11 @@ </url> <url> + <loc>http://tomee.apache.org/latest/examples/multi-jpa-provider-testing.html</loc> + + </url> + + <url> <loc>http://tomee.apache.org/latest/examples/mvc-cxf.html</loc> </url> @@ -3627,6 +3637,11 @@ </url> <url> + <loc>http://tomee.apache.org/latest/examples/pojo-webservice.html</loc> + + </url> + + <url> <loc>http://tomee.apache.org/latest/examples/polling-parent.html</loc> </url> @@ -4197,6 +4212,11 @@ </url> <url> + <loc>http://tomee.apache.org/master/examples/mp-metrics-metered.html</loc> + + </url> + + <url> <loc>http://tomee.apache.org/master/examples/mp-metrics-timed.html</loc> </url> @@ -4222,6 +4242,11 @@ </url> <url> + <loc>http://tomee.apache.org/master/examples/multi-jpa-provider-testing.html</loc> + + </url> + + <url> <loc>http://tomee.apache.org/master/examples/mvc-cxf.html</loc> </url> @@ -4242,6 +4267,11 @@ </url> <url> + <loc>http://tomee.apache.org/master/examples/pojo-webservice.html</loc> + + </url> + + <url> <loc>http://tomee.apache.org/master/examples/polling-parent.html</loc> </url> @@ -5862,6 +5892,11 @@ </url> <url> + <loc>http://tomee.apache.org/tomee-8.0/examples/mp-metrics-metered.html</loc> + + </url> + + <url> <loc>http://tomee.apache.org/tomee-8.0/examples/mp-metrics-timed.html</loc> </url> @@ -5887,6 +5922,11 @@ </url> <url> + <loc>http://tomee.apache.org/tomee-8.0/examples/multi-jpa-provider-testing.html</loc> + + </url> + + <url> <loc>http://tomee.apache.org/tomee-8.0/examples/mvc-cxf.html</loc> </url> @@ -5906,6 +5946,11 @@ </url> + <url> + <loc>http://tomee.apache.org/tomee-8.0/examples/pojo-webservice.html</loc> + + </url> + <url> <loc>http://tomee.apache.org/tomee-8.0/examples/polling-parent.html</loc> Modified: tomee/site/trunk/content/tomee-8.0/docs/admin/cluster/index.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/docs/admin/cluster/index.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/docs/admin/cluster/index.html (original) +++ tomee/site/trunk/content/tomee-8.0/docs/admin/cluster/index.html Thu Dec 27 22:10:01 2018 @@ -176,9 +176,6 @@ for multicast to work you need to have e </tr> </table> </div> -<div class="paragraph"> -<p>text</p> -</div> <div class="admonitionblock note"> <table> <tr> @@ -191,9 +188,6 @@ for multicast to work you need to have e </tr> </table> </div> -<div class="paragraph"> -<p>text</p> -</div> <div class="admonitionblock tip"> <table> <tr> @@ -206,9 +200,6 @@ for multicast to work you need to have e </tr> </table> </div> -<div class="paragraph"> -<p>text</p> -</div> <div class="admonitionblock caution"> <table> <tr> @@ -221,9 +212,6 @@ for multicast to work you need to have e </tr> </table> </div> -<div class="paragraph"> -<p>text</p> -</div> <div class="admonitionblock warning"> <table> <tr> @@ -236,9 +224,6 @@ for multicast to work you need to have e </tr> </table> </div> -<div class="paragraph"> -<p>text</p> -</div> <div class="sect4"> <h5 id="_multicast_client">Multicast Client</h5> <div class="paragraph"> Modified: tomee/site/trunk/content/tomee-8.0/docs/docs.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/docs/docs.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/docs/docs.html (original) +++ tomee/site/trunk/content/tomee-8.0/docs/docs.html Thu Dec 27 22:10:01 2018 @@ -110,7 +110,7 @@ <p><a href="admin/configuration/index.html">Server Configuration</a></p> </li> <li> -<p><a href="admin/directory-structure.html">Directory Structure</a></p> +<p><a href="admin/file-layout.html">Directory Structure</a></p> </li> <li> <p><a href="admin/cluster/index.html">Clustering and High Availability (HA)</a></p> Modified: tomee/site/trunk/content/tomee-8.0/examples/bean-validation-design-by-contract.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/bean-validation-design-by-contract.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/bean-validation-design-by-contract.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/bean-validation-design-by-contract.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Bean Validation Design by Contract</h1> </div> </div> </div> Modified: tomee/site/trunk/content/tomee-8.0/examples/cdi-alternative-and-stereotypes.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/cdi-alternative-and-stereotypes.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/cdi-alternative-and-stereotypes.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/cdi-alternative-and-stereotypes.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>CDI Alternative and Stereotypes</h1> </div> </div> </div> Modified: tomee/site/trunk/content/tomee-8.0/examples/cdi-events.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/cdi-events.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/cdi-events.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/cdi-events.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>CDI Events</h1> </div> </div> </div> Added: tomee/site/trunk/content/tomee-8.0/examples/cdi-session-scope.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/cdi-session-scope.html?rev=1849820&view=auto ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/cdi-session-scope.html (added) +++ tomee/site/trunk/content/tomee-8.0/examples/cdi-session-scope.html Thu Dec 27 22:10:01 2018 @@ -0,0 +1,265 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Apache TomEE</title> + <meta name="description" + content="Apache TomEE is a lightweight, yet powerful, JavaEE Application server with feature rich tooling." /> + <meta name="keywords" content="tomee,asf,apache,javaee,jee,shade,embedded,test,junit,applicationcomposer,maven,arquillian" /> + <meta name="author" content="Luka Cvetinovic for Codrops" /> + <link rel="icon" href="../../favicon.ico"> + <link rel="icon" type="image/png" href="../../favicon.png"> + <meta name="msapplication-TileColor" content="#80287a"> + <meta name="theme-color" content="#80287a"> + <link rel="stylesheet" type="text/css" href="../../css/normalize.css"> + <link rel="stylesheet" type="text/css" href="../../css/bootstrap.css"> + <link rel="stylesheet" type="text/css" href="../../css/owl.css"> + <link rel="stylesheet" type="text/css" href="../../css/animate.css"> + <link rel="stylesheet" type="text/css" href="../../fonts/font-awesome-4.1.0/css/font-awesome.min.css"> + <link rel="stylesheet" type="text/css" href="../../fonts/eleganticons/et-icons.css"> + <link rel="stylesheet" type="text/css" href="../../css/jqtree.css"> + <link rel="stylesheet" type="text/css" href="../../css/idea.css"> + <link rel="stylesheet" type="text/css" href="../../css/cardio.css"> + + <script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-2717626-1']); + _gaq.push(['_setDomainName', 'apache.org']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + </script> +</head> + +<body> + <div class="preloader"> + <img src="../../img/loader.gif" alt="Preloader image"> + </div> + <nav class="navbar"> + <div class="container"> + <div class="row"> <div class="col-md-12"> + + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="/"> + <span> + + + <img src="../../img/logo-active.png"> + + + </span> + Apache TomEE + </a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav navbar-right main-nav"> + <li><a href="../../docs.html">Documentation</a></li> + <li><a href="../../community/index.html">Community</a></li> + <li><a href="../../security/index.html">Security</a></li> + <li><a href="../../download-ng.html">Downloads</a></li> + </ul> + </div> + <!-- /.navbar-collapse --> + </div></div> + </div> + <!-- /.container-fluid --> + </nav> + + + <div id="main-block" class="container main-block"> + <div class="row title"> + <div class="col-md-12"> + <div class='page-header'> + + <h1>CDI @SessionScoped</h1> + </div> + </div> + </div> + <div class="row"> + + <div class="col-md-12"> + <p>This example show the use of <code>@SessionScoped</code> annotation for injected objects. An object which is defined as <code>@SessionScoped</code> is created once for every HTTPSession and is shared by all the beans that inject it throughout the same HTTPSession.</p> +<h5>Run the application:</h5> +<pre><code>mvn clean install tomee:run +</code></pre> +<h1>Example</h1> +<p>This example has an end point wherein a user provides a request parameter 'name' which is persisted as a feild in a session scoped bean SessionBean and then retrieved through another endpoint.</p> +<h1>Request</h1> +<p>GET <a href="http://localhost:8080/cdi-session-scope-8.0.0-SNAPSHOT/set-name?name=Puneeth">http://localhost:8080/cdi-session-scope-8.0.0-SNAPSHOT/set-name?name=Puneeth</a></p> +<h1>Response</h1> +<p>done, go to /name servlet </p> +<h1>Request</h1> +<p>GET <a href="http://localhost:8080/cdi-session-scope-8.0.0-SNAPSHOT/name">http://localhost:8080/cdi-session-scope-8.0.0-SNAPSHOT/name</a></p> +<h1>Response</h1> +<p>name = {Puneeth} </p> +<h2>SessionBean</h2> +<p>The annotation @SessionScoped specifies that a bean is session scoped ie there will be only one instance of the class associated with a particular HTTPSession. </p> +<p>@SessionScoped<br/>public class SessionBean implements Serializable {</p> +<pre><code>private String name; + +public String getName() { + return name; +} + +public void setName(String name) { + this.name = name; +} +</code></pre> +<p>} </p> +<h2>InputServlet</h2> +<p>InputServlet is a generic servlet which is mapped to the url pattern '/set-name'. The session scoped bean 'SessionBean' has been injected into this servlet, and the incoming request parameter is set to the feild name of the bean. </p> +<p>@WebServlet(name = "input-servlet", urlPatterns = {"/set-name"})<br/>public class InputServlet extends HttpServlet {</p> +<pre><code>@Inject +private SessionBean bean; + +@Override +protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + final String name = req.getParameter("name"); + if (name == null || name.isEmpty()) { + resp.getWriter().write("please add a parameter name=xxx"); + } else { + bean.setName(name); + resp.getWriter().write("done, go to /name servlet"); + } + +} +</code></pre> +<p>}</p> +<h2>AnswerBean</h2> +<p>AnswerBean is a request scoped bean with an injected 'SessionBean'. It has an postconstruct method wherein the value from the sessionBean is retrieved and set to a feild.</p> +<p>public class AnswerBean {</p> +<pre><code>@Inject +private SessionBean bean; + +private String value; + +@PostConstruct +public void init() { + value = '{' + bean.getName() + '}'; +} + +public String value() { + return value; +} +</code></pre> +<p>}</p> +<h2>OutputServlet</h2> +<p>OutputServlet is another servlet with 'AnswerBean' as an injected feild. When '/name' is called the value from 'Answerbean' is read and written to the response.</p> +<p>@WebServlet(name = "output-servlet", urlPatterns = {"/name"})<br/>public class OutputServlet extends HttpServlet {</p> +<pre><code>@Inject +private AnswerBean bean; + +@Override +protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + final String name = bean.value(); + if (name == null || name.isEmpty()) { + resp.getWriter().write("please go to servlet /set-name please"); + } else { + resp.getWriter().write("name = " + name); + } +} +</code></pre> +<p>}</p> + </div> + + </div> + </div> +<footer> + <div class="container"> + <div class="row"> + <div class="col-sm-6 text-center-mobile"> + <h3 class="white">Be simple. Be certified. Be Tomcat.</h3> + <h5 class="light regular light-white">"A good application in a good server"</h5> + <ul class="social-footer"> + <li><a href="https://www.facebook.com/ApacheTomEE/"><i class="fa fa-facebook"></i></a></li> + <li><a href="https://twitter.com/apachetomee"><i class="fa fa-twitter"></i></a></li> + <li><a href="https://plus.google.com/communities/105208241852045684449"><i class="fa fa-google-plus"></i></a></li> + </ul> + </div> + <div class="col-sm-6 text-center-mobile"> + <div class="row opening-hours"> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../latest/docs/documentation.html" class="white">Documentation</a></h5> + <ul class="list-unstyled"> + <li><a href="../../latest/docs/admin/configuration/index.html" class="regular light-white">How to configure</a></li> + <li><a href="../../latest/docs/admin/file-layout.html" class="regular light-white">Dir. Structure</a></li> + <li><a href="../../latest/docs/developer/testing/index.html" class="regular light-white">Testing</a></li> + <li><a href="../../latest/docs/admin/cluster/index.html" class="regular light-white">Clustering</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../latest/examples/" class="white">Examples</a></h5> + <ul class="list-unstyled"> + <li><a href="../../latest/examples/simple-cdi-interceptor.html" class="regular light-white">CDI Interceptor</a></li> + <li><a href="../../latest/examples/rest-cdi.html" class="regular light-white">REST with CDI</a></li> + <li><a href="../../latest/examples/ejb-examples.html" class="regular light-white">EJB</a></li> + <li><a href="../../latest/examples/jsf-managedBean-and-ejb.html" class="regular light-white">JSF</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../community/index.html" class="white">Community</a></h5> + <ul class="list-unstyled"> + <li><a href="../../community/contributors.html" class="regular light-white">Contributors</a></li> + <li><a href="../../community/social.html" class="regular light-white">Social</a></li> + <li><a href="../../community/sources.html" class="regular light-white">Sources</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../security/index.html" class="white">Security</a></h5> + <ul class="list-unstyled"> + <li><a href="http://apache.org/security" target="_blank" class="regular light-white">Apache Security</a></li> + <li><a href="http://apache.org/security/projects.html" target="_blank" class="regular light-white">Security Projects</a></li> + <li><a href="http://cve.mitre.org" target="_blank" class="regular light-white">CVE</a></li> + </ul> + </div> + </div> + </div> + </div> + <div class="row bottom-footer text-center-mobile"> + <div class="col-sm-12 light-white"> + <p>Copyright © 1999-2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p> + </div> + </div> + </div> + </footer> + <!-- Holder for mobile navigation --> + <div class="mobile-nav"> + <ul> + <li><a hef="../../latest/docs/admin/index.html">Administrators</a> + <li><a hef="../../latest/docs/developer/index.html">Developers</a> + <li><a hef="../../latest/docs/advanced/index.html">Advanced</a> + <li><a hef="../../community/index.html">Community</a> + </ul> + <a href="#" class="close-link"><i class="arrow_up"></i></a> + </div> + <!-- Scripts --> + <script src="../../js/jquery-1.11.1.min.js"></script> + <script src="../../js/owl.carousel.min.js"></script> + <script src="../../js/bootstrap.min.js"></script> + <script src="../../js/wow.min.js"></script> + <script src="../../js/typewriter.js"></script> + <script src="../../js/jquery.onepagenav.js"></script> + <script src="../../js/tree.jquery.js"></script> + <script src="../../js/highlight.pack.js"></script> + <script src="../../js/main.js"></script> + </body> + +</html> + Modified: tomee/site/trunk/content/tomee-8.0/examples/dynamic-proxy-to-access-mbean.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/dynamic-proxy-to-access-mbean.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/dynamic-proxy-to-access-mbean.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/dynamic-proxy-to-access-mbean.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>dynamic-proxy-to-access-mbean</h1> + <h1>Dynamic Proxy to Access MBean</h1> </div> </div> </div> Modified: tomee/site/trunk/content/tomee-8.0/examples/index.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/index.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/index.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/index.html Thu Dec 27 22:10:01 2018 @@ -93,22 +93,11 @@ </div> <div class="row"> <div class="col-md-4"> - <div class="group-title">CDI</div> - <ul class="group"> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-application-scope.html">CDI @ApplicationScoped</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-basic.html">CDI @Inject</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-request-scope.html">CDI @RequestScoped</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-produces-disposes.html">CDI Produces Disposes</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-alternative-and-stereotypes.html">cdi-alternative-and-stereotypes</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="decorators.html">Decorators</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-cdi-interceptor.html">simple-cdi-interceptor</a></li> - </ul> - </div> - <div class="col-md-4"> <div class="group-title">Web Services</div> <ul class="group"> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="webservice-handlerchain.html">@WebService handlers with @HandlerChain</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="webservice-holder.html">@WebService OUT params via javax.xml.ws.Holder</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="pojo-webservice.html">JAX-WS @WebService example</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-webservice.html">JAX-WS @WebService example</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="webservice-attachments.html">Webservice Attachments</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="webservice-inheritance.html">Webservice Inheritance</a></li> @@ -117,6 +106,18 @@ </ul> </div> <div class="col-md-4"> + <div class="group-title">CDI</div> + <ul class="group"> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-application-scope.html">CDI @ApplicationScoped</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-basic.html">CDI @Inject</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-request-scope.html">CDI @RequestScoped</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-alternative-and-stereotypes.html">CDI Alternative and Stereotypes</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-produces-disposes.html">CDI Produces Disposes</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="decorators.html">Decorators</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-cdi-interceptor.html">Simple CDI Interceptor</a></li> + </ul> + </div> + <div class="col-md-4"> <div class="group-title">EJB</div> <ul class="group"> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="access-timeout.html">@AccessTimeout Annotation</a></li> @@ -140,16 +141,6 @@ </ul> </div> <div class="col-md-4"> - <div class="group-title">Unknown</div> - <ul class="group"> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="java-modules.html">Java modules example with a simple REST resource</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-custom-healthcheck.html">MicroProfile Custom Health Check</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-faulttolerance-fallback.html">Microprofile Fault Tolerance - Fallback</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-opentracing-traced.html">mp-opentracing-traced</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-rest-client.html">mp-rest-client</a></li> - </ul> - </div> - <div class="col-md-4"> <div class="group-title">Meta-Annotations</div> <ul class="group"> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="access-timeout-meta.html">@AccessTimeout the Meta-Annotation Way</a></li> @@ -159,8 +150,6 @@ <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="testing-security-meta.html">Testing Security Meta</a></li> </ul> </div> - </div> - <div class="row"> <div class="col-md-4"> <div class="group-title">Session Beans</div> <ul class="group"> @@ -170,6 +159,8 @@ <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-stateless-with-descriptor.html">Simple Stateless with Descriptor</a></li> </ul> </div> + </div> + <div class="row"> <div class="col-md-4"> <div class="group-title">Testing Techniques</div> <ul class="group"> @@ -188,17 +179,26 @@ <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="resources-declared-in-webapp.html">Resources Declared in Webapp</a></li> </ul> </div> - </div> - <div class="row"> <div class="col-md-4"> <div class="group-title">Other Features</div> <ul class="group"> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="bean-validation-design-by-contract.html">bean-validation-design-by-contract</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="bean-validation-design-by-contract.html">Bean Validation Design by Contract</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mbean-auto-registration.html">Mbean Auto Registration</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="telephone-stateful.html">Telephone Stateful</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="troubleshooting.html">Troubleshooting</a></li> </ul> </div> + </div> + <div class="row"> + <div class="col-md-4"> + <div class="group-title">Unknown</div> + <ul class="group"> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="java-modules.html">Java modules example with a simple REST resource</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-custom-healthcheck.html">MicroProfile Custom Health Check</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-faulttolerance-fallback.html">Microprofile Fault Tolerance - Fallback</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-opentracing-traced.html">mp-opentracing-traced</a></li> + </ul> + </div> <div class="col-md-4"> <div class="group-title">EntityManagers</div> <ul class="group"> @@ -249,7 +249,7 @@ <ul class="group"> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="dynamic-dao-implementation.html">Dynamic DAO Implementation</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="dynamic-implementation.html">Dynamic Implementation</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="dynamic-proxy-to-access-mbean.html">dynamic-proxy-to-access-mbean</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="dynamic-proxy-to-access-mbean.html">Dynamic Proxy to Access MBean</a></li> </ul> </div> <div class="col-md-4"> @@ -279,7 +279,7 @@ <div class="col-md-4"> <div class="group-title">Histogram</div> <ul class="group"> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-metrics-histogram.html">mp-metrics-histogram</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-metrics-histogram.html">Microprofile Metrics Histogram</a></li> </ul> </div> <div class="col-md-4"> @@ -290,6 +290,18 @@ </div> </div> <div class="row"> + <div class="col-md-4"> + <div class="group-title">JPA Providers</div> + <ul class="group"> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="multi-jpa-provider-testing.html">Multiple JPA providers test</a></li> + </ul> + </div> + <div class="col-md-4"> + </div> + <div class="col-md-4"> + </div> + </div> + <div class="row"> <div class="col-md-12"> <div class="group-title large">Misc</div> </div> @@ -314,7 +326,7 @@ <div class="col-md-4"> <ul class="group"> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mvc-resteasy.html">MVC-RestEasy</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="polling-parent.html">polling-parent</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="polling-parent.html">Polling</a></li> </ul> </div> </div> @@ -329,9 +341,10 @@ <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="deltaspike-fullstack.html">Apache DeltaSpike Demo</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="arquillian-jpa.html">Arquillian Persistence Extension</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="bval-evaluation-redeployment.html">bval-evaluation-redeployment</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-session-scope.html">CDI @SessionScoped</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-events.html">CDI Events</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-produces-field.html">CDI field producer</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-interceptors.html">CDI Interceptors</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-events.html">cdi-events</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="change-jaxws-url.html">Change JAXWS URL</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="resources-jmx-example.html">Custom resources in an EAR archive</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="datasource-versioning.html">DataSource Versioning</a></li> @@ -342,18 +355,20 @@ <ul class="group"> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="javamail.html">Javamail API</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-config-example.html">Microprofile Config</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-faulttolerance-retry.html">Microprofile Fault Tolerance Retry</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-metrics-counted.html">Microprofile Metrics Counted</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-metrics-timed.html">Microprofile Metrics Timed</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-rest-client.html">Microprofile Rest Client</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-rest-jwt.html">Microprofile Rest JWT</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="connector-war.html">Movies Complete</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-faulttolerance-retry.html">mp-faulttolerance-retry</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-metrics-counted.html">mp-metrics-counted</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-metrics-timed.html">mp-metrics-timed</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-rest-jwt.html">mp-rest-jwt</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mp-metrics-metered.html">mp-metrics-metered</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mtom.html">mtom</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="myfaces-codi-demo.html">MyFaces CODI Demo</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="persistence-fragment.html">Persistence Fragment</a></li> </ul> </div> <div class="col-md-4"> <ul class="group"> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="persistence-fragment.html">Persistence Fragment</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="reload-persistence-unit-properties.html">Reload Persistence Unit Properties</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="schedule-events.html">Schedule CDI Events</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-mdb-and-cdi.html">Simple MDB and CDI</a></li> @@ -363,7 +378,7 @@ <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-stateless-callbacks.html">Simple Stateless with callback methods</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-webservice-without-interface.html">Simple Webservice Without Interface</a></li> <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="testing-transactions-bmt.html">Testing Transactions BMT</a></li> - <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="websocket-tls-basic-auth.html">websocket-tls-basic-auth</a></li> + <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="websocket-tls-basic-auth.html">Websocket TLS Basic Auth</a></li> </ul> </div> </div> Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-faulttolerance-retry.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-faulttolerance-retry.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/mp-faulttolerance-retry.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/mp-faulttolerance-retry.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Microprofile Fault Tolerance Retry</h1> </div> </div> </div> Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-counted.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-counted.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-counted.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-counted.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Microprofile Metrics Counted</h1> </div> </div> </div> Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-histogram.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-histogram.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-histogram.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-histogram.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Microprofile Metrics Histogram</h1> </div> </div> </div> Added: tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-metered.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-metered.html?rev=1849820&view=auto ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-metered.html (added) +++ tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-metered.html Thu Dec 27 22:10:01 2018 @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Apache TomEE</title> + <meta name="description" + content="Apache TomEE is a lightweight, yet powerful, JavaEE Application server with feature rich tooling." /> + <meta name="keywords" content="tomee,asf,apache,javaee,jee,shade,embedded,test,junit,applicationcomposer,maven,arquillian" /> + <meta name="author" content="Luka Cvetinovic for Codrops" /> + <link rel="icon" href="../../favicon.ico"> + <link rel="icon" type="image/png" href="../../favicon.png"> + <meta name="msapplication-TileColor" content="#80287a"> + <meta name="theme-color" content="#80287a"> + <link rel="stylesheet" type="text/css" href="../../css/normalize.css"> + <link rel="stylesheet" type="text/css" href="../../css/bootstrap.css"> + <link rel="stylesheet" type="text/css" href="../../css/owl.css"> + <link rel="stylesheet" type="text/css" href="../../css/animate.css"> + <link rel="stylesheet" type="text/css" href="../../fonts/font-awesome-4.1.0/css/font-awesome.min.css"> + <link rel="stylesheet" type="text/css" href="../../fonts/eleganticons/et-icons.css"> + <link rel="stylesheet" type="text/css" href="../../css/jqtree.css"> + <link rel="stylesheet" type="text/css" href="../../css/idea.css"> + <link rel="stylesheet" type="text/css" href="../../css/cardio.css"> + + <script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-2717626-1']); + _gaq.push(['_setDomainName', 'apache.org']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + </script> +</head> + +<body> + <div class="preloader"> + <img src="../../img/loader.gif" alt="Preloader image"> + </div> + <nav class="navbar"> + <div class="container"> + <div class="row"> <div class="col-md-12"> + + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="/"> + <span> + + + <img src="../../img/logo-active.png"> + + + </span> + Apache TomEE + </a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav navbar-right main-nav"> + <li><a href="../../docs.html">Documentation</a></li> + <li><a href="../../community/index.html">Community</a></li> + <li><a href="../../security/index.html">Security</a></li> + <li><a href="../../download-ng.html">Downloads</a></li> + </ul> + </div> + <!-- /.navbar-collapse --> + </div></div> + </div> + <!-- /.container-fluid --> + </nav> + + + <div id="main-block" class="container main-block"> + <div class="row title"> + <div class="col-md-12"> + <div class='page-header'> + + <h1>null</h1> + </div> + </div> + </div> + <div class="row"> + + <div class="col-md-12"> + <h1>Microprofile Metrics</h1> +<p>This is an example on how to use microprofile metrics in TomEE.</p> +<h5>Run the application:</h5> +<pre><code>mvn clean install tomee:run +</code></pre> +<p>Within the application, there is an enpoint that will give you a weather weather status for the day and week.</p> +<h5>For the day status call:</h5> +<pre><code>GET http://localhost:8080/mp-metrics-metered/weather/day/status +</code></pre> +<h5>Response:</h5> +<pre><code>Hi, today is a sunny day! +</code></pre> +<h4>Metered Feature</h4> +<p>MicroProfile metrics has a feature that can be used to find the rate of requests to a service.</p> +<p>To use this feature you need to annotate the JAX-RS resource method with @Metered.</p> +<pre><code>@Path("/weather") +@Produces(MediaType.APPLICATION_JSON) +@Consumes(MediaType.APPLICATION_JSON) +@ApplicationScoped +public class WeatherService { + + @Path("/day/status") + @Metered(name = "dailyStatus", unit = MetricUnits.MINUTES, description = "Metrics to daily weather status method", absolute = true) + @GET + @Produces(MediaType.TEXT_PLAIN) + public String dayStatus() { + return "Hi, today is a sunny day!"; + } +... +} +</code></pre> +<p>There are some configurations, as part of @Metered, that you need to know:</p> +<p><strong>String name</strong><br/>Optional. Sets the name of the metric. If not explicitly given the name of the annotated object is used.</p> +<p><strong>boolean absolute</strong><br/>If true, uses the given name as the absolute name of the metric. If false, prepends the package name and class name before the given name. Default value is false.</p> +<p><strong>String displayName</strong><br/>Optional. A human-readable display name for metadata.</p> +<p><strong>String description</strong><br/>Optional. A description of the metric.</p> +<p><strong>String[] tags</strong><br/>Optional. Array of Strings in the <key>=<value> format to supply special tags to a metric.</p> +<p><strong>boolean reusable</strong><br/>Denotes if a metric with a certain name can be registered in more than one place. Does not apply to gauges.</p> +<p><strong>String unit</strong><br/>Unit of the metric. Default for @Metered is nanoseconds.</p> +<h4>Metric data</h4> +<p>Check the Metered metric doing a <em>GET</em> request:</p> +<h5>Prometheus format:</h5> +<pre><code>GET http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus +</code></pre> +<h5>Response:</h5> +<pre><code># TYPE application:daily_status_seconds_count meter +application:daily_status_seconds_count 1.2E-7 +# TYPE application:daily_status_rate_per_second meter +application:daily_status_rate_per_second 0.0 +# TYPE application:daily_status_one_min_rate_per_second meter +application:daily_status_one_min_rate_per_second 1.3376002644204984E-19 +# TYPE application:daily_status_five_min_rate_per_second meter +application:daily_status_five_min_rate_per_second 3.5942838529305413E-20 +# TYPE application:daily_status_fifteen_min_rate_per_second meter +application:daily_status_fifteen_min_rate_per_second 3.4665766454142955E-21 +</code></pre> +<h5>JSON Format:</h5> +<p>For json format add the header <em>Accept=application/json</em> to the request. </p> +<pre><code>{ + "dailyStatus": { + "count": 2, + "fifteenMinRate": 5.77762774235716e-14, + "fiveMinRate": 5.990473088217569e-13, + "meanRate": 0, + "oneMinRate": 2.229333774034164e-12, + "unit": "minutes" + } +} +</code></pre> +<h4>Metric metadata</h4> +<p>A metric will have a metadata so you can know more information about it, like displayName, description, tags etc.</p> +<p>Check the metric metadata doing a <em>OPTIONS</em> request:</p> +<h5>Request</h5> +<pre><code>OPTIONS http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus +</code></pre> +<h5>Response:</h5> +<pre><code>{ + "dailyStatus": { + "description": "Metrics to daily weather status method", + "displayName": "", + "name": "dailyStatus", + "reusable": false, + "tags": "", + "type": "meter", + "typeRaw": "METERED", + "unit": "minutes" + } +} +</code></pre> +<h5>Test the application:</h5> +<pre><code>mvn test +</code></pre> + </div> + + </div> + </div> +<footer> + <div class="container"> + <div class="row"> + <div class="col-sm-6 text-center-mobile"> + <h3 class="white">Be simple. Be certified. Be Tomcat.</h3> + <h5 class="light regular light-white">"A good application in a good server"</h5> + <ul class="social-footer"> + <li><a href="https://www.facebook.com/ApacheTomEE/"><i class="fa fa-facebook"></i></a></li> + <li><a href="https://twitter.com/apachetomee"><i class="fa fa-twitter"></i></a></li> + <li><a href="https://plus.google.com/communities/105208241852045684449"><i class="fa fa-google-plus"></i></a></li> + </ul> + </div> + <div class="col-sm-6 text-center-mobile"> + <div class="row opening-hours"> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../latest/docs/documentation.html" class="white">Documentation</a></h5> + <ul class="list-unstyled"> + <li><a href="../../latest/docs/admin/configuration/index.html" class="regular light-white">How to configure</a></li> + <li><a href="../../latest/docs/admin/file-layout.html" class="regular light-white">Dir. Structure</a></li> + <li><a href="../../latest/docs/developer/testing/index.html" class="regular light-white">Testing</a></li> + <li><a href="../../latest/docs/admin/cluster/index.html" class="regular light-white">Clustering</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../latest/examples/" class="white">Examples</a></h5> + <ul class="list-unstyled"> + <li><a href="../../latest/examples/simple-cdi-interceptor.html" class="regular light-white">CDI Interceptor</a></li> + <li><a href="../../latest/examples/rest-cdi.html" class="regular light-white">REST with CDI</a></li> + <li><a href="../../latest/examples/ejb-examples.html" class="regular light-white">EJB</a></li> + <li><a href="../../latest/examples/jsf-managedBean-and-ejb.html" class="regular light-white">JSF</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../community/index.html" class="white">Community</a></h5> + <ul class="list-unstyled"> + <li><a href="../../community/contributors.html" class="regular light-white">Contributors</a></li> + <li><a href="../../community/social.html" class="regular light-white">Social</a></li> + <li><a href="../../community/sources.html" class="regular light-white">Sources</a></li> + </ul> + </div> + <div class="col-sm-3 text-center-mobile"> + <h5><a href="../../security/index.html" class="white">Security</a></h5> + <ul class="list-unstyled"> + <li><a href="http://apache.org/security" target="_blank" class="regular light-white">Apache Security</a></li> + <li><a href="http://apache.org/security/projects.html" target="_blank" class="regular light-white">Security Projects</a></li> + <li><a href="http://cve.mitre.org" target="_blank" class="regular light-white">CVE</a></li> + </ul> + </div> + </div> + </div> + </div> + <div class="row bottom-footer text-center-mobile"> + <div class="col-sm-12 light-white"> + <p>Copyright © 1999-2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p> + </div> + </div> + </div> + </footer> + <!-- Holder for mobile navigation --> + <div class="mobile-nav"> + <ul> + <li><a hef="../../latest/docs/admin/index.html">Administrators</a> + <li><a hef="../../latest/docs/developer/index.html">Developers</a> + <li><a hef="../../latest/docs/advanced/index.html">Advanced</a> + <li><a hef="../../community/index.html">Community</a> + </ul> + <a href="#" class="close-link"><i class="arrow_up"></i></a> + </div> + <!-- Scripts --> + <script src="../../js/jquery-1.11.1.min.js"></script> + <script src="../../js/owl.carousel.min.js"></script> + <script src="../../js/bootstrap.min.js"></script> + <script src="../../js/wow.min.js"></script> + <script src="../../js/typewriter.js"></script> + <script src="../../js/jquery.onepagenav.js"></script> + <script src="../../js/tree.jquery.js"></script> + <script src="../../js/highlight.pack.js"></script> + <script src="../../js/main.js"></script> + </body> + +</html> + Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-timed.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-timed.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-timed.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-timed.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Microprofile Metrics Timed</h1> </div> </div> </div> Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-rest-client.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-rest-client.html?rev=1849820&r1=1849819&r2=1849820&view=diff ============================================================================== --- tomee/site/trunk/content/tomee-8.0/examples/mp-rest-client.html (original) +++ tomee/site/trunk/content/tomee-8.0/examples/mp-rest-client.html Thu Dec 27 22:10:01 2018 @@ -88,7 +88,7 @@ <div class="col-md-12"> <div class='page-header'> - <h1>null</h1> + <h1>Microprofile Rest Client</h1> </div> </div> </div>
