[jboss-cvs] JBossAS SVN: r82761 - in projects/ejb3/trunk/docs/tutorial: dependency and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 12 04:33:36 EST 2009
Author: jaikiran
Date: 2009-01-12 04:33:36 -0500 (Mon, 12 Jan 2009)
New Revision: 82761
Added:
projects/ejb3/trunk/docs/tutorial/dependency/
projects/ejb3/trunk/docs/tutorial/dependency/META-INF/
projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss-service.xml
projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss.xml
projects/ejb3/trunk/docs/tutorial/dependency/build.xml
projects/ejb3/trunk/docs/tutorial/dependency/jndi.properties
projects/ejb3/trunk/docs/tutorial/dependency/log4j.xml
projects/ejb3/trunk/docs/tutorial/dependency/pom.xml
projects/ejb3/trunk/docs/tutorial/dependency/src/
projects/ejb3/trunk/docs/tutorial/dependency/src/org/
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOn.java
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOnMBean.java
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependency.java
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependencyBean.java
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/client/
projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/client/Client.java
Log:
EJBTHREE-1607 Working version of dependency tutorial for JBossAS-5.0 GA
Added: projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss-service.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss-service.xml (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss-service.xml 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.tutorial.dependency.bean.DependedOn" name="jboss.test:service=DependedOn"/>
+</server>
\ No newline at end of file
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss.xml (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss.xml 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<jboss
+ xmlns="http://www.jboss.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
+ http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+ version="3.0">
+
+ <enterprise-beans>
+ <session>
+ <ejb-name>HasXmlMBeanDependencyBean</ejb-name>
+ <depends>jboss.test:service=DependedOn</depends>
+ </session>
+ </enterprise-beans>
+</jboss>
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/build.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/build.xml (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/build.xml 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+
+<!-- ======================================================================= -->
+<!-- JBoss build file -->
+<!-- ======================================================================= -->
+
+<project name="JBoss" default="ejbjar" basedir=".">
+
+ <property environment="env"/>
+ <property name="src.dir" value="${basedir}/src"/>
+ <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+ <property name="jboss.server.config" value="default"/>
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="build.classes.dir" value="${build.dir}/classes"/>
+ <property name="build.artifact" value="jboss-ejb3-tutorial-dependency.jar"/>
+
+ <!-- Build classpath -->
+ <path id="classpath">
+ <!-- So that we can get jndi.properties for InitialContext -->
+ <pathelement location="${basedir}"/>
+ <!-- jbossall-client.jar -->
+ <fileset dir="${jboss.home}/client">
+ <include name="**/jbossall-client.jar"/>
+ </fileset>
+ <!-- JMX support jar -->
+ <fileset dir="${jboss.home}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ <pathelement location="${build.classes.dir}"/>
+ </path>
+
+ <property name="build.classpath" refid="classpath"/>
+
+ <!-- =================================================================== -->
+ <!-- Prepares the build directory -->
+ <!-- =================================================================== -->
+ <target name="prepare">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the source code -->
+ <!-- =================================================================== -->
+ <target name="compile" depends="prepare">
+ <javac srcdir="${src.dir}"
+ destdir="${build.classes.dir}"
+ debug="on"
+ deprecation="on"
+ optimize="off"
+ includes="**">
+ <classpath refid="classpath"/>
+ </javac>
+ </target>
+
+ <target name="ejbjar" depends="compile">
+ <jar jarfile="build/${build.artifact}">
+ <fileset dir="${build.classes.dir}">
+ <include name="**/*.class"/>
+ </fileset>
+ <fileset dir=".">
+ <include name="META-INF/jboss-service.xml"/>
+ <include name="META-INF/jboss.xml"/>
+ </fileset>
+ </jar>
+ <copy file="build/${build.artifact}" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
+ </target>
+
+ <target name="run">
+ <java classname="org.jboss.tutorial.dependency.client.Client" fork="yes" dir=".">
+ <classpath refid="classpath"/>
+ </java>
+ </target>
+
+ <target name="deploy-dependency">
+ <copy file="build/tutorial.sar" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Cleans up generated stuff -->
+ <!-- =================================================================== -->
+
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ <delete file="${jboss.home}/server/${jboss.server.config}/deploy/${build.artifact}"/>
+
+ </target>
+
+
+</project>
+
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/jndi.properties
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/jndi.properties (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/jndi.properties 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=localhost
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/jndi.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/log4j.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/log4j.xml (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/log4j.xml 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 39990 2006-01-13 03:27:02Z bdecoste $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Messagen -->
+ <!--
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ -->
+ <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
+ </layout>
+</appender>
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/log4j.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/pom.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/pom.xml (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/pom.xml 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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">
+
+
+
+
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-tutorial-common</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../common/</relativePath>
+ </parent>
+
+ <properties>
+ <ejb3.tutorial.client>org.jboss.tutorial.dependency.client.Client</ejb3.tutorial.client>
+
+ </properties>
+
+
+ <artifactId>jboss-ejb3-tutorial-dependency</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>JBoss EJB3 bean depending on a MBean</name>
+ <url>http://labs.jboss.com/jbossejb3/</url>
+ <description>
+ Tutorial about adding a dependency to a EJB3 in JBoss
+ </description>
+
+
+
+
+
+
+</project>
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOn.java
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOn.java (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOn.java 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tutorial.dependency.bean;
+
+
+import org.jboss.system.ServiceMBeanSupport;
+
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public class DependedOn extends ServiceMBeanSupport implements DependedOnMBean
+{
+}
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOn.java
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOnMBean.java
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOnMBean.java (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOnMBean.java 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tutorial.dependency.bean;
+
+import org.jboss.system.ServiceMBean;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public interface DependedOnMBean extends ServiceMBean
+{
+}
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/DependedOnMBean.java
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependency.java
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependency.java (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependency.java 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tutorial.dependency.bean;
+
+import javax.ejb.Remote;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Remote
+public interface HasXmlMBeanDependency
+{
+ void noop();
+}
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependency.java
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependencyBean.java
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependencyBean.java (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependencyBean.java 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tutorial.dependency.bean;
+
+import javax.ejb.Stateless;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Stateless
+public class HasXmlMBeanDependencyBean implements HasXmlMBeanDependency
+{
+ public void noop()
+ {
+
+ }
+}
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/bean/HasXmlMBeanDependencyBean.java
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/client/Client.java
===================================================================
--- projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/client/Client.java (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/client/Client.java 2009-01-12 09:33:36 UTC (rev 82761)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tutorial.dependency.client;
+
+import javax.naming.InitialContext;
+
+import org.jboss.tutorial.dependency.bean.HasXmlMBeanDependency;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public class Client
+{
+ public static void main(String[] args) throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+
+ try
+ {
+ HasXmlMBeanDependency dependency = (HasXmlMBeanDependency)jndiContext.lookup("HasXmlMBeanDependencyBean/remote");
+ dependency.noop();
+ System.out.println("Lookup and bean access succeeded");
+ }
+ catch (Exception e)
+ {
+ System.out.println("Caught unsatisfied dependency exception " + e);
+ }
+ }
+}
Property changes on: projects/ejb3/trunk/docs/tutorial/dependency/src/org/jboss/tutorial/dependency/client/Client.java
___________________________________________________________________
Name: svn:executable
+ *
More information about the jboss-cvs-commits
mailing list