http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/resources-jmx-example.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/examples/resources-jmx-example.adoc 
b/src/main/jbake/content/examples/resources-jmx-example.adoc
new file mode 100755
index 0000000..99f35b6
--- /dev/null
+++ b/src/main/jbake/content/examples/resources-jmx-example.adoc
@@ -0,0 +1,746 @@
+= Custom resources in an EAR archive
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example resources-jmx-example can be browsed at 
https://github.com/apache/tomee/tree/master/examples/resources-jmx-example
+
+
+TomEE allows you to define your own resources within your application, and 
declare them in `META-INF/resources.xml`. This allows you do inject these 
resource into any managed component within your application.
+
+In addition to this, you can also define a `create` method on either the 
resource itself, or on a POJO that acts as a factory. This example demonstrates 
using the `create` method to additionally register the resource as a JMX MBean, 
as well as make it available for injection.
+
+==  Resource
+
+Custom resources can be defined using very simple Java classes. In this 
particular instance, as the application also wants to register this resource as 
an MBean, the resource class needs to follow the MBean specification.
+
+       public class Hello implements HelloMBean {
+
+           private AtomicInteger count = new AtomicInteger(0);
+
+           @Override
+           public String greet(String name) {
+               if (name == null) {
+                   throw new NullPointerException("Name cannot be null");
+               }
+
+               return "Hello, " + name;
+           }
+
+           @Override
+           public int getCount() {
+               return count.get();
+           }
+
+           @Override
+           public void setCount(int value) {
+               count.set(value);
+           }
+
+           @Override
+           public void increment() {
+               count.incrementAndGet();
+           }
+       }
+       
+       public interface HelloMBean {
+
+           public String greet(final String name);
+
+           public int getCount();
+
+           public void setCount(int count);
+
+           public void increment();
+
+       }
+
+==  Create method
+
+To avoid adding the logic to register the resource as an MBean in every 
resource, the application provides a single class with a create() method that 
takes care of this logic for us.
+
+       public class JMXBeanCreator {
+
+           private static Logger LOGGER = 
Logger.getLogger(JMXBeanCreator.class.getName());
+           private Properties properties;
+
+           public Object create() throws MBeanRegistrationException {
+               // instantiate the bean
+
+               final String code = properties.getProperty("code");
+               final String name = properties.getProperty("name");
+
+               requireNotNull(code);
+               requireNotNull(name);
+
+               try {
+                   final Class<?> cls = Class.forName(code, true, 
Thread.currentThread().getContextClassLoader());
+                   final Object instance = cls.newInstance();
+
+                   final Field[] fields = cls.getDeclaredFields();
+                   for (final Field field : fields) {
+
+                       final String property = 
properties.getProperty(field.getName());
+                       if (property == null) {
+                           continue;
+                       }
+
+                       try {
+                           field.setAccessible(true);
+                           field.set(instance, Converter.convert(property, 
field.getType(), field.getName()));
+                       } catch (Exception e) {
+                           LOGGER.info(String.format("Unable to set value %s 
on field %s", property, field.getName()));
+                       }
+                   }
+
+                   final MBeanServer mbs = 
ManagementFactory.getPlatformMBeanServer();
+                   final ObjectName objectName = new ObjectName(name);
+                   mbs.registerMBean(instance, objectName);
+
+                   return instance;
+
+               } catch (final ClassNotFoundException e) {
+                   LOGGER.severe("Unable to find class " + code);
+                   throw new MBeanRegistrationException(e);
+               } catch (final InstantiationException e) {
+                   LOGGER.severe("Unable to create instance of class " + code);
+                   throw new MBeanRegistrationException(e);
+               } catch (final IllegalAccessException e) {
+                   LOGGER.severe("Illegal access: " + code);
+                   throw new MBeanRegistrationException(e);
+               } catch (final MalformedObjectNameException e) {
+                   LOGGER.severe("Malformed MBean name: " + name);
+                   throw new MBeanRegistrationException(e);
+               } catch (final InstanceAlreadyExistsException e) {
+                   LOGGER.severe("Instance already exists: " + name);
+                   throw new MBeanRegistrationException(e);
+               } catch (final NotCompliantMBeanException e) {
+                   LOGGER.severe("Class is not a valid MBean: " + code);
+                   throw new MBeanRegistrationException(e);
+               } catch (final javax.management.MBeanRegistrationException e) {
+                   LOGGER.severe("Error registering " + name + ", " + code);
+                   throw new MBeanRegistrationException(e);
+               }
+           }
+
+           private void requireNotNull(final String object) throws 
MBeanRegistrationException {
+               if (object == null) {
+                   throw new MBeanRegistrationException("code property not 
specified, stopping");
+               }
+           }
+
+           public Properties getProperties() {
+               return properties;
+           }
+
+           public void setProperties(final Properties properties) {
+               this.properties = properties;
+           }
+       }
+    
+
+Note that this class uses the properties defined in the <Resource> 
configuration (below), combined with reflection, to instantiate the resource, 
and set its attributes. The code above requires two properties `code` and 
`name` in order to know what class to create, and the JMX name to register it 
under.
+
+==  Resource
+
+The resource can be defined in `META-INF/resources.xml` as follows:
+
+       <Resources>
+         <Resource id="Hello" 
class-name="org.superbiz.resource.jmx.factory.JMXBeanCreator" 
factory-name="create">
+           code org.superbiz.resource.jmx.resources.Hello
+           name superbiz.test:name=Hello
+           count 12345
+         </Resource>
+       </Resources>
+
+Note that the class-name attribute refers to the factory class, and not the 
resource. Once the resource has been created and bound in TomEE's JNDI tree the 
factory is no longer used.
+
+==  Using @Resource for injection
+
+The test case for this example demonstrates injection into an EJB as one way 
of accessing the resource, and also accessing the resource via JMX.
+
+       @RunWith(Arquillian.class)
+       public class JMXTest {
+
+           @EJB
+           private TestEjb ejb;
+
+           @Deployment
+           public static EnterpriseArchive createDeployment() {
+
+               final JavaArchive ejbJar = new Mvn.Builder()
+                       .name("jmx-ejb.jar")
+                       .build(JavaArchive.class)
+                       .addClass(JMXTest.class)
+                       .addClass(TestEjb.class);
+
+               final EnterpriseArchive ear = 
ShrinkWrap.create(EnterpriseArchive.class, "jmx.ear")
+                       .addAsModule(ejbJar);
+
+               return ear;
+           }
+
+           @Test
+           public void test() throws Exception {
+               final MBeanServer mbs = 
ManagementFactory.getPlatformMBeanServer();
+               final ObjectName objectName = new 
ObjectName("superbiz.test:name=Hello");
+
+               Assert.assertNotNull(ejb);
+        
+               Assert.assertEquals(0, mbs.getAttribute(objectName, "Count"));
+               Assert.assertEquals(0, ejb.getCount());
+        
+               mbs.invoke(objectName, "increment", new Object[0], new 
String[0]);
+               Assert.assertEquals(1, mbs.getAttribute(objectName, "Count"));
+               Assert.assertEquals(1, ejb.getCount());
+        
+               ejb.increment();
+               Assert.assertEquals(2, mbs.getAttribute(objectName, "Count"));
+               Assert.assertEquals(2, ejb.getCount());
+
+               Attribute attribute = new Attribute("Count", 12345);
+               mbs.setAttribute(objectName, attribute);
+               Assert.assertEquals(12345, mbs.getAttribute(objectName, 
"Count"));
+               Assert.assertEquals(12345, ejb.getCount());
+        
+               ejb.setCount(23456);
+               Assert.assertEquals(23456, mbs.getAttribute(objectName, 
"Count"));
+               Assert.assertEquals(23456, ejb.getCount());
+
+               Assert.assertEquals("Hello, world", mbs.invoke(objectName, 
"greet", new Object[] { "world" }, new String[] { String.class.getName() }));
+               Assert.assertEquals("Hello, world", ejb.greet("world"));
+           }
+
+           @Singleton
+           @Lock(LockType.READ)
+           public static class TestEjb {
+
+               @Resource(name="jmx/Hello")
+               private HelloMBean helloMBean;
+
+               public String greet(String name) {
+                   return helloMBean.greet(name);
+               }
+
+               public void setCount(int count) {
+                   helloMBean.setCount(count);
+               }
+
+               public void increment() {
+                   helloMBean.increment();
+               }
+
+               public int getCount() {
+                   return helloMBean.getCount();
+               }
+           }
+       }
+
+The name `<appname>/<resource-id>` attribute is used on the `@Resource` 
annotation to perform the injection. No further configuration is needed to 
inject the resource.
+
+=  Additional properties
+
+In addition to the `code` and `name` properties that the code above uses to 
instantiate the resource, TomEE itself provides some
+properties to provide more control over the creation of resources.
+
+Resources are typically discovered, created, and bound to JNDI very early on 
in the deployment process, as other components depend on them. This may lead to 
problems where the final classpath for the application has not yet been 
determined, and therefore TomEE is unable to load your custom resource. 
+
+The following properties can be used to change this behavior.
+
+* Lazy
+
+This is a boolean value, which when true, creates a proxy that defers the 
actual instantiation of the resource until the first time it is looked up from 
JNDI. This can be useful if the resource requires the application classpath, or 
to improve startup time by not fully initializing resources that might not be 
used.
+
+* UseAppClassLoader 
+
+This boolean value forces a lazily instantiated resource to use the 
application classloader, instead of the classloader available when the 
resources were first processed.
+
+* InitializeAfterDeployment
+
+This boolean setting forces a resource created with the Lazy property to be 
instantiated once the application has started, as opposed to waiting for it to 
be looked up. Use this flag if you require the resource to be loaded, 
irrespective of whether it is injected into a managed component or manually 
looked up.
+
+By default, all of these settings are `false`, unless TomEE encounters a 
custom application resource that cannot be instantiated until the application 
has started. In this case, it will set these three flags to `true`, unless the 
`Lazy` flag has been explicitly set.
+
+=  PostConstruct / PreDestroy
+
+As an alternative to using a factory method, you can use @PostConstruct and 
@PreDestroy methods within your resource class (note that you cannot use this 
within a factory class) to manage any additional creation or cleanup 
activities. TomEE will automatically call these methods when the application is 
started and destroyed. Using @PostConstruct will effectively force a lazily 
loaded resource to be instantiated when the application is starting - in the 
same way that the `InitializeAfterDeployment` property does.
+
+
+[source,java]
+----
+public class Alternative implements AlternativeMBean {
+
+    private static Logger LOGGER = 
Logger.getLogger(Alternative.class.getName());
+    private Properties properties;
+
+    @PostConstruct
+    public void postConstruct() throws MBeanRegistrationException {
+        // initialize the bean
+
+        final String code = properties.getProperty("code");
+        final String name = properties.getProperty("name");
+
+        requireNotNull(code);
+        requireNotNull(name);
+
+        try {
+            final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+            final ObjectName objectName = new ObjectName(name);
+            mbs.registerMBean(this, objectName);
+        } catch (final MalformedObjectNameException e) {
+            LOGGER.severe("Malformed MBean name: " + name);
+            throw new MBeanRegistrationException(e);
+        } catch (final InstanceAlreadyExistsException e) {
+            LOGGER.severe("Instance already exists: " + name);
+            throw new MBeanRegistrationException(e);
+        } catch (final NotCompliantMBeanException e) {
+            LOGGER.severe("Class is not a valid MBean: " + code);
+            throw new MBeanRegistrationException(e);
+        } catch (final javax.management.MBeanRegistrationException e) {
+            LOGGER.severe("Error registering " + name + ", " + code);
+            throw new MBeanRegistrationException(e);
+        }
+    }
+
+    @PreDestroy
+    public void preDestroy() throws MBeanRegistrationException {
+        final String name = properties.getProperty("name");
+        requireNotNull(name);
+
+        try {
+            final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+            final ObjectName objectName = new ObjectName(name);
+            mbs.unregisterMBean(objectName);
+        } catch (final MalformedObjectNameException e) {
+            LOGGER.severe("Malformed MBean name: " + name);
+            throw new MBeanRegistrationException(e);
+        } catch (final javax.management.MBeanRegistrationException e) {
+            LOGGER.severe("Error unregistering " + name);
+            throw new MBeanRegistrationException(e);
+        } catch (InstanceNotFoundException e) {
+            LOGGER.severe("Error unregistering " + name);
+            throw new MBeanRegistrationException(e);
+        }
+    }
+
+    private void requireNotNull(final String object) throws 
MBeanRegistrationException {
+        if (object == null) {
+            throw new MBeanRegistrationException("code property not specified, 
stopping");
+        }
+    }
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+    public void setProperties(final Properties properties) {
+        this.properties = properties;
+    }
+
+    private int count = 0;
+
+    @Override
+    public String greet(String name) {
+        if (name == null) {
+            throw new NullPointerException("Name cannot be null");
+        }
+
+        return "Hello, " + name;
+    }
+
+    @Override
+    public int getCount() {
+        return count;
+    }
+
+    @Override
+    public void setCount(int value) {
+        count = value;
+    }
+
+    @Override
+    public void increment() {
+        count++;
+    }
+}
+----
+
+
+
+=  Running
+
+Running the example can be done from maven with a simple 'mvn clean install' 
command run from the 'resources-jmx-example' directory.
+
+When run you should see output similar to the following.
+
+       -------------------------------------------------------
+        T E S T S
+       -------------------------------------------------------
+       Running org.superbiz.resource.jmx.JMXTest
+       Apr 15, 2015 12:40:09 PM org.jboss.arquillian.container.impl.MapObject 
populate
+       WARNING: Configuration contain properties not supported by the backing 
object org.apache.tomee.arquillian.remote.RemoteTomEEConfiguration
+       Unused property entries: {openejbVersion=${tomee.version}, 
tomcatVersion=}
+       Supported property names: [additionalLibs, httpPort, httpsPort, 
stopCommand, portRange, conf, debug, exportConfAsSystemProperty, type, 
unpackWars, version, serverXml, preloadClasses, dir, deployerProperties, 
stopPort, singleDumpByArchiveName, appWorkingDir, host, cleanOnStartUp, 
quickSession, ajpPort, artifactId, properties, singleDeploymentByArchiveName, 
groupId, stopHost, lib, catalina_opts, debugPort, webContextToUseWithEars, 
simpleLog, removeUnusedWebapps, keepServerXmlAsThis, classifier, bin]
+       Apr 15, 2015 12:40:09 PM org.apache.openejb.arquillian.common.Setup 
findHome
+       INFO: Unable to find home in: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote
+       Apr 15, 2015 12:40:09 PM 
org.apache.openejb.arquillian.common.MavenCache getArtifact
+       INFO: Downloading 
org.apache.openejb:apache-tomee:7.0.0-SNAPSHOT:zip:plus please wait...
+       Apr 15, 2015 12:40:10 PM org.apache.openejb.arquillian.common.Zips unzip
+       INFO: Extracting 
'/Users/jgallimore/.m2/repository/org/apache/openejb/apache-tomee/7.0.0-SNAPSHOT/apache-tomee-7.0.0-SNAPSHOT-plus.zip'
 to 
'/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote'
+       Apr 15, 2015 12:40:12 PM 
org.apache.tomee.arquillian.remote.RemoteTomEEContainer configure
+       INFO: Downloaded container to: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT
+       Started server process on port: 61309
+       objc[20102]: Class JavaLaunchHelper is implemented in both 
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/bin/java 
and 
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib/libinstrument.dylib.
 One of the two will be used. Which one is undefined.
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Server version:        Apache Tomcat (TomEE)/7.0.61 
(7.0.0-SNAPSHOT)
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Server built:          Mar 27 2015 12:03:56 UTC
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Server number:         7.0.61.0
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: OS Name:               Mac OS X
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: OS Version:            10.9.5
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Architecture:          x86_64
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Java Home:             
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: JVM Version:           1.7.0_71-b14
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: JVM Vendor:            Oracle Corporation
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: CATALINA_BASE:         
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: CATALINA_HOME:         
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: -XX:+HeapDumpOnOutOfMemoryError
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: -XX:PermSize=64m
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: -XX:MaxPermSize=256m
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: -Xmx512m
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: -Xms256m
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: -XX:ReservedCodeCacheSize=64m
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: -Dtomee.httpPort=61309
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Dorg.apache.openejb.servlet.filters=org.apache.openejb.arquillian.common.ArquillianFilterRunner=/ArquillianServletRunner
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Djava.util.logging.config.file=/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT/conf/logging.properties
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-javaagent:/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT/lib/openejb-javaagent.jar
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Djava.io.tmpdir=/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT/temp
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Djava.endorsed.dirs=/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT/endorsed
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Dcatalina.base=/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Dcatalina.home=/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Dcatalina.ext.dirs=/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT/lib
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: 
-Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true
+       Apr 15, 2015 12:40:14 PM 
org.apache.catalina.startup.VersionLoggerListener log
+       INFO: Command line argument: -ea
+       Apr 15, 2015 12:40:14 PM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
+       INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
/Users/jgallimore/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
+       Apr 15, 2015 12:40:14 PM org.apache.coyote.AbstractProtocol init
+       INFO: Initializing ProtocolHandler ["http-bio-61309"]
+       Apr 15, 2015 12:40:14 PM org.apache.coyote.AbstractProtocol init
+       INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 
'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: 
********************************************************************************
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: OpenEJB http://tomee.apache.org/
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: Startup: Wed Apr 15 12:40:16 BST 2015
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: Copyright 1999-2013 (C) Apache OpenEJB Project, All Rights 
Reserved.
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: Version: 7.0.0-SNAPSHOT
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: Build date: 20150415
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: Build time: 11:37
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: 
********************************************************************************
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: openejb.home = 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.OpenEJB$Instance <init>
+       INFO: openejb.base = 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.cdi.CdiBuilder initializeOWB
+       INFO: Created new singletonService 
org.apache.openejb.cdi.ThreadSingletonServiceImpl@4a00b74b
+       Apr 15, 2015 12:40:16 PM org.apache.openejb.cdi.CdiBuilder initializeOWB
+       INFO: Succeeded in installing singleton service
+       Apr 15, 2015 12:40:17 PM org.apache.openejb.config.ConfigurationFactory 
init
+       INFO: openejb configuration file is 
'/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT/conf/tomee.xml'
+       Apr 15, 2015 12:40:17 PM org.apache.openejb.config.ConfigurationFactory 
configureService
+       INFO: Configuring Service(id=Tomcat Security Service, 
type=SecurityService, provider-id=Tomcat Security Service)
+       Apr 15, 2015 12:40:17 PM org.apache.openejb.config.ConfigurationFactory 
configureService
+       INFO: Configuring Service(id=Default Transaction Manager, 
type=TransactionManager, provider-id=Default Transaction Manager)
+       Apr 15, 2015 12:40:17 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 'openejb.system.apps=true'
+       Apr 15, 2015 12:40:17 PM org.apache.openejb.config.ConfigurationFactory 
configureApplication
+       INFO: Configuring enterprise application: openejb
+       Apr 15, 2015 12:40:17 PM org.apache.openejb.config.InitEjbDeployments 
deploy
+       INFO: Using openejb.deploymentId.format '{ejbName}'
+       Apr 15, 2015 12:40:17 PM org.apache.openejb.config.InitEjbDeployments 
deploy
+       INFO: Auto-deploying ejb openejb/Deployer: 
EjbDeployment(deployment-id=openejb/Deployer)
+       Apr 15, 2015 12:40:17 PM org.apache.openejb.config.InitEjbDeployments 
deploy
+       INFO: Auto-deploying ejb openejb/ConfigurationInfo: 
EjbDeployment(deployment-id=openejb/ConfigurationInfo)
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.config.InitEjbDeployments 
deploy
+       INFO: Auto-deploying ejb MEJB: EjbDeployment(deployment-id=MEJB)
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.config.ConfigurationFactory 
configureService
+       INFO: Configuring Service(id=Default Stateless Container, 
type=Container, provider-id=Default Stateless Container)
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.config.AutoConfig 
createContainer
+       INFO: Auto-creating a container for bean openejb/Deployer: 
Container(type=STATELESS, id=Default Stateless Container)
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.config.AppInfoBuilder build
+       INFO: Enterprise application "openejb" loaded.
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.assembler.classic.Assembler 
createRecipe
+       INFO: Creating TransactionManager(id=Default Transaction Manager)
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.assembler.classic.Assembler 
createRecipe
+       INFO: Creating SecurityService(id=Tomcat Security Service)
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.assembler.classic.Assembler 
createRecipe
+       INFO: Creating Container(id=Default Stateless Container)
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.assembler.classic.Assembler 
createAppClassLoader
+       INFO: Not creating another application classloader for openejb
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.assembler.classic.Assembler 
createApplication
+       INFO: Assembling app: openejb
+       Apr 15, 2015 12:40:18 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 
'openejb.jndiname.format={deploymentId}{interfaceType.openejbLegacyName}'
+       Apr 15, 2015 12:40:18 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: Jndi(name=openejb/DeployerBusinessRemote) --> 
Ejb(deployment-id=openejb/Deployer)
+       Apr 15, 2015 12:40:18 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: 
Jndi(name=global/openejb/openejb/Deployer!org.apache.openejb.assembler.Deployer)
 --> Ejb(deployment-id=openejb/Deployer)
+       Apr 15, 2015 12:40:18 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: Jndi(name=global/openejb/openejb/Deployer) --> 
Ejb(deployment-id=openejb/Deployer)
+       Apr 15, 2015 12:40:18 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: Jndi(name=openejb/ConfigurationInfoBusinessRemote) --> 
Ejb(deployment-id=openejb/ConfigurationInfo)
+       Apr 15, 2015 12:40:18 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: 
Jndi(name=global/openejb/openejb/ConfigurationInfo!org.apache.openejb.assembler.classic.cmd.ConfigurationInfo)
 --> Ejb(deployment-id=openejb/ConfigurationInfo)
+       Apr 15, 2015 12:40:18 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: Jndi(name=global/openejb/openejb/ConfigurationInfo) --> 
Ejb(deployment-id=openejb/ConfigurationInfo)
+       Apr 15, 2015 12:40:19 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: Jndi(name=MEJB) --> Ejb(deployment-id=MEJB)
+       Apr 15, 2015 12:40:19 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: 
Jndi(name=global/openejb/MEJB!javax.management.j2ee.ManagementHome) --> 
Ejb(deployment-id=MEJB)
+       Apr 15, 2015 12:40:19 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: Jndi(name=global/openejb/MEJB) --> Ejb(deployment-id=MEJB)
+       Apr 15, 2015 12:40:19 PM org.apache.openejb.assembler.classic.Assembler 
startEjbs
+       INFO: Created Ejb(deployment-id=openejb/Deployer, 
ejb-name=openejb/Deployer, container=Default Stateless Container)
+       Apr 15, 2015 12:40:19 PM org.apache.openejb.assembler.classic.Assembler 
startEjbs
+       INFO: Created Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default 
Stateless Container)
+       Apr 15, 2015 12:40:19 PM org.apache.openejb.assembler.classic.Assembler 
startEjbs
+       INFO: Created Ejb(deployment-id=openejb/ConfigurationInfo, 
ejb-name=openejb/ConfigurationInfo, container=Default Stateless Container)
+       Apr 15, 2015 12:40:19 PM org.apache.openejb.assembler.classic.Assembler 
startEjbs
+       INFO: Started Ejb(deployment-id=openejb/Deployer, 
ejb-name=openejb/Deployer, container=Default Stateless Container)
+       Apr 15, 2015 12:40:19 PM org.apache.openejb.assembler.classic.Assembler 
startEjbs
+       INFO: Started Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default 
Stateless Container)
+       Apr 15, 2015 12:40:19 PM org.apache.openejb.assembler.classic.Assembler 
startEjbs
+       INFO: Started Ejb(deployment-id=openejb/ConfigurationInfo, 
ejb-name=openejb/ConfigurationInfo, container=Default Stateless Container)
+       Apr 15, 2015 12:40:19 PM org.apache.openejb.assembler.classic.Assembler 
deployMBean
+       INFO: Deployed 
MBean(openejb.user.mbeans:application=openejb,group=org.apache.openejb.assembler.monitoring,name=JMXDeployer)
+       Apr 15, 2015 12:40:19 PM org.apache.openejb.assembler.classic.Assembler 
createApplication
+       INFO: Deployed Application(path=openejb)
+       Apr 15, 2015 12:40:20 PM org.apache.openejb.server.ServiceManager 
initServer
+       INFO: Creating ServerService(id=cxf)
+       Apr 15, 2015 12:40:20 PM org.apache.openejb.server.ServiceManager 
initServer
+       INFO: Creating ServerService(id=cxf-rs)
+       Apr 15, 2015 12:40:20 PM org.apache.openejb.server.SimpleServiceManager 
start
+       INFO:   ** Bound Services **
+       Apr 15, 2015 12:40:20 PM org.apache.openejb.server.SimpleServiceManager 
printRow
+       INFO:   NAME                 IP              PORT  
+       Apr 15, 2015 12:40:20 PM org.apache.openejb.server.SimpleServiceManager 
start
+       INFO: -------
+       Apr 15, 2015 12:40:20 PM org.apache.openejb.server.SimpleServiceManager 
start
+       INFO: Ready!
+       Apr 15, 2015 12:40:20 PM org.apache.catalina.startup.Catalina load
+       INFO: Initialization processed in 7621 ms
+       Apr 15, 2015 12:40:20 PM 
org.apache.tomee.catalina.OpenEJBNamingContextListener bindResource
+       INFO: Importing a Tomcat Resource with id 'UserDatabase' of type 
'org.apache.catalina.UserDatabase'.
+       Apr 15, 2015 12:40:20 PM org.apache.openejb.assembler.classic.Assembler 
createRecipe
+       INFO: Creating Resource(id=UserDatabase)
+       Apr 15, 2015 12:40:20 PM org.apache.catalina.core.StandardService 
startInternal
+       INFO: Starting service Catalina
+       Apr 15, 2015 12:40:20 PM org.apache.catalina.core.StandardEngine 
startInternal
+       INFO: Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.61 
(7.0.0-SNAPSHOT)
+       Apr 15, 2015 12:40:21 PM org.apache.coyote.AbstractProtocol start
+       INFO: Starting ProtocolHandler ["http-bio-61309"]
+       Apr 15, 2015 12:40:21 PM org.apache.coyote.AbstractProtocol start
+       INFO: Starting ProtocolHandler ["ajp-bio-8009"]
+       Apr 15, 2015 12:40:21 PM org.apache.catalina.startup.Catalina start
+       INFO: Server startup in 247 ms
+       Apr 15, 2015 12:40:21 PM org.apache.openejb.client.EventLogger log
+       INFO: 
RemoteInitialContextCreated{providerUri=http://localhost:61309/tomee/ejb}
+       Apr 15, 2015 12:40:21 PM org.apache.openejb.util.JarExtractor extract
+       INFO: Extracting jar: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx.ear
+       Apr 15, 2015 12:40:21 PM org.apache.openejb.util.JarExtractor extract
+       INFO: Extracted path: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx
+       Apr 15, 2015 12:40:21 PM org.apache.openejb.util.JarExtractor extract
+       INFO: Extracting jar: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx/arquillian-protocol.war
+       Apr 15, 2015 12:40:21 PM org.apache.openejb.util.JarExtractor extract
+       INFO: Extracted path: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx/arquillian-protocol
+       Apr 15, 2015 12:40:21 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 'openejb.deployments.classpath.filter.systemapps=false'
+       Apr 15, 2015 12:40:23 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
+       Apr 15, 2015 12:40:23 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
+       Apr 15, 2015 12:40:23 PM org.apache.openejb.config.DeploymentsResolver 
processUrls
+       INFO: Found EjbModule in classpath: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx/jmx-ejb.jar
+       Apr 15, 2015 12:40:23 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
+       Apr 15, 2015 12:40:23 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
+       Apr 15, 2015 12:40:23 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
+       Apr 15, 2015 12:40:23 PM org.apache.openejb.config.DeploymentsResolver 
loadFromClasspath
+       INFO: Searched 6 classpath urls in 1605 milliseconds.  Average 267 
milliseconds per url.
+       Apr 15, 2015 12:40:23 PM org.apache.openejb.config.ConfigurationFactory 
configureApplication
+       INFO: Configuring enterprise application: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.InitEjbDeployments 
deploy
+       INFO: Auto-deploying ejb TestEjb: EjbDeployment(deployment-id=TestEjb)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.ConfigurationFactory 
configureService
+       INFO: Configuring Service(id=jmx/Hello, type=Resource, 
provider-id=jmx/Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.ConfigurationFactory 
configureService
+       INFO: Configuring Service(id=Default Managed Container, type=Container, 
provider-id=Default Managed Container)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
createContainer
+       INFO: Auto-creating a container for bean jmx-ejb.Comp1256115069: 
Container(type=MANAGED, id=Default Managed Container)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.assembler.classic.Assembler 
createRecipe
+       INFO: Creating Container(id=Default Managed Container)
+       Apr 15, 2015 12:40:24 PM 
org.apache.openejb.core.managed.SimplePassivater init
+       INFO: Using directory 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/apache-tomee-remote/apache-tomee-plus-7.0.0-SNAPSHOT/temp
 for stateful session passivation
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
processResourceRef
+       INFO: Auto-linking resource-ref 'java:comp/env/jmx/Hello' in bean 
jmx-ejb.Comp1256115069 to Resource(id=jmx/Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
processResourceRef
+       INFO: Auto-linking resource-ref 'openejb/Resource/jmx/Hello' in bean 
jmx-ejb.Comp1256115069 to Resource(id=Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
processResourceRef
+       INFO: Auto-linking resource-ref 'openejb/Resource/Hello' in bean 
jmx-ejb.Comp1256115069 to Resource(id=Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.ConfigurationFactory 
configureService
+       INFO: Configuring Service(id=Default Singleton Container, 
type=Container, provider-id=Default Singleton Container)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
createContainer
+       INFO: Auto-creating a container for bean TestEjb: 
Container(type=SINGLETON, id=Default Singleton Container)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.assembler.classic.Assembler 
createRecipe
+       INFO: Creating Container(id=Default Singleton Container)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
processResourceRef
+       INFO: Auto-linking resource-ref 'java:comp/env/jmx/Hello' in bean 
TestEjb to Resource(id=jmx/Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
processResourceRef
+       INFO: Auto-linking resource-ref 'openejb/Resource/jmx/Hello' in bean 
TestEjb to Resource(id=Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
processResourceRef
+       INFO: Auto-linking resource-ref 'openejb/Resource/Hello' in bean 
TestEjb to Resource(id=Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
processResourceRef
+       INFO: Auto-linking resource-ref 'openejb/Resource/jmx/Hello' in bean 
jmx_org.superbiz.resource.jmx.JMXTest to Resource(id=Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AutoConfig 
processResourceRef
+       INFO: Auto-linking resource-ref 'openejb/Resource/Hello' in bean 
jmx_org.superbiz.resource.jmx.JMXTest to Resource(id=Hello)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.AppInfoBuilder build
+       INFO: Enterprise application 
"/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx"
 loaded.
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.assembler.classic.Assembler 
createAppClassLoader
+       INFO: Creating dedicated application classloader for jmx
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.assembler.classic.Assembler 
createApplication
+       INFO: Assembling app: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx
+       Apr 15, 2015 12:40:24 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: Jndi(name=TestEjbLocalBean) --> Ejb(deployment-id=TestEjb)
+       Apr 15, 2015 12:40:24 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: 
Jndi(name=global/jmx/jmx-ejb/TestEjb!org.superbiz.resource.jmx.JMXTest$TestEjb) 
--> Ejb(deployment-id=TestEjb)
+       Apr 15, 2015 12:40:24 PM 
org.apache.openejb.assembler.classic.JndiBuilder bind
+       INFO: Jndi(name=global/jmx/jmx-ejb/TestEjb) --> 
Ejb(deployment-id=TestEjb)
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.cdi.CdiBuilder initSingleton
+       INFO: Existing thread singleton service in SystemInstance(): 
org.apache.openejb.cdi.ThreadSingletonServiceImpl@4a00b74b
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.cdi.OpenEJBLifecycle 
startApplication
+       INFO: OpenWebBeans Container is starting...
+       Apr 15, 2015 12:40:24 PM org.apache.webbeans.plugins.PluginLoader 
startUp
+       INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
+       Apr 15, 2015 12:40:24 PM org.apache.webbeans.plugins.PluginLoader 
startUp
+       Apr 15, 2015 12:40:25 PM org.apache.webbeans.config.BeansDeployer 
validateInjectionPoints
+       INFO: All injection points were validated successfully.
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.cdi.OpenEJBLifecycle 
startApplication
+       INFO: OpenWebBeans Container has started, it took 186 ms.
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.assembler.classic.Assembler 
startEjbs
+       INFO: Created Ejb(deployment-id=TestEjb, ejb-name=TestEjb, 
container=Default Singleton Container)
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.assembler.classic.Assembler 
startEjbs
+       INFO: Started Ejb(deployment-id=TestEjb, ejb-name=TestEjb, 
container=Default Singleton Container)
+       Apr 15, 2015 12:40:25 PM org.apache.tomee.catalina.TomcatWebAppBuilder 
deployWebApps
+       INFO: using default host: localhost
+       Apr 15, 2015 12:40:25 PM org.apache.tomee.catalina.TomcatWebAppBuilder 
init
+       INFO: ------------------------- localhost -> /arquillian-protocol
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.util.OptionsLog info
+       INFO: Using 
'openejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager'
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.cdi.CdiBuilder initSingleton
+       INFO: Existing thread singleton service in SystemInstance(): 
org.apache.openejb.cdi.ThreadSingletonServiceImpl@4a00b74b
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.cdi.OpenEJBLifecycle 
startApplication
+       INFO: OpenWebBeans Container is starting...
+       Apr 15, 2015 12:40:25 PM org.apache.webbeans.plugins.PluginLoader 
startUp
+       INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
+       Apr 15, 2015 12:40:25 PM org.apache.webbeans.plugins.PluginLoader 
startUp
+       Apr 15, 2015 12:40:25 PM org.apache.webbeans.config.BeansDeployer 
validateInjectionPoints
+       INFO: All injection points were validated successfully.
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.cdi.OpenEJBLifecycle 
startApplication
+       INFO: OpenWebBeans Container has started, it took 17 ms.
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.assembler.classic.Assembler 
createRecipe
+       INFO: Creating Resource(id=jmx/Hello, aliases=Hello)
+       Apr 15, 2015 12:40:25 PM 
org.superbiz.resource.jmx.factory.JMXBeanCreator create
+       INFO: Unable to set value 12345 on field count
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.assembler.classic.Assembler 
logUnusedProperties
+       WARNING: Property "code" not supported by "jmx/Hello"
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.assembler.classic.Assembler 
logUnusedProperties
+       WARNING: Property "name" not supported by "jmx/Hello"
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.assembler.classic.Assembler 
logUnusedProperties
+       WARNING: Property "count" not supported by "jmx/Hello"
+       Apr 15, 2015 12:40:25 PM org.apache.openejb.assembler.classic.Assembler 
createApplication
+       INFO: Deployed 
Application(path=/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx)
+       Apr 15, 2015 12:40:26 PM org.apache.openejb.client.EventLogger log
+       INFO: 
RemoteInitialContextCreated{providerUri=http://localhost:61309/tomee/ejb}
+       Apr 15, 2015 12:40:26 PM org.apache.openejb.assembler.classic.Assembler 
destroyApplication
+       INFO: Undeploying app: 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx
+       Apr 15, 2015 12:40:27 PM 
org.apache.openejb.arquillian.common.TomEEContainer undeploy
+       INFO: cleaning 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx.ear
+       Apr 15, 2015 12:40:27 PM 
org.apache.openejb.arquillian.common.TomEEContainer undeploy
+       INFO: cleaning 
/Users/jgallimore/tmp/tomee-1.7.x/examples/resources-jmx-example/resources-jmx-ejb/target/arquillian-test-working-dir/0/jmx
+       Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.464 
sec
+       Apr 15, 2015 12:40:27 PM org.apache.catalina.core.StandardServer await
+       INFO: A valid shutdown command was received via the shutdown port. 
Stopping the Server instance.
+       Apr 15, 2015 12:40:27 PM org.apache.coyote.AbstractProtocol pause
+       INFO: Pausing ProtocolHandler ["http-bio-61309"]
+       Apr 15, 2015 12:40:27 PM org.apache.coyote.AbstractProtocol pause
+       INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
+       Apr 15, 2015 12:40:27 PM org.apache.catalina.core.StandardService 
stopInternal
+       INFO: Stopping service Catalina
+       Apr 15, 2015 12:40:27 PM org.apache.coyote.AbstractProtocol stop
+       INFO: Stopping ProtocolHandler ["http-bio-61309"]
+       Apr 15, 2015 12:40:27 PM org.apache.coyote.AbstractProtocol stop
+       INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
+       Apr 15, 2015 12:40:27 PM org.apache.openejb.server.SimpleServiceManager 
stop
+       INFO: Stopping server services
+       Apr 15, 2015 12:40:27 PM org.apache.openejb.assembler.classic.Assembler 
destroyApplication
+       INFO: Undeploying app: openejb
+       Apr 15, 2015 12:40:27 PM org.apache.coyote.AbstractProtocol destroy
+       INFO: Destroying ProtocolHandler ["http-bio-61309"]
+       Apr 15, 2015 12:40:27 PM org.apache.coyote.AbstractProtocol destroy
+       INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
+
+       Results :
+
+       Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+    
+
+Note the following lines showing the creation of the resource.
+
+       Apr 15, 2015 12:40:24 PM org.apache.openejb.config.ConfigurationFactory 
configureService
+       INFO: Configuring Service(id=jmx/Hello, type=Resource, 
provider-id=jmx/Hello)
+       
+
+
+
+

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/rest-applicationcomposer-mockito.adoc
----------------------------------------------------------------------
diff --git 
a/src/main/jbake/content/examples/rest-applicationcomposer-mockito.adoc 
b/src/main/jbake/content/examples/rest-applicationcomposer-mockito.adoc
new file mode 100755
index 0000000..43deb79
--- /dev/null
+++ b/src/main/jbake/content/examples/rest-applicationcomposer-mockito.adoc
@@ -0,0 +1,9 @@
+= rest-applicationcomposer-mockito
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example rest-applicationcomposer-mockito can be browsed at 
https://github.com/apache/tomee/tree/master/examples/rest-applicationcomposer-mockito
+
+No README.md yet, be the first to contribute one!

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/rest-applicationcomposer.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/examples/rest-applicationcomposer.adoc 
b/src/main/jbake/content/examples/rest-applicationcomposer.adoc
new file mode 100755
index 0000000..851aca0
--- /dev/null
+++ b/src/main/jbake/content/examples/rest-applicationcomposer.adoc
@@ -0,0 +1,9 @@
+= rest-applicationcomposer
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example rest-applicationcomposer can be browsed at 
https://github.com/apache/tomee/tree/master/examples/rest-applicationcomposer
+
+No README.md yet, be the first to contribute one!

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/rest-cdi.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/examples/rest-cdi.adoc 
b/src/main/jbake/content/examples/rest-cdi.adoc
new file mode 100755
index 0000000..a2afbd4
--- /dev/null
+++ b/src/main/jbake/content/examples/rest-cdi.adoc
@@ -0,0 +1,394 @@
+= Simple REST with CDI
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example rest-cdi can be browsed at 
https://github.com/apache/tomee/tree/master/examples/rest-cdi
+
+
+Defining a REST service is pretty easy, simply ad @Path annotation to a class 
then define on methods
+the HTTP method to use (@GET, @POST, ...).
+
+= The Code
+
+==  The REST service: @Path, @Produces, @Consumes
+
+Here we see a bean that uses the Bean-Managed Concurrency option as well as 
the @Startup annotation which causes the bean to be instantiated by the 
container when the application starts. Singleton beans with 
@ConcurrencyManagement(BEAN) are responsible for their own thread-safety. The 
bean shown is a simple properties "registry" and provides a place where options 
could be set and retrieved by all beans in the application.
+
+Actually lines:
+
+
+[source,java]
+----
+@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+
+are optional since it is the default configuration. And these lines can be 
configured by method too
+if you need to be more precise.
+
+@Path("/greeting")
+@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+public class GreetingService {
+    @GET
+    public Response message() {
+        return new Response("Hi REST!");
+    }
+
+    @POST
+    public Response lowerCase(final Request message) {
+        return new Response(message.getValue().toLowerCase());
+    }
+}
+----
+
+
+=  Testing
+
+==  Test for the JAXRS service
+
+The test uses the OpenEJB ApplicationComposer to make it trivial.
+
+The idea is first to activate the jaxrs services. This is done using 
@EnableServices annotation.
+
+Then we create on the fly the application simply returning an object 
representing the web.xml. Here we simply
+use it to define the context root but you can use it to define your REST 
Application too. And to complete the
+application definition we add @Classes annotation to define the set of classes 
to use in this app.
+
+Finally to test it we use cxf client API to call the REST service in get() and 
post() methods.
+
+Side note: to show we use JSON or XML depending on the test method we 
activated on EnableServices the attribute httpDebug
+which prints the http messages in the logs.
+
+
+[source,java]
+----
+package org.superbiz.rest;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.junit.ApplicationComposer;
+import org.apache.openejb.junit.Classes;
+import org.apache.openejb.junit.EnableServices;
+import org.apache.openejb.junit.Module;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.ws.rs.core.MediaType;
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+
+@EnableServices(value = "jaxrs", httpDebug = true)
+@RunWith(ApplicationComposer.class)
+public class GreetingServiceTest {
+    @Module
+    @Classes(value = {GreetingService.class, Greeting.class}, cdi = true) 
//This enables the CDI magic
+    public WebApp app() {
+        return new WebApp().contextRoot("test");
+    }
+
+    @Test
+    public void getXml() throws IOException {
+        final String message = 
WebClient.create("http://localhost:4204";).path("/test/greeting/")
+                .accept(MediaType.APPLICATION_XML_TYPE)
+                .get(Response.class).getValue();
+        assertEquals("Hi REST!", message);
+    }
+
+    @Test
+    public void postXml() throws IOException {
+        final String message = 
WebClient.create("http://localhost:4204";).path("/test/greeting/")
+                .accept(MediaType.APPLICATION_XML_TYPE)
+                .post(new Request("Hi REST!"), Response.class).getValue();
+        assertEquals("hi rest!", message);
+    }
+
+    @Test
+    public void getJson() throws IOException {
+        final String message = 
WebClient.create("http://localhost:4204";).path("/test/greeting/")
+                .accept(MediaType.APPLICATION_JSON_TYPE)
+                .get(Response.class).getValue();
+        assertEquals("Hi REST!", message);
+    }
+
+    @Test
+    public void postJson() throws IOException {
+        final String message = 
WebClient.create("http://localhost:4204";).path("/test/greeting/")
+                .accept(MediaType.APPLICATION_JSON_TYPE)
+                .post(new Request("Hi REST!"), Response.class).getValue();
+        assertEquals("hi rest!", message);
+    }
+}
+----
+
+
+
+= Running
+
+Running the example is fairly simple. In the "rest-cdi" directory run:
+
+    $ mvn clean install
+
+Which should create output like the following.
+
+    /opt/softs/java/jdk1.6.0_30/bin/java -ea -Didea.launcher.port=7534 
-Didea.launcher.bin.path=/opt/softs/idea/bin -Dfile.encoding=UTF-8 -classpath 
/opt/softs/idea/lib/idea_rt.jar:/opt/softs/idea/plugins/junit/lib/junit-rt.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/plugin.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/javaws.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/jce.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/charsets.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/resources.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/deploy.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/management-agent.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/jsse.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/rt.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/ext/localedata.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/ext/sunjce_provider.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/ext/sunpkcs11.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/ext/dnsns.jar:/opt/dev/openejb/openejb-trunk/examples/rest-cdi/target/test-classes:/opt/dev/openejb/openejb-trunk/examples/rest-cdi/tar
 
get/classes:/home/rmannibucau/.m2/repository/org/apache/openejb/javaee-api/6.0-4/javaee-api-6.0-4.jar:/home/rmannibucau/.m2/repository/junit/junit/4.10/junit-4.10.jar:/home/rmannibucau/.m2/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-cxf-rs/4.5.1/openejb-cxf-rs-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-http/4.5.1/openejb-http-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-core/4.5.1/openejb-core-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/mbean-annotation-api/4.5.1/mbean-annotation-api-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-jpa-integration/4.5.1/openejb-jpa-integration-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-api/4.5.1/openejb-api-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/open
 
ejb/openejb-loader/4.5.1/openejb-loader-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-javaagent/4.5.1/openejb-javaagent-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-jee/4.5.1/openejb-jee-4.5.1.jar:/home/rmannibucau/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.1.13.jar:/home/rmannibucau/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/home/rmannibucau/.m2/repository/org/apache/activemq/activemq-ra/5.7.0/activemq-ra-5.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/activemq/activemq-core/5.7.0/activemq-core-5.7.0.jar:/home/rmannibucau/.m2/repository/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar:/home/rmannibucau/.m2/repository/org/apache/activemq/kahadb/5.7.0/kahadb-5.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/activemq/protobuf/activemq-protobuf/1.1/activemq-protobuf-1.1.jar:/home/rmannibucau/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/home/rmannibucau/.m2/r
 
epository/commons-net/commons-net/3.1/commons-net-3.1.jar:/home/rmannibucau/.m2/repository/org/apache/geronimo/components/geronimo-connector/3.1.1/geronimo-connector-3.1.1.jar:/home/rmannibucau/.m2/repository/org/apache/geronimo/components/geronimo-transaction/3.1.1/geronimo-transaction-3.1.1.jar:/home/rmannibucau/.m2/repository/org/apache/geronimo/specs/geronimo-j2ee-connector_1.6_spec/1.0/geronimo-j2ee-connector_1.6_spec-1.0.jar:/home/rmannibucau/.m2/repository/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.jar:/home/rmannibucau/.m2/repository/org/apache/geronimo/javamail/geronimo-javamail_1.4_mail/1.8.2/geronimo-javamail_1.4_mail-1.8.2.jar:/home/rmannibucau/.m2/repository/org/apache/xbean/xbean-asm-shaded/3.12/xbean-asm-shaded-3.12.jar:/home/rmannibucau/.m2/repository/org/apache/xbean/xbean-finder-shaded/3.12/xbean-finder-shaded-3.12.jar:/home/rmannibucau/.m2/repository/org/apache/xbean/xbean-reflect/3.12/xbean-reflect-3.12.jar:/home/rmannibucau/.m2/repository/org/apache/xbean/xbea
 
n-naming/3.12/xbean-naming-3.12.jar:/home/rmannibucau/.m2/repository/org/apache/xbean/xbean-bundleutils/3.12/xbean-bundleutils-3.12.jar:/home/rmannibucau/.m2/repository/org/hsqldb/hsqldb/2.2.8/hsqldb-2.2.8.jar:/home/rmannibucau/.m2/repository/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar:/home/rmannibucau/.m2/repository/commons-pool/commons-pool/1.5.7/commons-pool-1.5.7.jar:/home/rmannibucau/.m2/repository/org/codehaus/swizzle/swizzle-stream/1.6.1/swizzle-stream-1.6.1.jar:/home/rmannibucau/.m2/repository/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar:/home/rmannibucau/.m2/repository/org/quartz-scheduler/quartz/2.1.6/quartz-2.1.6.jar:/home/rmannibucau/.m2/repository/org/slf4j/slf4j-jdk14/1.7.2/slf4j-jdk14-1.7.2.jar:/home/rmannibucau/.m2/repository/org/apache/openwebbeans/openwebbeans-impl/1.1.6/openwebbeans-impl-1.1.6.jar:/home/rmannibucau/.m2/repository/org/apache/openwebbeans/openwebbeans-spi/1.1.6/openwebbeans-spi-1.1.6.jar:/home/rmannibucau/.m2/repository/org/apache/openwebbeans/openw
 
ebbeans-ejb/1.1.6/openwebbeans-ejb-1.1.6.jar:/home/rmannibucau/.m2/repository/org/apache/openwebbeans/openwebbeans-ee/1.1.6/openwebbeans-ee-1.1.6.jar:/home/rmannibucau/.m2/repository/org/apache/openwebbeans/openwebbeans-ee-common/1.1.6/openwebbeans-ee-common-1.1.6.jar:/home/rmannibucau/.m2/repository/org/apache/openwebbeans/openwebbeans-web/1.1.6/openwebbeans-web-1.1.6.jar:/home/rmannibucau/.m2/repository/org/javassist/javassist/3.15.0-GA/javassist-3.15.0-GA.jar:/home/rmannibucau/.m2/repository/org/apache/openjpa/openjpa/2.2.0/openjpa-2.2.0.jar:/home/rmannibucau/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar:/home/rmannibucau/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/home/rmannibucau/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar:/home/rmannibucau/.m2/repository/asm/asm/3.2/asm-3.2.jar:/home/rmannibucau/.m2/repository/org/apache/bval/bval-core/0.5/bval-core-0.5.jar:/home/rmannibucau/.m2/repository/
 
commons-beanutils/commons-beanutils-core/1.8.3/commons-beanutils-core-1.8.3.jar:/home/rmannibucau/.m2/repository/org/apache/bval/bval-jsr303/0.5/bval-jsr303-0.5.jar:/home/rmannibucau/.m2/repository/org/fusesource/jansi/jansi/1.8/jansi-1.8.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-server/4.5.1/openejb-server-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-client/4.5.1/openejb-client-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-ejbd/4.5.1/openejb-ejbd-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-rest/4.5.1/openejb-rest-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-cxf-transport/4.5.1/openejb-cxf-transport-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-transports-http/2.7.0/cxf-rt-transports-http-2.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-api/2.7.0/cxf-api-2.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/ws/xmlschema/xmlschema-c
 
ore/2.0.3/xmlschema-core-2.0.3.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-core/2.7.0/cxf-rt-core-2.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-frontend-jaxrs/2.7.0/cxf-rt-frontend-jaxrs-2.7.0.jar:/home/rmannibucau/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0-m10/javax.ws.rs-api-2.0-m10.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-bindings-xml/2.7.0/cxf-rt-bindings-xml-2.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-rs-extension-providers/2.7.0/cxf-rt-rs-extension-providers-2.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-rs-extension-search/2.7.0/cxf-rt-rs-extension-search-2.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-rs-security-cors/2.7.0/cxf-rt-rs-security-cors-2.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-rs-security-oauth2/2.7.0/cxf-rt-rs-security-oauth2-2.7.0.jar:/home/rmannibucau/.m2/repository/org/codehaus/jettison/jettison/1.3/jettison-1.3.jar:/home/rman
 nibucau/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar 
com.intellij.rt.execution.application.AppMain 
com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 
org.superbiz.rest.GreetingServiceTest
+    INFO - Cannot find the configuration file [conf/openejb.xml].  Will 
attempt to create one for the beans deployed.
+    INFO - Configuring Service(id=Default Security Service, 
type=SecurityService, provider-id=Default Security Service)
+    INFO - Configuring Service(id=Default Transaction Manager, 
type=TransactionManager, provider-id=Default Transaction Manager)
+    INFO - Creating TransactionManager(id=Default Transaction Manager)
+    INFO - Creating SecurityService(id=Default Security Service)
+    INFO - Initializing network services
+    INFO - Creating ServerService(id=httpejbd)
+    INFO - Using 'print=true'
+    INFO - Using 'indent.xml=true'
+    INFO - Creating ServerService(id=cxf-rs)
+    INFO - Initializing network services
+    INFO - Starting service httpejbd
+    INFO - Started service httpejbd
+    INFO - Starting service cxf-rs
+    INFO - Started service cxf-rs
+    INFO -   ** Bound Services **
+    INFO -   NAME                 IP              PORT  
+    INFO -   httpejbd             127.0.0.1       4204  
+    INFO - -------
+    INFO - Ready!
+    INFO - Configuring enterprise application: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+    INFO - Configuring Service(id=Default Managed Container, type=Container, 
provider-id=Default Managed Container)
+    INFO - Auto-creating a container for bean 
org.superbiz.rest.GreetingServiceTest: Container(type=MANAGED, id=Default 
Managed Container)
+    INFO - Creating Container(id=Default Managed Container)
+    INFO - Using directory /tmp for stateful session passivation
+    INFO - Enterprise application 
"/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest" loaded.
+    INFO - Assembling app: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+    INFO - Existing thread singleton service in SystemInstance() null
+    INFO - Created new singletonService 
org.apache.openejb.cdi.ThreadSingletonServiceImpl@54128635
+    INFO - Succeeded in installing singleton service
+    INFO - OpenWebBeans Container is starting...
+    INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
+    INFO - All injection points are validated successfully.
+    INFO - OpenWebBeans Container has started, it took 102 ms.
+    INFO - Deployed 
Application(path=/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest)
+    INFO - Setting the server's publish address to be 
http://127.0.0.1:4204/test
+    INFO - REST Service: http://127.0.0.1:4204/test/greeting/.*  -> Pojo 
org.superbiz.rest.GreetingService
+    FINE - ******************* REQUEST ******************
+    GET http://localhost:4204/test/greeting/
+    Host=localhost:4204
+    User-Agent=Apache CXF 2.7.0
+    Connection=keep-alive
+    Accept=application/xml
+    Content-Type=*/*
+    Pragma=no-cache
+    Cache-Control=no-cache
+    
+    
+    **********************************************
+    
+    FINE - HTTP/1.1 200 OK
+    Date: Fri, 09 Nov 2012 11:59:00 GMT
+    Content-Length: 44
+    Set-Cookie: EJBSESSIONID=fc5037fa-641c-495d-95ca-0755cfa50beb; Path=/
+    Content-Type: application/xml
+    Connection: close
+    Server: OpenEJB/4.5.1 Linux/3.2.0-23-generic (amd64)
+    
+
+[source,xml]
+----
+<response><value>Hi REST!</value></response>
+INFO - Undeploying app: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Stopping network services
+INFO - Stopping server services
+INFO - Cannot find the configuration file [conf/openejb.xml].  Will attempt to 
create one for the beans deployed.
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, 
provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, 
type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Creating TransactionManager(id=Default Transaction Manager)
+INFO - Creating SecurityService(id=Default Security Service)
+INFO - Initializing network services
+INFO - Creating ServerService(id=httpejbd)
+INFO - Using 'print=true'
+INFO - Using 'indent.xml=true'
+INFO - Creating ServerService(id=cxf-rs)
+INFO - Initializing network services
+INFO - Starting service httpejbd
+INFO - Started service httpejbd
+INFO - Starting service cxf-rs
+INFO - Started service cxf-rs
+INFO -   ** Bound Services **
+INFO -   NAME                 IP              PORT  
+INFO -   httpejbd             127.0.0.1       4204  
+INFO - -------
+INFO - Ready!
+INFO - Configuring enterprise application: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Configuring Service(id=Default Managed Container, type=Container, 
provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean 
org.superbiz.rest.GreetingServiceTest: Container(type=MANAGED, id=Default 
Managed Container)
+INFO - Creating Container(id=Default Managed Container)
+INFO - Using directory /tmp for stateful session passivation
+INFO - Enterprise application 
"/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest" loaded.
+INFO - Assembling app: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Existing thread singleton service in SystemInstance() null
+INFO - Created new singletonService 
org.apache.openejb.cdi.ThreadSingletonServiceImpl@54128635
+INFO - Succeeded in installing singleton service
+INFO - OpenWebBeans Container is starting...
+INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
+INFO - All injection points are validated successfully.
+INFO - OpenWebBeans Container has started, it took 11 ms.
+INFO - Deployed 
Application(path=/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest)
+INFO - Setting the server's publish address to be http://127.0.0.1:4204/test
+INFO - REST Service: http://127.0.0.1:4204/test/greeting/.*  -> Pojo 
org.superbiz.rest.GreetingService
+FINE - ******************* REQUEST ******************
+POST http://localhost:4204/test/greeting/
+Host=localhost:4204
+Content-Length=97
+User-Agent=Apache CXF 2.7.0
+Connection=keep-alive
+Accept=application/xml
+Content-Type=application/xml
+Pragma=no-cache
+Cache-Control=no-cache
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><request><value>Hi 
REST!</value></request>
+**********************************************
+
+FINE - HTTP/1.1 200 OK
+Date: Fri, 09 Nov 2012 11:59:00 GMT
+Content-Length: 44
+Set-Cookie: EJBSESSIONID=7cb2246d-5738-4a85-aac5-c0fb5340d36a; Path=/
+Content-Type: application/xml
+Connection: close
+Server: OpenEJB/4.5.1 Linux/3.2.0-23-generic (amd64)
+
+<response><value>hi rest!</value></response>
+INFO - Undeploying app: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Stopping network services
+INFO - Stopping server services
+INFO - Cannot find the configuration file [conf/openejb.xml].  Will attempt to 
create one for the beans deployed.
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, 
provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, 
type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Creating TransactionManager(id=Default Transaction Manager)
+INFO - Creating SecurityService(id=Default Security Service)
+INFO - Initializing network services
+INFO - Creating ServerService(id=httpejbd)
+INFO - Using 'print=true'
+INFO - Using 'indent.xml=true'
+INFO - Creating ServerService(id=cxf-rs)
+INFO - Initializing network services
+INFO - Starting service httpejbd
+INFO - Started service httpejbd
+INFO - Starting service cxf-rs
+INFO - Started service cxf-rs
+INFO -   ** Bound Services **
+INFO -   NAME                 IP              PORT  
+INFO -   httpejbd             127.0.0.1       4204  
+INFO - -------
+INFO - Ready!
+INFO - Configuring enterprise application: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Configuring Service(id=Default Managed Container, type=Container, 
provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean 
org.superbiz.rest.GreetingServiceTest: Container(type=MANAGED, id=Default 
Managed Container)
+INFO - Creating Container(id=Default Managed Container)
+INFO - Using directory /tmp for stateful session passivation
+INFO - Enterprise application 
"/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest" loaded.
+INFO - Assembling app: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Existing thread singleton service in SystemInstance() null
+INFO - Created new singletonService 
org.apache.openejb.cdi.ThreadSingletonServiceImpl@54128635
+INFO - Succeeded in installing singleton service
+INFO - OpenWebBeans Container is starting...
+INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
+INFO - All injection points are validated successfully.
+INFO - OpenWebBeans Container has started, it took 10 ms.
+INFO - Deployed 
Application(path=/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest)
+INFO - Setting the server's publish address to be http://127.0.0.1:4204/test
+INFO - REST Service: http://127.0.0.1:4204/test/greeting/.*  -> Pojo 
org.superbiz.rest.GreetingService
+FINE - ******************* REQUEST ******************
+GET http://localhost:4204/test/greeting/
+Host=localhost:4204
+User-Agent=Apache CXF 2.7.0
+Connection=keep-alive
+Accept=application/json
+Content-Type=*/*
+Pragma=no-cache
+Cache-Control=no-cache
+
+
+**********************************************
+
+FINE - HTTP/1.1 200 OK
+Date: Fri, 09 Nov 2012 11:59:00 GMT
+Content-Length: 33
+Set-Cookie: EJBSESSIONID=7112a057-fc4c-4f52-a556-1617320d2275; Path=/
+Content-Type: application/json
+Connection: close
+Server: OpenEJB/4.5.1 Linux/3.2.0-23-generic (amd64)
+
+{"response":{"value":"Hi REST!"}}
+INFO - Undeploying app: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Stopping network services
+INFO - Stopping server services
+INFO - Cannot find the configuration file [conf/openejb.xml].  Will attempt to 
create one for the beans deployed.
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, 
provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, 
type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Creating TransactionManager(id=Default Transaction Manager)
+INFO - Creating SecurityService(id=Default Security Service)
+INFO - Initializing network services
+INFO - Creating ServerService(id=httpejbd)
+INFO - Using 'print=true'
+INFO - Using 'indent.xml=true'
+INFO - Creating ServerService(id=cxf-rs)
+INFO - Initializing network services
+INFO - Starting service httpejbd
+INFO - Started service httpejbd
+INFO - Starting service cxf-rs
+INFO - Started service cxf-rs
+INFO -   ** Bound Services **
+INFO -   NAME                 IP              PORT  
+INFO -   httpejbd             127.0.0.1       4204  
+INFO - -------
+INFO - Ready!
+INFO - Configuring enterprise application: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Configuring Service(id=Default Managed Container, type=Container, 
provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean 
org.superbiz.rest.GreetingServiceTest: Container(type=MANAGED, id=Default 
Managed Container)
+INFO - Creating Container(id=Default Managed Container)
+INFO - Using directory /tmp for stateful session passivation
+INFO - Enterprise application 
"/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest" loaded.
+INFO - Assembling app: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Existing thread singleton service in SystemInstance() null
+INFO - Created new singletonService 
org.apache.openejb.cdi.ThreadSingletonServiceImpl@54128635
+INFO - Succeeded in installing singleton service
+INFO - OpenWebBeans Container is starting...
+INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
+INFO - All injection points are validated successfully.
+INFO - OpenWebBeans Container has started, it took 10 ms.
+INFO - Deployed 
Application(path=/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest)
+INFO - Setting the server's publish address to be http://127.0.0.1:4204/test
+INFO - REST Service: http://127.0.0.1:4204/test/greeting/.*  -> Pojo 
org.superbiz.rest.GreetingService
+FINE - ******************* REQUEST ******************
+POST http://localhost:4204/test/greeting/
+Host=localhost:4204
+Content-Length=97
+User-Agent=Apache CXF 2.7.0
+Connection=keep-alive
+Accept=application/json
+Content-Type=application/xml
+Pragma=no-cache
+Cache-Control=no-cache
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><request><value>Hi 
REST!</value></request>
+**********************************************
+
+FINE - HTTP/1.1 200 OK
+Date: Fri, 09 Nov 2012 11:59:01 GMT
+Content-Length: 33
+Set-Cookie: EJBSESSIONID=50cf1d2b-a940-4afb-8993-fff7f9cc6d83; Path=/
+Content-Type: application/json
+Connection: close
+Server: OpenEJB/4.5.1 Linux/3.2.0-23-generic (amd64)
+
+{"response":{"value":"hi rest!"}}
+INFO - Undeploying app: 
/opt/dev/openejb/openejb-trunk/examples/GreetingServiceTest
+INFO - Stopping network services
+INFO - Stopping server services
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/rest-example-with-application.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/examples/rest-example-with-application.adoc 
b/src/main/jbake/content/examples/rest-example-with-application.adoc
new file mode 100755
index 0000000..8b9d47a
--- /dev/null
+++ b/src/main/jbake/content/examples/rest-example-with-application.adoc
@@ -0,0 +1,90 @@
+= REST Example with Application
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example rest-example-with-application can be browsed at 
https://github.com/apache/tomee/tree/master/examples/rest-example-with-application
+
+
+*Help us document this example! Click the blue pencil icon in the upper right 
to edit this page.*
+
+==  ApplicationConfig
+
+
+[source,java]
+----
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+@ApplicationPath("/rest-prefix")
+public class ApplicationConfig extends Application {
+    public Set<Class<?>> getClasses() {
+        return new HashSet<Class<?>>(Arrays.asList(SimpleRESTPojo.class, 
SimpleRESTEJB.class));
+    }
+}
+----
+
+
+==  SimpleRESTEJB
+
+
+[source,java]
+----
+import javax.ejb.Lock;
+import javax.ejb.LockType;
+import javax.ejb.Singleton;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import java.util.Date;
+
+@Singleton
+@Lock(LockType.READ)
+@Path("/ejb")
+public class SimpleRESTEJB {
+    @GET
+    public String ejb() {
+        return "ejb ok @ " + new Date().toString();
+    }
+}
+----
+
+
+==  SimpleRESTPojo
+
+
+[source,java]
+----
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import java.util.Date;
+
+@Path("/pojo")
+public class SimpleRESTPojo {
+    @GET
+    public String pojo() {
+        return "pojo ok @ " + new Date().toString();
+    }
+}
+----
+
+
+==  web.xml
+
+
+[source,xml]
+----
+<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_2_5.xsd";
+         metadata-complete="false"
+         version="2.5">
+
+  <display-name>OpenEJB REST Example</display-name>
+</web-app>
+----
+
+    

Reply via email to