[jboss-cvs] JBossAS SVN: r66385 - in projects/microcontainer/trunk/docs/examples: Getting_Started_Guide and 37 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 24 08:53:48 EDT 2007
Author: newtonm
Date: 2007-10-24 08:53:48 -0400 (Wed, 24 Oct 2007)
New Revision: 66385
Added:
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/pom.xml
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/assembly/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/assembly/dist.xml
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/org/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/org/jboss/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/org/jboss/example/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/org/jboss/example/client/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/org/jboss/example/client/CmdLineClient.java
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/resources/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/resources/log4j.properties
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/CmdLineClientTestCase.java
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/CmdLineClientTestSuite.java
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/resources/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/pom.xml
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/org/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/org/jboss/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/org/jboss/example/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/org/jboss/example/service/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/org/jboss/example/service/Manager.java
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/resources/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/resources/META-INF/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/resources/META-INF/jboss-beans.xml
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/ManagerTestCase.java
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/ManagerTestSuite.java
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/log4j.properties
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/org/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/org/jboss/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/org/jboss/example/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/org/jboss/example/service/
projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/org/jboss/example/service/ManagerTestCase.xml
Log:
Added Getting Started Guide examples.
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/pom.xml
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/pom.xml (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/pom.xml 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,63 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.microcontainer.examples</groupId>
+ <artifactId>cmdLineClient</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0.0</version>
+ <name>Cmd Line Client</name>
+ <description>A simple command line client that uses the Human Resources Service.</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer.examples</groupId>
+ <artifactId>humanResourcesService</artifactId>
+ <version>1.0.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ <manifest>
+ <mainClass>org.jboss.example.client.CmdLineClient</mainClass>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib</classpathPrefix>
+ </manifest>
+ <manifestEntries>
+ <Class-Path>. ./deploy/humanResourcesService-1.0.0.jar lib/jboss-common-logging-log4j-2.0.4.GA.jar lib/log4j-1.2.14.jar</Class-Path>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/dist.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/assembly/dist.xml
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/assembly/dist.xml (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/assembly/dist.xml 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,32 @@
+<assembly>
+ <id>dist</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>target</directory>
+ <outputDirectory/>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/lib</outputDirectory>
+ <unpack>false</unpack>
+ <scope>compile</scope>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>/deploy</outputDirectory>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ <includes>
+ <include>org.jboss.microcontainer.examples:humanResourcesService</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+</assembly>
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/org/jboss/example/client/CmdLineClient.java
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/org/jboss/example/client/CmdLineClient.java (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/java/org/jboss/example/client/CmdLineClient.java 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,20 @@
+package org.jboss.example.client;
+
+import org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap;
+
+/**
+ * @author <a href="mailto:mark.newton at jboss.org">Mark Newton</a>
+ */
+public class CmdLineClient {
+
+ public static void main( String[] args ) throws Exception
+ {
+ System.out.println("Hello from the CmdLineClient main method");
+ StandaloneBootstrap.main(args);
+ System.out.println("Bye from the CmdLineClient main method");
+ }
+
+ public CmdLineClient() {
+ System.out.println("Hello from the CmdLineClient constructor");
+ }
+}
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/resources/log4j.properties
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/resources/log4j.properties (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/main/resources/log4j.properties 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,7 @@
+log4j.rootLogger=DEBUG, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+# Pattern to output the caller's file name and line number.
+log4j.appender.stdout.layout.ConversionPattern=MC Examples %5p [%d{dd-MM-yyyy HH:mm:ss}] %c{1} - %m%n
+
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/CmdLineClientTestCase.java
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/CmdLineClientTestCase.java (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/CmdLineClientTestCase.java 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,35 @@
+package org.jboss.example.client;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author <a href="mailto:mark.newton at jboss.org">Mark Newton</a>
+ */
+public class CmdLineClientTestCase extends TestCase
+{
+ public CmdLineClientTestCase(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Setup the test
+ *
+ * @return the test
+ */
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new TestSuite(CmdLineClientTestCase.class));
+ return suite;
+ }
+
+ public void testConfigure() throws Exception
+ {
+ CmdLineClient client = new CmdLineClient();
+ assertNotNull(client);
+ }
+
+}
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/CmdLineClientTestSuite.java
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/CmdLineClientTestSuite.java (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/cmdLineClient/src/test/java/org/jboss/example/client/CmdLineClientTestSuite.java 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,27 @@
+package org.jboss.example.client;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:mark.newton at jboss.org">Mark Newton</a>
+ */
+public class CmdLineClientTestSuite extends TestSuite
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("CmdLineClient Tests");
+
+ suite.addTest(CmdLineClientTestCase.suite());
+
+ return suite;
+ }
+
+}
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/pom.xml
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/pom.xml (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/pom.xml 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,27 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.microcontainer.examples</groupId>
+ <artifactId>humanResourcesService</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0.0</version>
+ <name>Human Resources Service</name>
+ <description>A simple service created using a POJO.</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/org/jboss/example/service/Manager.java
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/org/jboss/example/service/Manager.java (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/java/org/jboss/example/service/Manager.java 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,11 @@
+package org.jboss.example.service;
+
+/**
+ * @author <a href="mailto:mark.newton at jboss.org">Mark Newton</a>
+ */
+public class Manager {
+
+ public Manager() {
+ System.out.println("Hello from the manager...");
+ }
+}
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/resources/META-INF/jboss-beans.xml (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/main/resources/META-INF/jboss-beans.xml 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="HumanResources" class="org.jboss.example.service.Manager"/>
+
+</deployment>
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/ManagerTestCase.java
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/ManagerTestCase.java (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/ManagerTestCase.java 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,34 @@
+package org.jboss.example.service;
+
+import junit.framework.Test;
+
+import org.jboss.test.kernel.junit.MicrocontainerTest;
+import org.jboss.example.service.Manager;
+
+/**
+ * @author <a href="mailto:mark.newton at jboss.org">Mark Newton</a>
+ */
+public class ManagerTestCase extends MicrocontainerTest
+{
+ public ManagerTestCase(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Setup the test
+ *
+ * @return the test
+ */
+ public static Test suite()
+ {
+ return suite(ManagerTestCase.class);
+ }
+
+ public void testConfigure() throws Exception
+ {
+ Manager manager = (Manager) getBean("HumanResources");
+ assertNotNull(manager);
+ }
+
+}
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/ManagerTestSuite.java
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/ManagerTestSuite.java (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/java/org/jboss/example/service/ManagerTestSuite.java 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,27 @@
+package org.jboss.example.service;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:mark.newton at jboss.org">Mark Newton</a>
+ */
+public class ManagerTestSuite extends TestSuite
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("Manager Tests");
+
+ suite.addTest(ManagerTestCase.suite());
+
+ return suite;
+ }
+
+}
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/log4j.properties
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/log4j.properties (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/log4j.properties 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,7 @@
+log4j.rootLogger=DEBUG, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+# Pattern to output the caller's file name and line number.
+log4j.appender.stdout.layout.ConversionPattern=MC Examples %5p [%d{dd-MM-yyyy HH:mm:ss}] %c{1} - %m%n
+
Added: projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/org/jboss/example/service/ManagerTestCase.xml
===================================================================
--- projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/org/jboss/example/service/ManagerTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/docs/examples/Getting_Started_Guide/humanResourcesService/src/test/resources/org/jboss/example/service/ManagerTestCase.xml 2007-10-24 12:53:48 UTC (rev 66385)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="HumanResources" class="org.jboss.example.service.Manager"/>
+
+</deployment>
More information about the jboss-cvs-commits
mailing list