[jboss-cvs] JBossAS SVN: r59517 - in trunk: profileservice and 10 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 11 03:35:35 EST 2007


Author: scott.stark at jboss.org
Date: 2007-01-11 03:35:28 -0500 (Thu, 11 Jan 2007)
New Revision: 59517

Added:
   trunk/profileservice/
   trunk/profileservice/.classpath
   trunk/profileservice/.project
   trunk/profileservice/build-test.xml
   trunk/profileservice/build.log
   trunk/profileservice/build.xml
   trunk/profileservice/src/
   trunk/profileservice/src/etc/
   trunk/profileservice/src/etc/default.mf
   trunk/profileservice/src/etc/run.mf
   trunk/profileservice/src/main/
   trunk/profileservice/src/main/org/
   trunk/profileservice/src/main/org/jboss/
   trunk/profileservice/src/main/org/jboss/profileservice/
   trunk/profileservice/src/main/org/jboss/profileservice/aop/
   trunk/profileservice/src/main/org/jboss/profileservice/aop/MainDeployerAdvice.java
   trunk/profileservice/src/main/org/jboss/profileservice/management/
   trunk/profileservice/src/main/org/jboss/profileservice/remoting/
   trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProfileServiceInvocationHandler.java
   trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProxyFactory.java
   trunk/profileservice/src/resources/
   trunk/profileservice/src/resources/profileservice-beans.xml
   trunk/profileservice/src/tests/
   trunk/profileservice/src/tests/readme.html
Log:
A profileservice project for post bootstrap extensions

Added: trunk/profileservice/.classpath
===================================================================
--- trunk/profileservice/.classpath	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/.classpath	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main"/>
+	<classpathentry kind="src" output="output/eclipse-test-classes" path="src/tests"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="/thirdparty/gnu-getopt/lib/getopt.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar" sourcepath="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding-src.zip"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-container.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-container-src.zip"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-dependency-src.zip"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-microcontainer-src.zip"/>
+	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-deployers-src.zip"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/common-core/lib/jboss-common-core.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/common-logging-jdk/lib/jboss-logging-jdk.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/common-logging-log4j/lib/jboss-logging-log4j.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/common-logging-spi/lib/jboss-logging-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-vfs/lib/jboss-vfs.jar" sourcepath="/thirdparty/jboss/jboss-vfs/lib/jboss-vfs-sources.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-managed.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-managed-src.zip"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop-jdk50.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/remoting/lib/jboss-remoting.jar" sourcepath="/thirdparty/jboss/remoting/lib/jboss-remoting-src.zip"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/aspects"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/system"/>
+	<classpathentry kind="output" path="output/eclipse-classes"/>
+</classpath>


Property changes on: trunk/profileservice/.classpath
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/.project
===================================================================
--- trunk/profileservice/.project	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/.project	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>profileservice</name>
+	<comment></comment>
+	<projects>
+		<project>test</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>


Property changes on: trunk/profileservice/.project
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/build-test.xml
===================================================================
--- trunk/profileservice/build-test.xml	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/build-test.xml	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+   <!ENTITY buildmagic SYSTEM "../tools/etc/buildmagic/buildmagic.ent">
+   <!ENTITY libraries  SYSTEM "../thirdparty/libraries.ent">
+   <!ENTITY modules SYSTEM "../tools/etc/buildmagic/modules.ent">
+   <!ENTITY targets SYSTEM "../tools/etc/buildmagic/targets.ent">
+]>
+
+<!-- $Id$ -->
+
+<project default="main" name="JBoss/System Tests">
+
+   <!-- ================================================================== -->
+   <!-- Setup                                                              -->
+   <!-- ================================================================== -->
+
+   <!--
+     | Include the common Buildmagic elements.
+     |
+     | This defines several different targets, properties and paths.
+     | It also sets up the basic extention tasks amoung other things.
+   -->
+
+  &buildmagic;
+
+  <!--
+     | Include the normal targets.
+   -->
+  &targets;
+
+  <!-- ================================================================== -->
+   <!-- Configuration                                                      -->
+   <!-- ================================================================== -->
+
+   <!--
+     | Configure the build system.
+     |
+     | This target is invoked by the Buildmagic initialization logic and
+     | should contain module specific configuration elements.
+   -->
+
+   <target name="configure" unless="configure.disable">
+
+      <!-- =================== -->
+      <!-- Basic Configuration -->
+      <!-- =================== -->
+
+      <!-- Module name(s) & version -->
+      <property name="module.name" value="system" />
+      <property name="source.java" value="${module.source}/tests" />
+      <property name="javac.target" value="5" />
+      <property name="javac.source" value="5" />
+      <property name="build.classes" value="${module.output}/classes-tests" />
+      <property name="build.testlog" value="${module.output}/log" />
+      <property name="build-bypass.disabled" value="true" />
+      <property name="tests.support.classes" value="output/tests-support/classes" />
+      <property name="tests.support.lib" value="output/tests-support/lib" />
+      <!-- jbosstest.deploy.dir is a URI -->
+      <pathconvert targetos="unix" property="jbosstest.deploy.path">
+         <path>
+            <pathelement location="${module.output}/lib" />
+         </path>
+      </pathconvert>
+      <!-- Test hotdeployment root directory -->
+      <property name="jbosstest.deploy.dir" value="file:${jbosstest.deploy.path}" />
+      <!-- Support test classes lib root -->
+      <pathconvert targetos="unix" property="jbosstest.support.path">
+         <path>
+            <pathelement location="${module.output}/tests-support/lib" />
+         </path>
+      </pathconvert>
+      <property name="jbosstest.support.dir" value="file:${jbosstest.support.path}" />
+
+      <!-- ========= -->
+      <!-- Libraries -->
+      <!-- ========= -->
+
+    &libraries;
+
+    <!-- The combined library classpath -->
+      <path id="library.classpath">
+         <path refid="junit.junit.classpath" />
+         <path refid="gnu.getopt.classpath" />
+         <path refid="javassist.classpath" />
+         <path refid="trove.trove.classpath"/>
+         <path refid="apache.log4j.classpath" />
+         <path refid="oswego.concurrent.classpath" />
+         <path refid="jboss.jbossxb.classpath" />
+	      <path refid="jboss.common.core.classpath"/>
+	      <path refid="jboss.common.logging.spi.classpath"/>
+	      <path refid="jboss.common.logging.log4j.classpath"/>
+	      <path refid="jboss.common.logging.jdk.classpath"/>
+         <path refid="jboss.profiler.jvmti.classpath" />
+      </path>
+
+      <!-- ======= -->
+      <!-- Modules -->
+      <!-- ======= -->
+
+    &modules;
+	<!-- this -->
+      <property name="jboss.this.root" value="${module.root}/output" />
+      <property name="jboss.this.lib" value="${jboss.this.root}/lib" />
+      <path id="jboss.this.classpath">
+         <fileset dir="${jboss.this.lib}">
+            <include name="*.jar" />
+            <exclude name="run.jar" />
+         </fileset>
+      </path>
+
+      <!-- The combined dependant module classpath -->
+      <path id="dependentmodule.classpath">
+      	<path refid="jboss.aop.classpath" />
+      	<path refid="jboss.microcontainer.classpath"/>
+         <path refid="jboss.j2se.classpath" />
+         <path refid="jboss.mbeans.classpath" />
+         <path refid="jboss.test.classpath" />
+         <pathelement location="output/classes" />
+         <pathelement location="src/resources/tests/bootstrap" />
+         <pathelement location="src/resources/tests/conf" />
+         <pathelement location="src/resources/tests/xml" />
+      </path>
+
+      <!-- ===== -->
+      <!-- Tasks -->
+      <!-- ===== -->
+
+      <call target="_default:task-init" />
+
+      <path id="thirdparty.classpath">
+         <path refid="library.classpath" />
+         <path refid="dependentmodule.classpath" />
+      </path>
+
+   </target>
+   <patternset id="compile-resources.pattern">
+      <include name="${src.resources}/**" />
+   </patternset>
+
+   <!-- ================================================================== -->
+   <!-- Compile                                                            -->
+   <!-- ================================================================== -->
+
+   <!--
+     | Compile everything.
+     |
+     | This target should depend on other compile-* targets for each
+     | different type of compile that needs to be performed, short of
+     | documentation compiles.
+   -->
+
+   <target name="compile" description="Compile all source files." depends="_default:compile-classes, _default:compile-resources" />
+
+   <!-- ================================================================== -->
+   <!-- Archives                                                           -->
+   <!-- ================================================================== -->
+
+   <target name="module-jars" depends="init, tests-support-jars" />
+
+   <target name="tests-support-jars" depends="init"
+      description="Compiles and creates the tests-support tree jars">
+
+
+      <path id="tests-support.classpath">
+         <path refid="library.classpath" />
+         <path refid="dependentmodule.classpath" />
+      </path>
+      <mkdir dir="${tests.support.classes}" />
+      <mkdir dir="${tests.support.lib}" />
+      <javac destdir="${tests.support.classes}"
+        target="${javac.target}"
+        source="${javac.source}"
+        debug="${javac.debug}"
+        failonerror="true">
+        <src path="src/tests-support"/>
+        <classpath refid="tests-support.classpath"/>
+      </javac>
+
+      <jar destfile="${tests.support.lib}/org.jboss.server.support.jar">
+         <manifest>
+            <attribute name="Specification-Title" value="Support" />
+            <attribute name="Specification-Version" value="1.0.0.GA" />
+            <attribute name="Specification-Vendor" value="JBoss Inc." />
+         </manifest>
+         <zipfileset dir="${tests.support.classes}">
+            <include name="org/jboss/test/server/support/**" />
+         </zipfileset>
+      </jar>
+
+   </target>
+
+   <!-- ================================================================== -->
+   <!-- Tests                                                              -->
+   <!-- ================================================================== -->
+
+   <target name="tests" depends="most"
+      description="Execute all tests in the given test directory.">
+      <mkdir dir="${build.reports}" />
+      <mkdir dir="${build.testlog}" />
+      <!-- Remove the test.log so each run has a fresh log -->
+      <delete file="${build.testlog}/test.log" />
+      <junit dir="${module.output}" printsummary="yes" haltonerror="false" haltonfailure="false" fork="true">
+
+         <sysproperty key="build.testlog" value="${build.testlog}" />
+         <syspropertyset id="jbosstest-properties">
+            <propertyref prefix="jbosstest" />
+         </syspropertyset>
+
+         <classpath>
+            <pathelement location="${build.classes}" />
+            <pathelement location="${build.resources}/tests" />
+            <path refid="javac.classpath" />
+            <path refid="apache.xerces.classpath" />
+         </classpath>
+
+         <formatter type="plain" usefile="true" />
+         <formatter type="xml" usefile="true" />
+
+         <batchtest todir="${build.reports}" haltonerror="false" haltonfailure="false" fork="true">
+
+            <fileset dir="${build.classes}">
+               <include name="org/jboss/test/**/*TestCase.class" />
+            </fileset>
+         </batchtest>
+      </junit>
+   </target>
+
+   <target name="one-test" depends="init"
+      description="Execute the test defined by ${test}">
+      <mkdir dir="${build.reports}" />
+      <mkdir dir="${build.testlog}" />
+      <!-- Remove the test.log so each run has a fresh log -->
+      <delete file="${build.testlog}/test.log" />
+      <junit dir="${module.output}" printsummary="yes" haltonerror="false" haltonfailure="false" fork="true">
+
+         <sysproperty key="build.testlog" value="${build.testlog}" />
+         <syspropertyset id="jbosstest-properties">
+            <propertyref prefix="jbosstest" />
+         </syspropertyset>
+
+         <classpath>
+            <pathelement location="${build.classes}" />
+            <pathelement location="${build.resources}/tests" />
+            <path refid="thirdparty.classpath" />
+            <path refid="apache.xerces.classpath"/>
+         </classpath>
+
+         <formatter type="plain" usefile="true" />
+         <formatter type="xml" usefile="true" />
+
+         <test todir="${build.reports}" name="${test}" haltonerror="${junit.batchtest.haltonerror}" haltonfailure="${junit.batchtest.haltonfailure}" fork="${junit.batchtest.fork}" />
+      </junit>
+   </target>
+
+   <target name="memory-test" depends="most" description="Execute MemoryLeakTestCase">
+      <mkdir dir="${build.reports}" />
+      <mkdir dir="${build.testlog}" />
+
+      <junit printsummary="yes" fork="yes" haltonfailure="no">
+         <classpath>
+            <pathelement location="${build.classes}" />
+            <pathelement location="${build.resources}" />
+            <path refid="thirdparty.classpath" />
+            <path refid="javac.classpath" />
+            <path refid="apache.xerces.classpath" />
+         </classpath>
+         <jvmarg value="-agentlib:jbossAgent" />
+         <formatter type="plain" usefile="true" />
+         <formatter type="xml" usefile="true" />
+         <test fork="yes" todir="${build.reports}" name="org.jboss.test.memorytests.ClassInfoMemoryTestCase" />
+      </junit>
+
+   </target>
+
+</project>


Property changes on: trunk/profileservice/build-test.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/build.log
===================================================================
--- trunk/profileservice/build.log	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/build.log	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,37 @@
+
+configure:
+Overriding previous definition of reference to jboss.test.classpath
+
+_default:task-init:
+
+init:
+
+_buildmagic:build-bypass-checker:
+
+_buildmagic:build-bypass-notice:
+
+_buildmagic:build-bypass-check:
+
+jars:
+
+_buildmagic:init:
+
+init:
+
+_default:compile-classes:
+    [javac] Compiling 1 source file to /home/svn/JBossHead/jboss-head/profileservice/output/classes
+
+_default:compile-resources:
+
+_default:compile-etc:
+
+compile:
+
+module-jars:
+      [jar] Building jar: /home/svn/JBossHead/jboss-head/profileservice/output/lib/jboss-profileservice.jar
+
+most:
+
+main:
+
+BUILD SUCCESSFUL


Property changes on: trunk/profileservice/build.log
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/build.xml
===================================================================
--- trunk/profileservice/build.xml	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/build.xml	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+   <!ENTITY buildmagic SYSTEM "../tools/etc/buildmagic/buildmagic.ent">
+   <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
+   <!ENTITY modules SYSTEM "../tools/etc/buildmagic/modules.ent">
+   <!ENTITY targets SYSTEM "../tools/etc/buildmagic/targets.ent">
+]>
+
+<!-- ====================================================================== -->
+<!--                                                                        -->
+<!--  JBoss, the OpenSource J2EE webOS                                      -->
+<!--                                                                        -->
+<!--  Distributable under LGPL license.                                     -->
+<!--  See terms of license at http://www.gnu.org.                           -->
+<!--                                                                        -->
+<!-- ====================================================================== -->
+
+<!-- $Id: build.xml 59266 2007-01-02 07:31:32Z scott.stark at jboss.org $ -->
+
+<project default="main" name="JBoss/ProfileService">
+
+  <!-- ================================================================== -->
+  <!-- Setup                                                              -->
+  <!-- ================================================================== -->
+
+  <!--
+     | Include the common Buildmagic elements.
+     |
+     | This defines several different targets, properties and paths.
+     | It also sets up the basic extention tasks amoung other things.
+   -->
+
+  &buildmagic;
+
+  <!--
+     | Include the normal targets.
+   -->
+  &targets;
+
+  <!-- ================================================================== -->
+  <!-- Configuration                                                      -->
+  <!-- ================================================================== -->
+
+  <!--
+     | Configure the build system.
+     |
+     | This target is invoked by the Buildmagic initialization logic and
+     | should contain module specific configuration elements.
+   -->
+
+  <target name="configure" unless="configure.disable">
+
+    <!-- =================== -->
+    <!-- Basic Configuration -->
+    <!-- =================== -->
+
+    <!-- Module name(s) & version -->
+    <property name="module.name" value="profileserivce"/>
+    <property name="module.Name" value="JBoss ProfileService"/>
+    <property name="module.version" value="DEV"/>
+
+    <!-- ========= -->
+    <!-- Libraries -->
+    <!-- ========= -->
+
+    &libraries;
+    &modules;
+
+    <!-- The combined library classpath -->
+    <path id="library.classpath">
+      <path refid="junit.junit.classpath"/>
+      <path refid="jboss.aop.classpath"/>
+      <path refid="jboss.aspects.classpath"/>
+      <path refid="jboss.common.core.classpath"/>
+      <path refid="jboss.common.logging.spi.classpath"/>
+      <path refid="jboss.jboss.vfs.classpath"/>
+      <path refid="jboss.microcontainer.classpath"/>
+      <path refid="jboss.remoting.classpath"/>
+      <path refid="jboss.system.classpath"/>
+    </path>
+
+    <!-- The combined dependant module classpath -->
+    <path id="dependentmodule.classpath">
+    </path>
+
+    <!-- ===== -->
+    <!-- Tasks -->
+    <!-- ===== -->
+
+    <property name="jar.prefix" value="jboss-profileservice"/>
+    <property name="javac.target" value="1.5"/>
+    <property name="javac.source" value="1.5"/>
+    <call target="_default:task-init"/>
+
+  </target>
+
+  <!-- ================================================================== -->
+  <!-- Compile                                                            -->
+  <!-- ================================================================== -->
+
+  <!--
+     | Compile everything.
+     |
+     | This target should depend on other compile-* targets for each
+     | different type of compile that needs to be performed, short of
+     | documentation compiles.
+   -->
+
+  <target name="compile"
+	  description="Compile all source files."
+	  depends="_default:compile-classes,
+              _default:compile-resources,
+              _default:compile-etc"/>
+
+  <!-- ================================================================== -->
+  <!-- Archives                                                           -->
+  <!-- ================================================================== -->
+
+  
+  
+
+  <!-- 
+     |  Build all jar files.
+    -->
+  <target name="module-jars" >
+  
+    <!-- -->
+    <jar jarfile="${build.lib}/jboss-profileservice.jar" manifest="${build.etc}/default.mf">
+      <fileset dir="${build.classes}" />
+      <fileset dir="${build.resources}">
+        <include name="dtd/**"/>
+      </fileset>
+    </jar>
+
+  </target>
+
+</project>


Property changes on: trunk/profileservice/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/src/etc/default.mf
===================================================================
--- trunk/profileservice/src/etc/default.mf	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/src/etc/default.mf	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Created-By: @java.vm.version@ (@java.vm.vendor@)
+Specification-Title: @specification.title@
+Specification-Version: @specification.version@
+Specification-Vendor: @specification.vendor@
+Implementation-Title: @implementation.title@
+Implementation-URL: @implementation.url@
+Implementation-Version: @implementation.version@
+Implementation-Vendor: @implementation.vendor@
+Implementation-Vendor-Id: @implementation.vendor.id@


Property changes on: trunk/profileservice/src/etc/default.mf
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/src/etc/run.mf
===================================================================
--- trunk/profileservice/src/etc/run.mf	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/src/etc/run.mf	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Created-By: @java.vm.version@ (@java.vm.vendor@)
+Specification-Title: @specification.title@
+Specification-Version: @specification.version@
+Specification-Vendor: @specification.vendor@
+Implementation-Title: @implementation.title@
+Implementation-URL: @implementation.url@
+Implementation-Version: @implementation.version@
+Implementation-Vendor: @implementation.vendor@
+Implementation-Vendor-Id: @implementation.vendor.id@
+Main-Class: org.jboss.Main
+Class-Path: ../client/getopt.jar


Property changes on: trunk/profileservice/src/etc/run.mf
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/src/main/org/jboss/profileservice/aop/MainDeployerAdvice.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/aop/MainDeployerAdvice.java	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/src/main/org/jboss/profileservice/aop/MainDeployerAdvice.java	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.profileservice.aop;
+
+import java.util.Collection;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.deployers.spi.structure.DeploymentContext;
+import org.jboss.logging.Logger;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class MainDeployerAdvice
+{
+   public static Logger log = Logger.getLogger(MainDeployerAdvice.class);
+
+   public MainDeployerAdvice()
+   {
+      log.trace("ctor");
+   }
+
+   public Object process(MethodInvocation invocation) throws Throwable
+   {
+      log.info("process(MethodInvocation), "+invocation);
+      Object value = invocation.invokeNext();
+      if( value instanceof Collection )
+      {
+         Collection<DeploymentContext> ctxs = (Collection<DeploymentContext>) value;
+         log.info("ctxs: "+ctxs);
+      }
+      return value;
+   }
+}
+


Property changes on: trunk/profileservice/src/main/org/jboss/profileservice/aop/MainDeployerAdvice.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProfileServiceInvocationHandler.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProfileServiceInvocationHandler.java	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProfileServiceInvocationHandler.java	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.profileservice.remoting;
+
+import org.jboss.aop.proxy.Proxy;
+import org.jboss.aspects.remoting.AOPRemotingInvocationHandler;
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.ServerInvocationHandler;
+
+/**
+ * The remoting ServerInvocationHandler implementation for the ProfileService.
+ * 
+ * 
+ * @see AOPRemotingInvocationHandler
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class ProfileServiceInvocationHandler extends AOPRemotingInvocationHandler
+   implements ServerInvocationHandler
+{
+   private Proxy mgtViewProxy;
+
+   public Proxy getManagementViewProxy()
+   {
+      return mgtViewProxy;
+   }
+   public void setManagementViewProxy(Proxy mgtViewProxy)
+   {
+      this.mgtViewProxy = mgtViewProxy;
+   }
+
+   public Object invoke(InvocationRequest invocation)
+      throws Throwable
+   {
+      Object value = super.invoke(invocation);
+      if( value instanceof ManagementView )
+         value = mgtViewProxy;
+      return value;
+   }
+
+}


Property changes on: trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProfileServiceInvocationHandler.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProxyFactory.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProxyFactory.java	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProxyFactory.java	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.profileservice.remoting;
+
+import java.util.ArrayList;
+
+import javax.naming.InitialContext;
+
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.proxy.Proxy;
+import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
+import org.jboss.aspects.remoting.Remoting;
+import org.jboss.aspects.security.SecurityClientInterceptor;
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.profileservice.spi.ProfileService;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.util.naming.Util;
+
+/**
+ * An aop/remoting proxy factory bean that exposes the ProfileService
+ * interfaces.
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class ProxyFactory
+{
+   private String dispatchName = "ProfileService";
+   private String jndiName = "ProfileService";
+   private InvokerLocator locator;
+   private ProfileService ps;
+   private Proxy psProxy;
+   private Proxy mgtViewProxy;
+
+   public String getDispatchName()
+   {
+      return dispatchName;
+   }
+
+   public void setDispatchName(String dispatchName)
+   {
+      this.dispatchName = dispatchName;
+   }
+
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+
+   public InvokerLocator getLocator()
+   {
+      return locator;
+   }
+
+   public void setLocator(InvokerLocator locator)
+   {
+      this.locator = locator;
+   }
+
+   public ProfileService getProfileService()
+   {
+      return ps;
+   }
+
+   public void setProfileService(ProfileService ps)
+   {
+      this.ps = ps;
+   }
+
+   public Proxy getProfileServiceProxy()
+   {
+      return psProxy;
+   }
+   public Proxy getManagementViewProxy()
+   {
+      return mgtViewProxy;
+   }
+
+   public void start()
+      throws Exception
+   {
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      Class[] ifaces = {ProfileService.class};
+
+      // Create the ProfileService proxy
+      Dispatcher.singleton.registerTarget(dispatchName, ps);
+
+      ArrayList<Interceptor> interceptors = new ArrayList<Interceptor>();
+      interceptors.add(SecurityClientInterceptor.singleton);
+      interceptors.add(InvokeRemoteInterceptor.singleton);
+
+      psProxy = Remoting.createRemoteProxy(dispatchName, loader, ifaces, locator,
+            interceptors, "ProfileService");
+      InitialContext ctx = new InitialContext();
+      Util.bind(ctx, jndiName, psProxy);
+
+      // Create the ManagementView proxy
+      ManagementView mv = ps.getViewManager();
+      String mvDispatchName = dispatchName+".ManagementView";
+      Dispatcher.singleton.registerTarget(mvDispatchName, mv);
+      mgtViewProxy = Remoting.createRemoteProxy(mvDispatchName, loader, ifaces, locator,
+            interceptors, "ProfileService");
+   }
+
+   public void stop()
+      throws Exception
+   {
+      Dispatcher.singleton.unregisterTarget(dispatchName);
+      String mvDispatchName = dispatchName+".ManagementView";
+      Dispatcher.singleton.unregisterTarget(mvDispatchName);
+      InitialContext ctx = new InitialContext();
+      Util.unbind(ctx, jndiName);
+   }
+}


Property changes on: trunk/profileservice/src/main/org/jboss/profileservice/remoting/ProxyFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/src/resources/profileservice-beans.xml
===================================================================
--- trunk/profileservice/src/resources/profileservice-beans.xml	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/src/resources/profileservice-beans.xml	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    ProfileService beans that extend the bootstrap configuration. This
+    includes:
+    Remote access to ProfileService interfaces
+    ...
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+    <bean name="ProfileServiceProxyFactory" class="org.jboss.system.server.profileservice.repository.FileProfileRepository">
+        <property name="storeRoot">${jboss.server.base.dir}</property>
+        <property name="repositoryFactory"><inject bean="SerializableDeploymentRepositoryFactory"/></property>
+        <!-- Remoting  -->
+        <depends>jboss.remoting:service=Connector,transport=socket</depends>
+    </bean>
+
+    <!--
+        Add a ProfileService handler to the remoting socket connector
+    -->
+    <bean name="ProfileServiceInvocationHandler"
+        class="org.jboss.aspects.remoting.AOPRemotingInvocationHandler">
+        <install bean="jboss.remoting:service=Connector,transport=socket" method="addInvocationHandler">
+            <parameter>ProfileService</parameter>
+            <parameter><this/></parameter>
+        </install>
+        <uninstall bean="jboss.remoting:service=Connector,transport=socket" method="removeInvocationHandler">
+            <parameter>ProfileService</parameter>
+        </uninstall>
+    </bean>
+</deployment>


Property changes on: trunk/profileservice/src/resources/profileservice-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/profileservice/src/tests/readme.html
===================================================================
--- trunk/profileservice/src/tests/readme.html	2007-01-11 07:36:16 UTC (rev 59516)
+++ trunk/profileservice/src/tests/readme.html	2007-01-11 08:35:28 UTC (rev 59517)
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+  <head>
+    <!-- $Id: readme.html 46331 2006-07-17 14:12:39Z starksm $ -->
+  </head>
+
+  <body bgcolor="white">
+  <h1>System Unit Tests</h1>
+  The system module unit tests rely on the following system module locations:
+  <ul>
+  	<li>src/resources/tests/bootstrap : for the ProfileService based bootstrap
+  	tests to load the bootstrap-deployers.xml descriptor.</li>
+  	<li>src/resources/tests/conf : for the test-log4j.xml when running from the
+  	command line to generate a test.log file.</li>
+  	<li>src/resources/tests/xml : to locate unit test related descriptors.</li>
+  </ul>
+
+  <h2>The build-test.xml ant file</h1>
+  The build-test.xml ant file is used to compile and run the tests outside of
+  eclipse.
+  </body>
+</html>


Property changes on: trunk/profileservice/src/tests/readme.html
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list