[jboss-cvs] JBossAS SVN: r88264 - in projects/naming/trunk: jnpclient and 30 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 6 10:38:53 EDT 2009


Author: adrian at jboss.org
Date: 2009-05-06 10:38:53 -0400 (Wed, 06 May 2009)
New Revision: 88264

Added:
   projects/naming/trunk/naming-mc-int/
   projects/naming/trunk/naming-mc-int/.classpath
   projects/naming/trunk/naming-mc-int/.project
   projects/naming/trunk/naming-mc-int/.settings/
   projects/naming/trunk/naming-mc-int/.settings/org.eclipse.jdt.core.prefs
   projects/naming/trunk/naming-mc-int/pom.xml
   projects/naming/trunk/naming-mc-int/src/
   projects/naming/trunk/naming-mc-int/src/main/
   projects/naming/trunk/naming-mc-int/src/main/java/
   projects/naming/trunk/naming-mc-int/src/main/java/org/
   projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/
   projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/
   projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/
   projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/AbstractJNDILifecycleCallback.java
   projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDI.java
   projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDIInstallLifecycleCallback.java
   projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDIOnDemandLifecycleCallback.java
   projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/MicrocontainerObjectFactory.java
   projects/naming/trunk/naming-mc-int/src/test/
   projects/naming/trunk/naming-mc-int/src/test/java/
   projects/naming/trunk/naming-mc-int/src/test/java/org/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/BootstrapNamingTest.java
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/BootstrapNamingTestDelegate.java
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/NamingTestSuite.java
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/binding/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/binding/test/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/binding/test/JNDIBindingUnitTestCase.java
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/SmokeTestSuite.java
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/test/
   projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/test/BootstrapSmokeUnitTestCase.java
   projects/naming/trunk/naming-mc-int/src/test/resources/
   projects/naming/trunk/naming-mc-int/src/test/resources/bootstrap/
   projects/naming/trunk/naming-mc-int/src/test/resources/bootstrap/bootstrap.xml
   projects/naming/trunk/naming-mc-int/src/test/resources/jndi.properties
   projects/naming/trunk/naming-mc-int/src/test/resources/org/
   projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/
   projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/
   projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/
   projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/
   projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/
   projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/
   projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/OnDemand.xml
   projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/Plain.xml
Modified:
   projects/naming/trunk/jnpclient/.classpath
   projects/naming/trunk/jnpserver/.classpath
   projects/naming/trunk/pom.xml
Log:
[JBNAME-32] - Prototype of JNDI lifecycle and on-demand jndi binding

Modified: projects/naming/trunk/jnpclient/.classpath
===================================================================
--- projects/naming/trunk/jnpclient/.classpath	2009-05-06 13:38:00 UTC (rev 88263)
+++ projects/naming/trunk/jnpclient/.classpath	2009-05-06 14:38:53 UTC (rev 88264)
@@ -1,6 +1,6 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.13.GA/jboss-common-core-2.2.13.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.13.GA/jboss-common-core-2.2.13.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
 </classpath>
\ No newline at end of file

Modified: projects/naming/trunk/jnpserver/.classpath
===================================================================
--- projects/naming/trunk/jnpserver/.classpath	2009-05-06 13:38:00 UTC (rev 88263)
+++ projects/naming/trunk/jnpserver/.classpath	2009-05-06 14:38:53 UTC (rev 88264)
@@ -9,19 +9,19 @@
   <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4.jar" sourcepath="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.CR5/jboss-dependency-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.CR5/jboss-dependency-2.0.0.CR5-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.CR5/jboss-kernel-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.CR5/jboss-kernel-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.9/jaxb-api-2.1.9.jar" sourcepath="M2_REPO/sun-jaxb/jaxb-api/2.1.9/jaxb-api-2.1.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.13.GA/jboss-common-core-2.2.13.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.13.GA/jboss-common-core-2.2.13.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.5.GA/jboss-dependency-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.5.GA/jboss-dependency-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.5.GA/jboss-kernel-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.5.GA/jboss-kernel-2.0.5.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.GA/jboss-reflect-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.GA/jboss-reflect-2.0.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.2/junit-3.8.2.jar" sourcepath="M2_REPO/junit/junit/3.8.2/junit-3.8.2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.1.GA/jbossxb-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.1.GA/jbossxb-2.0.1.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>

Added: projects/naming/trunk/naming-mc-int/.classpath
===================================================================
--- projects/naming/trunk/naming-mc-int/.classpath	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/.classpath	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,35 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.0.2/activation-1.0.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.8.1.GA/javassist-3.8.1.GA.jar" sourcepath="M2_REPO/javassist/javassist/3.8.1.GA/javassist-3.8.1.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4.jar" sourcepath="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.CR18/jboss-aop-2.0.0.CR18.jar" sourcepath="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.CR18/jboss-aop-2.0.0.CR18-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.0.CR2/jboss-aop-mc-int-2.0.0.CR2.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.0.CR2/jboss-aop-mc-int-2.0.0.CR2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.CR2/jboss-dependency-2.0.0.CR2.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.CR2/jboss-dependency-2.0.0.CR2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.CR2/jboss-kernel-2.0.0.CR2.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.CR2/jboss-kernel-2.0.0.CR2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.0.CR1/jboss-mdr-2.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.0.CR1/jboss-mdr-2.0.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.CR1/jboss-reflect-2.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.CR1/jboss-reflect-2.0.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR13/jbossxb-2.0.0.CR13.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.CR13/jbossxb-2.0.0.CR13-sources.jar"/>
+  <classpathentry kind="src" path="/jnpserver"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar" sourcepath="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
+</classpath>
\ No newline at end of file

Added: projects/naming/trunk/naming-mc-int/.project
===================================================================
--- projects/naming/trunk/naming-mc-int/.project	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/.project	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,15 @@
+<projectDescription>
+  <name>naming-mc-int</name>
+  <comment>JBoss JNDI Microcontainer Integration</comment>
+  <projects>
+    <project>jnpserver</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: projects/naming/trunk/naming-mc-int/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/naming/trunk/naming-mc-int/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/.settings/org.eclipse.jdt.core.prefs	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,5 @@
+#Wed May 06 13:02:52 CEST 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: projects/naming/trunk/naming-mc-int/pom.xml
===================================================================
--- projects/naming/trunk/naming-mc-int/pom.xml	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/pom.xml	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,71 @@
+<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">
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jboss.naming</groupId>
+    <artifactId>jboss-naming-build</artifactId>
+    <version>5.1.0-SNAPSHOT</version>
+  </parent>
+  
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>naming-mc-int</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Naming Microcontainer Integration</name>
+  <url>http://www.jboss.org</url>
+  <description>JBoss JNDI Microcontainer Integration</description>
+  <scm>
+     <connection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/naming/trunk</connection>
+  </scm>
+  <!-- Properties -->
+  <properties>
+    <version.org.jboss.common.core>2.2.8.GA</version.org.jboss.common.core>
+    <version.org.jboss.microcontainer>2.0.0.CR2</version.org.jboss.microcontainer>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>src/main/assembly/client.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+   
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-common-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-aop-mc-int</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.naming</groupId>
+      <artifactId>jnpserver</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Added: projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/AbstractJNDILifecycleCallback.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/AbstractJNDILifecycleCallback.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/AbstractJNDILifecycleCallback.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,166 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.naming.microcontainer;
+
+import javax.naming.InitialContext;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.metadata.spi.MetaData;
+import org.jboss.util.naming.Util;
+
+/**
+ * AbstractJNDILifecycleCallback.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AbstractJNDILifecycleCallback
+{
+   /**
+    * Installation of the context
+    * 
+    * @param context the context
+    * @throws Exception for any error
+    */
+   public abstract void install(ControllerContext context) throws Exception;
+
+   /**
+    * Uninstall of the context
+    * 
+    * @param context the context
+    * @throws Exception for any error
+    */
+   public abstract void uninstall(ControllerContext context) throws Exception;
+   
+   /**
+    * Get the JNDI annotation
+    * 
+    * @param context the context
+    * @return the jndi annotation or null if not found
+    * @throws Exception for any error
+    */
+   protected JNDI getJNDIAnnotation(ControllerContext context) throws Exception
+   {
+      if (context == null)
+         throw new IllegalArgumentException("Null context");
+
+      MetaData metaData = context.getScopeInfo().getMetaData();
+      if (metaData == null)
+         return null;
+      return metaData.getAnnotation(JNDI.class);
+   }
+   
+   /**
+    * Bind into jndi
+    * 
+    * @param context the context
+    * @param jndi the jndi annotation
+    * @throws Exception for any error
+    */
+   protected void bind(ControllerContext context, JNDI jndi) throws Exception
+   {
+      if (context == null)
+         throw new IllegalArgumentException("Null context");
+      if (jndi == null)
+         jndi = getJNDIAnnotation(context);
+
+      if (jndi.bindDirect())
+      {
+         Object object = context.getTarget();
+         if (object == null)
+            throw new IllegalStateException("No object associated with context: " + context.getName());
+         Util.bind(new InitialContext(), jndi.binding(), object);
+      }
+      else
+      {
+         String className = determineClassName(context, jndi);
+         MicrocontainerObjectFactory.bind(jndi.binding(), className, null, context);
+      }
+   }
+   
+   /**
+    * Unbind from jndi
+    * 
+    * @param context the context
+    * @param jndi the jndi annotation
+    * @throws Exception for any error
+    */
+   protected void unbind(ControllerContext context, JNDI jndi) throws Exception
+   {
+      if (context == null)
+         throw new IllegalArgumentException("Null context");
+      if (jndi == null)
+         jndi = getJNDIAnnotation(context);
+
+      if (jndi.bindDirect())
+      {
+         Util.unbind(new InitialContext(), jndi.binding());
+      }
+      else
+      {
+         MicrocontainerObjectFactory.unbind(jndi.binding(), null);
+      }
+   }
+
+   /**
+    * Determine the class name
+    * 
+    * @param context the context
+    * @param jndi the jndi binding
+    * @return the class name
+    */
+   protected String determineClassName(ControllerContext context, JNDI jndi)
+   {
+      if (context == null)
+         throw new IllegalArgumentException("Null context");
+
+      String className = jndi.className();
+      if (className.length() == 0)
+      {
+         Object object = context.getTarget();
+         if (object != null)
+         {
+            className = object.getClass().getName();
+         }
+         // This is a bit hacky
+         else if (context instanceof KernelControllerContext)
+         {
+            KernelControllerContext kcc = (KernelControllerContext) context;
+            BeanInfo beanInfo = kcc.getBeanInfo();
+            if (beanInfo != null)
+            {
+               className = beanInfo.getName();
+            }
+            else
+            {
+               BeanMetaData bmd = kcc.getBeanMetaData();
+               if (bmd != null)
+                  className = bmd.getBean();
+            }
+         }
+      }
+      return className;
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDI.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDI.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDI.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.naming.microcontainer;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JNDI.
+ * 
+ * TODO move to AS integration project
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target(ElementType.TYPE)
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JNDI
+{
+   /** The jndi binding */
+   String binding();
+   
+   /** Whether to bind directly */
+   boolean bindDirect() default false;
+   
+   /** The class name to use for the jndi binding */
+   String className() default "";
+}

Added: projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDIInstallLifecycleCallback.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDIInstallLifecycleCallback.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDIInstallLifecycleCallback.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.naming.microcontainer;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerMode;
+
+/**
+ * JNDIInstallLifecycleCallback.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JNDIInstallLifecycleCallback extends AbstractJNDILifecycleCallback
+{
+   public void install(ControllerContext context) throws Exception
+   {
+      if (ControllerMode.ON_DEMAND.equals(context.getMode()) == false)
+         bind(context, null);
+   }
+
+   public void uninstall(ControllerContext context) throws Exception
+   {
+      if (ControllerMode.ON_DEMAND.equals(context.getMode()) == false)
+         unbind(context, null);
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDIOnDemandLifecycleCallback.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDIOnDemandLifecycleCallback.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/JNDIOnDemandLifecycleCallback.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.naming.microcontainer;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerMode;
+
+/**
+ * JNDIOnDemandLifecycleCallback.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JNDIOnDemandLifecycleCallback extends AbstractJNDILifecycleCallback
+{
+   public void install(ControllerContext context) throws Exception
+   {
+      if (ControllerMode.ON_DEMAND.equals(context.getMode()))
+         bind(context, null);
+   }
+
+   public void uninstall(ControllerContext context) throws Exception
+   {
+      if (ControllerMode.ON_DEMAND.equals(context.getMode()))
+         unbind(context, null);
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/MicrocontainerObjectFactory.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/MicrocontainerObjectFactory.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/main/java/org/jboss/naming/microcontainer/MicrocontainerObjectFactory.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,193 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.naming.microcontainer;
+
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.Map;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.Name;
+import javax.naming.NameAlreadyBoundException;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.StringRefAddr;
+import javax.naming.spi.ObjectFactory;
+
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerMode;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.logging.Logger;
+import org.jboss.util.collection.WeakValueHashMap;
+import org.jboss.util.naming.Util;
+
+/**
+ * MicrocontainerObjectFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class MicrocontainerObjectFactory implements ObjectFactory
+{
+   /** The log */
+   private static final Logger log = Logger.getLogger(MicrocontainerObjectFactory.class);
+   
+   /** The bindings to controller contexts */
+   private static Map<String, ControllerContext> bindings = Collections.synchronizedMap(new WeakValueHashMap<String, ControllerContext>());
+
+   /**
+    * Bind the object
+    * 
+    * @param binding the binding
+    * @param className the class name (can be null)
+    * @param ctx the jndi context (can be null)
+    * @param controllerContext the controller context
+    * @throws NamingException for any error
+    * @throws IllegalArgumentException for a null parameter
+    */
+   public synchronized static void bind(String binding, String className, Context ctx, ControllerContext controllerContext) throws NamingException
+   {
+      if (binding == null)
+         throw new IllegalArgumentException("Null binding");
+      if (controllerContext == null)
+         throw new IllegalArgumentException("Null controller context");
+      
+      if (bindings.containsKey(binding))
+         throw new NameAlreadyBoundException("The name is already bound: " + binding);
+         
+      if (className == null)
+      {
+         Object target = controllerContext.getTarget();
+         if (target != null)
+            className = target.getClass().getName();
+      }
+      
+      if (ctx == null)
+         ctx = new InitialContext();
+
+      // Setup the reference
+      String factory = MicrocontainerObjectFactory.class.getName();
+      StringRefAddr addr = new StringRefAddr("nns", binding);
+      Reference ref = new Reference(className, addr, factory, null);
+      bindings.put(binding, controllerContext);
+
+      try
+      {
+         // This will perform the permission check
+         Util.bind(ctx, binding, ref);
+         log.debug("Bound '" + controllerContext.getName() + "' to jndi name: " + binding);
+      }
+      catch (NamingException e)
+      {
+         bindings.remove(binding);
+      }
+   }
+
+   /**
+    * Unbind the object
+    * 
+    * @param binding the binding
+    * @param ctx the jndi context (can be null)
+    * @throws NamingException for any error
+    * @throws IllegalArgumentException for a null parameter
+    */
+   public synchronized static void unbind(String binding, Context ctx) throws NamingException
+   {
+      if (binding == null)
+         throw new IllegalArgumentException("Null binding");
+      
+      if (bindings.containsKey(binding) == false)
+         throw new NameNotFoundException("The name is not bound: " + binding);
+      
+      if (ctx == null)
+         ctx = new InitialContext();
+
+      // This will perform the permission check
+      Util.unbind(ctx, binding);
+
+      ControllerContext controllerContext = bindings.remove(binding);
+      if (controllerContext != null)
+         log.debug("Unound '" + controllerContext.getName() + "' from jndi name: " + binding);
+   }
+   
+   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception
+   {
+      // Determine the binding to try
+      if (obj == null || obj instanceof Reference == false)
+         return null;
+      Reference ref = (Reference) obj;
+      RefAddr addr = ref.get("nns");
+      if (addr == null || addr instanceof StringRefAddr == false)
+         return null;
+      String binding = (String) addr.getContent();
+
+      // No such binding, let others try to find it
+      ControllerContext controllerContext = bindings.get(binding);
+      if (controllerContext == null)
+         return null;
+      
+      // Check the context is usable and return the object
+      return checkInstalled(controllerContext);
+   }
+
+   /**
+    * Make sure a context is installed
+    * 
+    * @param controllerContext the controller context
+    * @return the installed object
+    * @throws Exception for any error
+    */
+   private Object checkInstalled(ControllerContext controllerContext) throws Exception
+   {
+      try
+      {
+         // Not installed?
+         if (ControllerState.INSTALLED.equals(controllerContext.getState()) == false)
+         {
+            // On demand, lets try to install it
+            if (ControllerMode.ON_DEMAND.equals(controllerContext.getMode()))
+            {
+               Controller controller = controllerContext.getController();
+               controller.change(controllerContext, ControllerState.INSTALLED);
+            }
+         }
+      }
+      catch (Throwable t)
+      {
+         if (t instanceof Error)
+            throw (Error) t;
+         if (t instanceof Exception)
+            throw (Exception) t;
+         throw new RuntimeException("Error", t);
+      }
+
+      // Real check if we are installed
+      if (ControllerState.INSTALLED.equals(controllerContext.getState()) == false)
+         throw new NamingException("Cannot install controller context: " + controllerContext.getName());
+      
+      return controllerContext.getTarget();
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/BootstrapNamingTest.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/BootstrapNamingTest.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/BootstrapNamingTest.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.test.naming.microcontainer;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+
+import org.jboss.test.kernel.junit.MicrocontainerTest;
+import org.jboss.util.naming.Util;
+
+/**
+ * BootstrapNamingTest.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class BootstrapNamingTest extends MicrocontainerTest
+{
+   InitialContext ic;
+   
+   public static BootstrapNamingTestDelegate getDelegate(Class<?> clazz) throws Exception
+   {
+      return new BootstrapNamingTestDelegate(clazz);
+   }
+   
+   public BootstrapNamingTest(String name)
+   {
+      super(name);
+   }
+
+   protected BootstrapNamingTestDelegate getDelegate()
+   {
+      return (BootstrapNamingTestDelegate) super.getDelegate();
+   }
+   
+   protected InitialContext getInitialContext() throws Exception
+   {
+      if (ic == null)
+         ic = new InitialContext();
+      return ic;
+   }
+   
+   protected void bind(String name, Object binding) throws Exception
+   {
+      Util.bind(getInitialContext(), name, binding);
+   }
+   
+   protected void unbind(String name) throws Exception
+   {
+      Util.unbind(getInitialContext(), name);
+   }
+   
+   protected Object assertBinding(String name) throws Exception
+   {
+      return getInitialContext().lookup(name);
+   }
+   
+   protected <T> T assertBinding(String name, Class<T> expectedType) throws Exception
+   {
+      Object result = assertBinding(name);
+      return assertInstanceOf(result, expectedType);
+   }
+   
+   protected void assertBinding(String name, Object expected) throws Exception
+   {
+      Object actual = assertBinding(name);
+      assertEquals(expected, actual);
+   }
+   
+   protected void assertNoBinding(String name) throws Exception
+   {
+      Context ctx = getInitialContext();
+      try
+      {
+         Object result = ctx.lookup(name);
+         fail("Did not expect a binding for " + name + " : " + result);
+      }
+      catch (Throwable t)
+      {
+         checkThrowable(NameNotFoundException.class, t);
+      }
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/BootstrapNamingTestDelegate.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/BootstrapNamingTestDelegate.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/BootstrapNamingTestDelegate.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.test.naming.microcontainer;
+
+import java.net.URL;
+
+import org.jboss.test.kernel.junit.MicrocontainerTestDelegate;
+
+/**
+ * BootstrapNamingTestDelegate.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class BootstrapNamingTestDelegate extends MicrocontainerTestDelegate
+{
+   public BootstrapNamingTestDelegate(Class<?> clazz) throws Exception
+   {
+      super(clazz);
+   }
+
+   protected void deploy() throws Exception
+   {
+      String common = "/bootstrap/bootstrap.xml";
+      URL url = getClass().getResource(common);
+      if (url == null)
+         throw new IllegalStateException(common + " not found");
+      deploy(url);
+      
+      super.deploy();
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/NamingTestSuite.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/NamingTestSuite.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/NamingTestSuite.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* 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.test.naming.microcontainer;
+
+import org.jboss.test.naming.microcontainer.smoke.SmokeTestSuite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * Naming MC Test Suite.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 37459 $
+ */
+public class NamingTestSuite extends TestSuite
+{
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("Naming MC Tests");
+
+      suite.addTest(SmokeTestSuite.suite());
+
+      return suite;
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/binding/test/JNDIBindingUnitTestCase.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/binding/test/JNDIBindingUnitTestCase.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/binding/test/JNDIBindingUnitTestCase.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,81 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* 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.test.naming.microcontainer.binding.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.test.naming.microcontainer.BootstrapNamingTest;
+
+/**
+ * PlainJNDIUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JNDIBindingUnitTestCase extends BootstrapNamingTest
+{
+   public static Test suite()
+   {
+      return new TestSuite(JNDIBindingUnitTestCase.class);
+   }
+
+   public JNDIBindingUnitTestCase(String name) throws Throwable
+   {
+      super(name);
+   }
+   
+   public void testPlain() throws Exception
+   {
+      assertNoBinding("Test");
+      KernelDeployment deployment = deploy("Plain.xml");
+      try
+      {
+         getControllerContext("Test", ControllerState.INSTALLED);
+         assertBinding("Test", "Hello");
+      }
+      finally
+      {
+         undeploy(deployment);
+         assertNoBinding("Test");
+      }
+   }
+   
+   public void testOnDemand() throws Exception
+   {
+      assertNoBinding("Test");
+      KernelDeployment deployment = deploy("Plain.xml");
+      try
+      {
+         getControllerContext("Test", ControllerState.PRE_INSTALL);
+         assertBinding("Test", "Hello");
+         getControllerContext("Test", ControllerState.INSTALLED);
+      }
+      finally
+      {
+         undeploy(deployment);
+         assertNoBinding("Test");
+      }
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/SmokeTestSuite.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/SmokeTestSuite.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/SmokeTestSuite.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* 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.test.naming.microcontainer.smoke;
+
+import org.jboss.test.naming.microcontainer.smoke.test.BootstrapSmokeUnitTestCase;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * Smoke Test Suite.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 37459 $
+ */
+public class SmokeTestSuite extends TestSuite
+{
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("Smoke Tests");
+
+      suite.addTest(BootstrapSmokeUnitTestCase.suite());
+
+      return suite;
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/test/BootstrapSmokeUnitTestCase.java
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/test/BootstrapSmokeUnitTestCase.java	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/java/org/jboss/test/naming/microcontainer/smoke/test/BootstrapSmokeUnitTestCase.java	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* 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.test.naming.microcontainer.smoke.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.test.naming.microcontainer.BootstrapNamingTest;
+
+/**
+ * BootstrapSmokeUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class BootstrapSmokeUnitTestCase extends BootstrapNamingTest
+{
+   public static Test suite()
+   {
+      return new TestSuite(BootstrapSmokeUnitTestCase.class);
+   }
+
+   public BootstrapSmokeUnitTestCase(String name) throws Throwable
+   {
+      super(name);
+   }
+   
+   public void testSmoke() throws Exception
+   {
+      String name = "test/binding";
+      String test = "HelloWorld";
+      
+      bind(name, test);
+      assertBinding(name, test);
+      
+      Object result = assertBinding(name);
+      assertEquals(test, result);
+
+      String string = assertBinding(name, String.class);
+      assertEquals(test, string);
+      
+      unbind(name);
+      assertNoBinding(name);
+   }
+}

Added: projects/naming/trunk/naming-mc-int/src/test/resources/bootstrap/bootstrap.xml
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/resources/bootstrap/bootstrap.xml	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/resources/bootstrap/bootstrap.xml	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- Aspect Manager -->
+   <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+      <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+   </bean>
+   
+   <!-- Support for @JNDI -->
+   <lifecycle-preinstall xmlns="urn:jboss:aop-beans:1.0"
+               name="JNDIPreInstallAdvice"
+               class="org.jboss.naming.microcontainer.JNDIOnDemandLifecycleCallback"
+               classes="@org.jboss.naming.microcontainer.JNDI">
+   </lifecycle-preinstall>
+   <lifecycle-install xmlns="urn:jboss:aop-beans:1.0"
+               name="JNDIInstallAdvice"
+               class="org.jboss.naming.microcontainer.JNDIInstallLifecycleCallback"
+               classes="@org.jboss.naming.microcontainer.JNDI">
+   </lifecycle-install>
+
+   <!-- The Naming Server -->
+   <bean name="NamingServer" class="org.jnp.server.NamingBeanImpl"/>
+
+</deployment>

Added: projects/naming/trunk/naming-mc-int/src/test/resources/jndi.properties
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/resources/jndi.properties	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/resources/jndi.properties	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,4 @@
+# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
+#
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/OnDemand.xml
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/OnDemand.xml	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/OnDemand.xml	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- Aspect Manager -->
+   <bean name="Test" class="java.lang.String" mode="on-demand">
+      <annotation>@org.jboss.naming.microcontainer.JNDI(binding="Test")</annotation>
+      <constructor>
+         <parameter>Hello</parameter>
+      </constructor>
+   </bean>
+
+</deployment>

Added: projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/Plain.xml
===================================================================
--- projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/Plain.xml	                        (rev 0)
+++ projects/naming/trunk/naming-mc-int/src/test/resources/org/jboss/test/naming/microcontainer/binding/test/Plain.xml	2009-05-06 14:38:53 UTC (rev 88264)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- Aspect Manager -->
+   <bean name="Test" class="java.lang.String">
+      <annotation>@org.jboss.naming.microcontainer.JNDI(binding="Test")</annotation>
+      <constructor>
+         <parameter>Hello</parameter>
+      </constructor>
+   </bean>
+
+</deployment>

Modified: projects/naming/trunk/pom.xml
===================================================================
--- projects/naming/trunk/pom.xml	2009-05-06 13:38:00 UTC (rev 88263)
+++ projects/naming/trunk/pom.xml	2009-05-06 14:38:53 UTC (rev 88264)
@@ -29,6 +29,7 @@
   <modules>
     <module>jnpserver</module>  
     <module>jnpclient</module>
+    <module>naming-mc-int</module>
   </modules>
 
   <properties>
@@ -74,6 +75,11 @@
         <version>${version.org.jboss.microcontainer}</version>
       </dependency>
       <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-aop-mc-int</artifactId>
+        <version>${version.org.jboss.microcontainer}</version>
+      </dependency>
+      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>4.4</version>




More information about the jboss-cvs-commits mailing list